Skip to content

Conversation

@timothyjlaurent
Copy link

@timothyjlaurent timothyjlaurent commented Feb 12, 2026

Summary

  • Add azure_anthropic backend for running Anthropic models (Claude) hosted on Azure AI Foundry
  • New AzureAnthropicClient that passes base_url derived from resource name to the Anthropic SDK
  • Register backend in get_client() router and ClientBackend type

Environment Variables

Follows the ANTHROPIC_FOUNDRY_* convention used by Claude Code:

Variable Purpose
ANTHROPIC_FOUNDRY_API_KEY API key
ANTHROPIC_FOUNDRY_RESOURCE Azure resource name (derives https://{resource}.services.ai.azure.com)
ANTHROPIC_FOUNDRY_BASE_URL Explicit base URL (overrides resource)

Usage

export ANTHROPIC_FOUNDRY_API_KEY="your-key"
export ANTHROPIC_FOUNDRY_RESOURCE="ml-platform-openai-stg-useast-2"

rlm ask . -q "Summarize this repo" --backend azure_anthropic --model claude-opus-4-6

Test plan

  • 24 unit tests passing (URL resolution, init, env vars, message prep, completion, async, routing)
  • End-to-end test with a live Azure Foundry endpoint

Closes #100

🤖 Generated with Claude Code

…undry

Add an `azure_anthropic` backend that routes Anthropic API calls through
Azure AI Foundry endpoints. Follows the ANTHROPIC_FOUNDRY_* env var
convention used by Claude Code:

  ANTHROPIC_FOUNDRY_API_KEY      - API key
  ANTHROPIC_FOUNDRY_RESOURCE     - Azure resource name (derives base URL)
  ANTHROPIC_FOUNDRY_BASE_URL     - Explicit endpoint (resource- or project-scoped)

The /anthropic/v1 path suffix is appended automatically. Both resource-level
and project-scoped Foundry endpoints are supported.

Includes 27 unit tests covering URL resolution, initialization, env var
fallback, message preparation, sync/async completion, usage tracking,
and get_client router integration.

Closes alexzhang13#100

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@timothyjlaurent timothyjlaurent force-pushed the feat/azure-anthropic-backend branch from 65161b6 to 0fac7ca Compare February 12, 2026 01:19
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.

Add azure_anthropic backend for Anthropic models on Azure AI Foundry

1 participant