Skip to content

Handle Azure OpenAI model prefixes as deployments#673

Open
Haihan-Jiang wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
Haihan-Jiang:codex/kubectl-ai-azure-deployment-name
Open

Handle Azure OpenAI model prefixes as deployments#673
Haihan-Jiang wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
Haihan-Jiang:codex/kubectl-ai-azure-deployment-name

Conversation

@Haihan-Jiang
Copy link
Copy Markdown

Summary

  • normalize Azure OpenAI deployment names when the model is passed as azure/<deployment> or azopenai/<deployment>
  • use the normalized deployment name for chat and completion requests
  • add unit coverage for plain and prefixed deployment names

Why

With the azopenai provider, a model value such as azure/gpt-4.1 was passed directly to the Azure SDK as the deployment name. That makes the request path include /deployments/azure/gpt-4.1/..., which Azure reports as DeploymentNotFound.

Fixes #604.

Tests

  • go test -run '^TestAzureOpenAIDeploymentName$' -count=1 -timeout=30s .\n- go test -run '^$' -count=1 -timeout=30s .\n- git diff --check\n

@Haihan-Jiang Haihan-Jiang marked this pull request as ready for review May 30, 2026 00:45
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.

[Bug]: DeploymentNotFound error using Azure OpenAI integration

1 participant