Skip to content

Conversation

@shelajev
Copy link
Contributor

when workingon the PR for docs configuring Docker model runner which uses OpenAI compatible API backend, I had some issues when goose configure would error when it wouldn't figure out how to fetch the models.

This PR fixes an issue when a non-default OPENAI_BASE_PATH is configured. I think it might still fail in some corner cases where API is not on the /v1/chat/completions path, but it's better than hardcoding the v1/models.

@shelajev shelajev force-pushed the openai-configure-models-base-url branch from dfb077b to 419fd3c Compare July 21, 2025 21:53
@michaelneale
Copy link
Collaborator

@shelajev and this works fine with openai directly? (would like to confirm that at is correct for 1st party)

@shelajev
Copy link
Contributor Author

Yeah, it's because the default base path is "v1/chat/completions" and the model endpoint becomes "v1/models":

    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.22s
     Running `target/debug/goose configure`

This will update your existing config file
  if you prefer, you can edit it directly at /Users/shelajev/.config/goose/config.yaml

┌   goose-configure
│
◇  What would you like to configure?
│  Configure Providers
│
◇  Which model provider should we use?
│  OpenAI
│
●  OPENAI_API_KEY is set via environment variable
│
◇  Would you like to save this value to your keyring?
│  No
│
●  OPENAI_HOST is already configured
│
◇  Would you like to update this value?
│  Yes
│
◇  Enter new value for OPENAI_HOST
│  https://api.openai.com
│
●  OPENAI_BASE_PATH is already configured
│
◇  Would you like to update this value?
│  Yes
│
◇  Enter new value for OPENAI_BASE_PATH
│  v1/chat/completions
│
◇  Model fetch complete
│
◆  Select a model:
│
│  ● babbage-002
│  ○ chatgpt-4o-latest
│  ○ codex-mini-latest
│  ○ computer-use-preview
│  ○ computer-use-preview-2025-03-11
│  ○ dall-e-2
│  ○ dall-e-3
│  ○ davinci-002
│  ○ gpt-3.5-turbo
│  ○ gpt-3.5-turbo-0125
│  ○ gpt-3.5-turbo-1106
│  ○ gpt-3.5-turbo-16k
│  ○ gpt-3.5-turbo-instruct
│  ○ gpt-3.5-turbo-instruct-0914
│  ○ gpt-4
│  ○ gpt-4-0125-preview
│  ○ gpt-4-0613
│  ○ gpt-4-1106-preview
│  ○ gpt-4-turbo
│  ○ gpt-4-turbo-2024-04-09
│  ○ gpt-4-turbo-preview
│  ○ gpt-4.1

@michaelneale michaelneale self-assigned this Jul 22, 2025
Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice @shelajev, yep it works well, thanks!

@michaelneale michaelneale merged commit d5c8355 into block:main Jul 24, 2025
7 checks passed
@shelajev shelajev deleted the openai-configure-models-base-url branch July 24, 2025 11:30
katzdave added a commit that referenced this pull request Jul 24, 2025
* 'main' of github.com:block/goose:
  Adds the `WaitingForUserInput` state (#3620)
  docs: update extensions library (#3612)
  Fixing grants path (#3632)
  docs: June 2024 Community All-Stars Spotlight (#3631)
  grant program (#3630)
  Lifei/sub recipe desktop temp (#3576)
  docs: local LLMs context size tip (#3454)
  fix: Handle non-default base path for OpenAI compatible model fetching (#3566)
  Goose security updates (#3579)
  fix: multi-tool calls in streamed openai-compatible responses (#3609)
  feat: subagent turn count, simple agent loop (#3597)
  feat: subagent independent extension manager (#3596)
  Improve session history loading resiliency (#3588)
  Added logging and changed default route case to not redirect to home when there is an invalid route (#3610)
  fix: chat sidebar layout overlapping content occasionally (#3590)
  fix: loading shared sessions (#3607)
atarantino pushed a commit to atarantino/goose that referenced this pull request Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants