feat: add Azure AI Foundry support for Anthropic#11312
feat: add Azure AI Foundry support for Anthropic#11312maxruby wants to merge 1 commit intoRooCodeInc:mainfrom
Conversation
Found 3 issues to address before merging:
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| const apiKeyFieldName = | ||
| this.options.anthropicBaseUrl && this.options.anthropicUseAuthToken ? "authToken" : "apiKey" | ||
| const messagesUrlOverride = this.getAnthropicMessagesUrlOverride() | ||
| const useAzureAiFoundry = this.options.anthropicEndpointMode === "azure-ai-foundry" || !!messagesUrlOverride |
There was a problem hiding this comment.
Bug: if a user explicitly sets anthropicEndpointMode to "anthropic" but has a leftover anthropicMessagesUrlOverride value (e.g. from previously using Azure AI Foundry mode), the || !!messagesUrlOverride condition still forces Foundry mode. The explicit mode setting is ignored. The UI also doesn't clear anthropicMessagesUrlOverride when switching back to Anthropic mode, so this scenario is easy to trigger. The auto-detection fallback should only apply when anthropicEndpointMode is unset, not when it's explicitly "anthropic".
| const useAzureAiFoundry = this.options.anthropicEndpointMode === "azure-ai-foundry" || !!messagesUrlOverride | |
| const useAzureAiFoundry = this.options.anthropicEndpointMode === "azure-ai-foundry" || (this.options.anthropicEndpointMode == null && !!messagesUrlOverride) |
Fix it with Roo Code or mention @roomote and request a fix.
| "description": "%extension.description%", | ||
| "publisher": "RooVeterinaryInc", | ||
| "version": "3.47.3", | ||
| "version": "3.47.3-maxruby.1", |
There was a problem hiding this comment.
This pre-release version tag (3.47.3-maxruby.1) should be reverted before merging. It will break the release pipeline and misidentify the extension version.
| "version": "3.47.3-maxruby.1", | |
| "version": "3.47.3", |
Fix it with Roo Code or mention @roomote and request a fix.
| </VSCodeButtonLink> | ||
| )} | ||
| <div className="flex flex-col gap-1"> | ||
| <label className="block font-medium mb-1">Endpoint Mode</label> |
There was a problem hiding this comment.
This file has several hardcoded English strings ("Endpoint Mode", "Anthropic (default)", "Azure AI Foundry (Anthropic-compatible)", "Messages Endpoint URL", "Deployment Name (Model Override)", "Auth Header") while the rest of the component uses t() for i18n. These should be added to the translation files and referenced via the translation function for consistency.
Fix it with Roo Code or mention @roomote and request a fix.
Related GitHub Issue
Closes: #
Roo Code Task Context (Optional)
Description
Test Procedure
Pre-Submission Checklist
Screenshots / Videos
Documentation Updates
Additional Notes
Get in Touch
Important
Add Azure AI Foundry support to Anthropic integration with new configuration options and tests.
AnthropicHandlerwith new optionsanthropicEndpointMode,anthropicMessagesUrlOverride, andanthropicAuthHeaderMode.createMessageandcompletePromptto handle Azure AI Foundry requests.anthropicMessagesUrlOverridein Foundry mode.provider-settings.tsto include new schema fields foranthropicEndpointMode,anthropicMessagesUrlOverride, andanthropicAuthHeaderMode.Anthropic.tsxto include UI elements for configuring Azure AI Foundry settings.anthropic.spec.tsfor Azure AI Foundry mode, including URL override and auth header selection.openai.spec.tsto ensure compatibility with Azure AI Foundry endpoints.3.47.3-maxruby.1inpackage.json.This description was created by
for cd0ab10. You can customize this summary. It will automatically update as commits are pushed.