[FEATURE]: Azure OpenAI Cognitive Services support #2866

Closed
opened 2026-02-16 17:37:36 -05:00 by yindo · 6 comments
Owner

Originally created by @PanAchy on GitHub (Nov 14, 2025).

Originally assigned to: @rekram1-node on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

At this time, Azure OpenAI has a different endpoint format for certain models.
Typically, it looks like these for models like gpt-4.1-mini: https://RESOURCENAME.openai.azure.com/openai/v1
For models that are in an experimental phase, like GPT-5 and GPT-5-Codex, which actually requires you to sign up for access, the endpoint looks like this: https://RESOURCENAME.cognitiveservices.azure.com/openai/v1

Important note: the openai.azure.com based models have a different API key than the cognitiveservices.azure.com based models, which means that this would need to be integrated into the opencode auth login process to manage the two keys, either by asking for an additional optional key for the Azure option, or adding an Azure Cognitive Services option, or whatever else you thing makes sense.

Can we add support for this?

Originally created by @PanAchy on GitHub (Nov 14, 2025). Originally assigned to: @rekram1-node on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request At this time, Azure OpenAI has a different endpoint format for certain models. Typically, it looks like these for models like **gpt-4.1-mini**: _https://RESOURCENAME.openai.azure.com/openai/v1_ For models that are in an experimental phase, like GPT-5 and GPT-5-Codex, which actually requires you to sign up for access, the endpoint looks like this: _https://RESOURCENAME.cognitiveservices.azure.com/openai/v1_ Important note: the _openai.azure.com_ based models have a different API key than the _cognitiveservices.azure.com_ based models, which means that this would need to be integrated into the opencode auth login process to manage the two keys, either by asking for an additional optional key for the Azure option, or adding an Azure Cognitive Services option, or whatever else you thing makes sense. Can we add support for this?
yindo added the help-wanteddiscussion labels 2026-02-16 17:37:36 -05:00
yindo closed this issue 2026-02-16 17:37:36 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 14, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #1508: Addresses Azure OpenAI URL formatting problems, specifically about incorrect /v1/ addition to Azure endpoints
  • #4136: About setting up OpenCode with Azure AI Foundry (OpenAI) projects, which involves similar Azure OpenAI configuration challenges
  • #3168: Broader feature request for custom endpoint support that would encompass the Azure Cognitive Services endpoint format you're requesting

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 14, 2025): This issue might be a duplicate of existing issues. Please check: - #1508: Addresses Azure OpenAI URL formatting problems, specifically about incorrect /v1/ addition to Azure endpoints - #4136: About setting up OpenCode with Azure AI Foundry (OpenAI) projects, which involves similar Azure OpenAI configuration challenges - #3168: Broader feature request for custom endpoint support that would encompass the Azure Cognitive Services endpoint format you're requesting Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Nov 14, 2025):

Yeah we definitely can I wonder if the ai-sdk/azure package already has support, if so we prolly just need to document how to use in opencode

@rekram1-node commented on GitHub (Nov 14, 2025): Yeah we definitely can I wonder if the ai-sdk/azure package already has support, if so we prolly just need to document how to use in opencode
Author
Owner

@rekram1-node commented on GitHub (Nov 14, 2025):

having a second option would prolly be best given they have separate keys

@rekram1-node commented on GitHub (Nov 14, 2025): having a second option would prolly be best given they have separate keys
Author
Owner

@rekram1-node commented on GitHub (Nov 14, 2025):

Ill take a look into this but if anyone wants to help out here it'd be much appreciated

@rekram1-node commented on GitHub (Nov 14, 2025): Ill take a look into this but if anyone wants to help out here it'd be much appreciated
Author
Owner

@PanAchy commented on GitHub (Nov 14, 2025):

I can give it a try @rekram1-node ! I've been looking for opportunities to contribute to this great tool :)

@PanAchy commented on GitHub (Nov 14, 2025): I can give it a try @rekram1-node ! I've been looking for opportunities to contribute to this great tool :)
Author
Owner

@rekram1-node commented on GitHub (Nov 14, 2025):

Sure thing i'd appreciate it!

@rekram1-node commented on GitHub (Nov 14, 2025): Sure thing i'd appreciate it!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2866