Skip to content

feat: add Azure AI Foundry support to Anthropic provider#9941

Closed
roomote-v0[bot] wants to merge 1 commit intomainfrom
feat/azure-foundry-anthropic-support
Closed

feat: add Azure AI Foundry support to Anthropic provider#9941
roomote-v0[bot] wants to merge 1 commit intomainfrom
feat/azure-foundry-anthropic-support

Conversation

@roomote-v0
Copy link
Copy Markdown
Contributor

@roomote-v0 roomote-v0 bot commented Dec 9, 2025

This PR attempts to address Issue #9940. Feedback and guidance are welcome!

Summary

This PR adds first-class Azure AI Foundry support to the Anthropic provider, allowing users to use Claude models deployed on Azure AI Foundry with custom deployment names.

Changes

  • Added new configuration options to ProviderSettings:

    • anthropicUseAzureFoundry: Enable Azure AI Foundry mode
    • anthropicAzureDeploymentName: Override model ID with Azure deployment name
  • Updated AnthropicHandler to:

    • Use the Azure deployment name as the model ID when Azure Foundry mode is enabled
    • Maintain model capabilities and pricing info while using custom deployment names
    • Support both regular Anthropic API and Azure Foundry endpoints
  • Added comprehensive tests for Azure Foundry functionality

How it works

When Azure Foundry mode is enabled and a deployment name is provided:

  1. The handler uses the deployment name as the model ID in API requests
  2. Model capabilities (context window, max tokens, etc.) are preserved from the selected model
  3. The existing anthropicBaseUrl and anthropicUseAuthToken options handle the Azure endpoint and authentication

Example configuration

For Azure AI Foundry with Claude Opus 4.5:

  • Provider: Anthropic
  • ✅ Use custom base URL: https://my-resource.services.ai.azure.com/anthropic
  • ✅ Use Azure AI Foundry: enabled
  • ✅ Use auth token for API key: enabled (sends as x-api-key)
  • API key: [Azure Foundry API key]
  • Azure Deployment Name: claude-opus-4-5
  • Model: Select any Claude model (will be overridden by deployment name)

Testing

  • All existing Anthropic provider tests pass
  • Added new test suite specifically for Azure Foundry functionality
  • Tests cover deployment name override, auth token usage, and various model configurations

Fixes #9940

- Add anthropicUseAzureFoundry and anthropicAzureDeploymentName settings
- Allow overriding model ID with Azure deployment name
- Maintain model capabilities while using custom deployment names
- Add comprehensive tests for Azure Foundry functionality

Fixes #9940
@roomote-v0
Copy link
Copy Markdown
Contributor Author

roomote-v0 bot commented Dec 9, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

  • Provider settings schema changes
  • AnthropicHandler Azure Foundry logic
  • Test coverage

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 9, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jan 7, 2026
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] First-class Azure AI Foundry support in Anthropic provide

2 participants