mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-03-17 10:53:09 +00:00
feat: add Azure Anthropic (Claude) provider support
- Add "Azure Anthropic (Claude)" to API_PROVIDERS in registry.py with ANTHROPIC_API_KEY auth (required for Claude CLI to route through custom base URL instead of default Anthropic endpoint) - Add Azure env var template to .env.example - Show Base URL input field for Azure provider in Settings UI with "Configured" state and Azure-specific placeholder - Widen Settings modal for better readability with long URLs - Add Azure endpoint detection and "Azure Mode" log label - Rename misleading "GLM Mode" fallback label to "Alternative API" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -463,6 +463,7 @@ def create_client(
|
||||
is_vertex = sdk_env.get("CLAUDE_CODE_USE_VERTEX") == "1"
|
||||
is_alternative_api = bool(base_url) or is_vertex
|
||||
is_ollama = "localhost:11434" in base_url or "127.0.0.1:11434" in base_url
|
||||
is_azure = "services.ai.azure.com" in base_url
|
||||
model = convert_model_for_vertex(model)
|
||||
if sdk_env:
|
||||
print(f" - API overrides: {', '.join(sdk_env.keys())}")
|
||||
@@ -472,8 +473,10 @@ def create_client(
|
||||
print(f" - Vertex AI Mode: Using GCP project '{project_id}' with model '{model}' in region '{region}'")
|
||||
elif is_ollama:
|
||||
print(" - Ollama Mode: Using local models")
|
||||
elif is_azure:
|
||||
print(f" - Azure Mode: Using {base_url}")
|
||||
elif "ANTHROPIC_BASE_URL" in sdk_env:
|
||||
print(f" - GLM Mode: Using {sdk_env['ANTHROPIC_BASE_URL']}")
|
||||
print(f" - Alternative API: Using {sdk_env['ANTHROPIC_BASE_URL']}")
|
||||
|
||||
# Create a wrapper for bash_security_hook that passes project_dir via context
|
||||
async def bash_hook_with_context(input_data, tool_use_id=None, context=None):
|
||||
|
||||
Reference in New Issue
Block a user