createAI: Azure OpenAI v1 URLs (the @ai-sdk/azure default) are not routed
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend-api-design
Research direction
Start in packages/agents/src/models/core/gateway-providers.ts and read azureEndpoint alongside the Azure provider URL mapping described in cloudflare/ai#604. Check how /openai/v1/responses should map and how other v1 paths are handled. Done means default @ai-sdk/azure v1 URLs route as intended, unmatched paths remain unmatched, and the error gives the useDeploymentBasedUrls: true guidance when appropriate.
Written by the indexing model from the issue text.
Description
@ai-sdk/azure builds v1 URLs by default (useDeploymentBasedUrls: false), e.g. https://<resource>.openai.azure.com/openai/v1/responses. createAI only maps the deployment form (/openai/deployments/<d>/...), so a default Azure model can't be routed:
const azure = createAzure({ resourceName: "acme" });
const ai = createAI({ binding: env.AI, id: "gw" });
await generateText({ model: ai(azure("gpt-5")), prompt });
// TypeError: AI Gateway has no provider for acme.openai.azure.com. ... the supported providers are ..., azure-openai, ...
azureEndpoint in packages/agents/src/models/core/gateway-providers.ts returns undefined for anything but the deployment path, and the error then claims the host itself is unsupported while listing azure-openai. cloudflare/ai#604 maps /openai/v1/responses to the gateway's <resource>/openai/responses endpoint and leaves other v1 paths unmatched. At minimum the error should say to use useDeploymentBasedUrls: true.
From cloudflare/ai#604.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 788
- Avg merge
- 21h 59m
- Merged PRs (30d)
- 175
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudflare/agents
-
createAI: the ai peer range allows ai@6, which the provider cannot work withPossibly taken @akhil9tiet claimed this 1 day ago. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 83/100
cloudflare/agents#2690 · 3 comments ·
Maintainers usually reply within 1 day
-
createAI: text-only user content is joined with no separator, which glues parts together and breaks code fencesPossibly taken @akhil9tiet claimed this 1 day ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cloudflare/agents#2682 · 1 comment ·
Maintainers usually reply within 1 day
-
Think docs: the dependency table lists ai as v6, but think requires ai@^7Possibly taken @mattzcarey claimed this 1 day ago. Openbug priority: low
Difficulty 1/5 Under an hour Newbie friendliness 88/100
cloudflare/agents#2647 · 2 comments · 2 reactions · 1 assignee ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
cloudflare/agents#2645 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cloudflare/agents#2635 · 1 comment ·
Maintainers usually reply within 1 day
All issues in cloudflare/agents
Similar issues
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixPossibly taken @ItsDeadlyProgrammer claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
appsmithorg/appsmith#42471 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ehmpathy/rhachet-roles-bhrain#705 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Status: Triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mermaid-js/mermaid#8546 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
braintrustdata/braintrust-sdk-javascript#2659 ·
Maintainers usually reply within 1 day