Skip to content

fix(providers): Azure OpenAI model listing 404 during configure#7034

Merged
codefromthecrypt merged 1 commit intomainfrom
azure_fix
Feb 6, 2026
Merged

fix(providers): Azure OpenAI model listing 404 during configure#7034
codefromthecrypt merged 1 commit intomainfrom
azure_fix

Conversation

@codefromthecrypt
Copy link
Collaborator

Summary

Fix Azure OpenAI model listing 404 during goose configure. The deployment path was being prepended to models, but should only apply to completions. Matches the openai-python SDK behavior.

Type of Change

  • Bug fix

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

normal tests

Related Issues

Fixes #6987
Relates to #6832 which broke this

Move Azure base URL from {endpoint}/openai/deployments/{name} to
{endpoint}/openai and add a completions_prefix field so the deployment
path is only prepended to chat/completions, not to models. This matches
the openai-python SDK behavior.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug in Azure OpenAI provider configuration where model listing during goose configure was failing with a 404 error. The issue was introduced in PR #6832 when the deployment path was added to the base URL, causing all API calls (including the models endpoint) to incorrectly use the deployment-specific path. This fix correctly applies the deployment prefix only to the chat/completions endpoint, matching the Azure OpenAI REST API structure and the openai-python SDK behavior.

Changes:

  • Added completions_prefix parameter to OpenAiCompatibleProvider to separate deployment-specific paths from base URL
  • Updated Azure provider to use base URL /openai and apply deployment prefix deployments/{name}/ only to completions
  • Updated xAI provider to pass empty string for completions_prefix (no special path needed)

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
crates/goose/src/providers/openai_compatible.rs Added completions_prefix field and applied it only to chat/completions endpoint paths
crates/goose/src/providers/azure.rs Changed base URL to exclude deployment path and passed deployment prefix as parameter
crates/goose/src/providers/xai.rs Updated constructor call to include empty completions_prefix parameter

@codefromthecrypt codefromthecrypt added this pull request to the merge queue Feb 6, 2026
Merged via the queue into main with commit d039f3f Feb 6, 2026
23 checks passed
@codefromthecrypt codefromthecrypt deleted the azure_fix branch February 6, 2026 10:30
katzdave added a commit that referenced this pull request Feb 6, 2026
…webtoken-10.3.0

* origin/main: (54 commits)
  Switch tetrate tool filtering back to supports_computer_use (#7024)
  feat(ui): add inline rename for chat sessions in sidebar (#6995)
  fix: handle toolnames without underscores (#7015)
  feat(claude-code): use stream-json protocol for persistent sessions (#7029)
  test(providers): add model listing to live provider suite (#7038)
  Agent added too much (#7036)
  fix(deps): bump tree-sitter to 0.26 and set sqlx default-features=false to fix RUSTSEC advisories (#7031)
  feat: add image support and improve error resilience for Codex (#7033)
  fix(providers): Azure OpenAI model listing 404 during configure (#7034)
  fix(deps): bump bat to 0.26.1 to resolve RUSTSEC-2026-0008 (#7021)
  Don't swallow Tetrate errors  (#6998)
  docs: remove hardcoded_stuff links (#7016)
  fix(ui): keep Hub chat input from overlapping SessionInsights on paste (#6719)
  Clean up css (#6944)
  docs: aws bedrock bearer token auth (#6990)
  docs: extended custom provider headers support (#7012)
  feat(cli): add type-to-search filtering to select/multiselect dialogs (#6862)
  feat(ci): add cargo-audit workflow for scanning rust vulnerabilities (#6351)
  feat: add User-Agent header to MCP HTTP requests (#6988)
  chore(deps-dev): bump webpack from 5.102.1 to 5.105.0 in /ui/desktop (#6996)
  ...

# Conflicts:
#	Cargo.lock
zanesq added a commit that referenced this pull request Feb 6, 2026
* origin/main:
  Remove build-dependencies section from Cargo.toml (#6946)
  add /rp-why skill blog post (#6997)
  fix: fix snake_case function names in code_execution instructions (#7035)
  Document max_turns settings for recipes and subagents (#7044)
  feat: update Groq declarative data with Preview Models (#7023)
  fix(codex): propagate extended PATH to codex subprocess (#6874)
  Switch tetrate tool filtering back to supports_computer_use (#7024)
  feat(ui): add inline rename for chat sessions in sidebar (#6995)
  fix: handle toolnames without underscores (#7015)
  feat(claude-code): use stream-json protocol for persistent sessions (#7029)
  test(providers): add model listing to live provider suite (#7038)
  Agent added too much (#7036)
  fix(deps): bump tree-sitter to 0.26 and set sqlx default-features=false to fix RUSTSEC advisories (#7031)
  feat: add image support and improve error resilience for Codex (#7033)
  fix(providers): Azure OpenAI model listing 404 during configure (#7034)
  fix(deps): bump bat to 0.26.1 to resolve RUSTSEC-2026-0008 (#7021)
  Don't swallow Tetrate errors  (#6998)
  docs: remove hardcoded_stuff links (#7016)

# Conflicts:
#	ui/desktop/src/components/GooseSidebar/AppSidebar.tsx
kuccello pushed a commit to kuccello/goose that referenced this pull request Feb 7, 2026
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

configure azure openai provider w/ api key fails in 1.23.0 (CLI, ubuntu)

2 participants