mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-03-17 19:03:09 +00:00
When users configured GLM/Ollama/Kimi via the Settings UI, agents still used Claude because conflicting env vars leaked through subprocess env. Root cause: get_effective_sdk_env() set ANTHROPIC_AUTH_TOKEN for GLM but didn't clear ANTHROPIC_API_KEY, which leaked from os.environ. The CLI prioritized the wrong credential. Changes: - registry.py: Clear conflicting auth vars (API_KEY vs AUTH_TOKEN) and Vertex AI vars when building env for alternative providers - client.py: Replace manual os.getenv() loop with get_effective_sdk_env() so agent SDK reads provider settings from the database - autonomous_agent_demo.py: Apply UI-configured provider settings to process env so CLI-launched agents also respect Settings UI config - start.py: Pass --model from settings when launching agent subprocess - server/schemas.py: Allow non-Claude model names when an alternative provider is configured (prevents 422 errors for glm-4.7, etc.) - .env.example: Document env vars for GLM, Ollama, and Kimi providers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
57 lines
2.2 KiB
Plaintext
57 lines
2.2 KiB
Plaintext
# Optional: N8N webhook for progress notifications
|
|
# PROGRESS_N8N_WEBHOOK_URL=https://your-n8n-instance.com/webhook/...
|
|
|
|
# Playwright Browser Configuration
|
|
#
|
|
# PLAYWRIGHT_BROWSER: Which browser to use for testing
|
|
# - firefox: Lower CPU usage, recommended (default)
|
|
# - chrome: Google Chrome
|
|
# - webkit: Safari engine
|
|
# - msedge: Microsoft Edge
|
|
# PLAYWRIGHT_BROWSER=firefox
|
|
|
|
# Extra Read Paths (Optional)
|
|
# Comma-separated list of absolute paths for read-only access to external directories.
|
|
# The agent can read files from these paths but cannot write to them.
|
|
# Useful for referencing documentation, shared libraries, or other projects.
|
|
# Example: EXTRA_READ_PATHS=/Volumes/Data/dev,/Users/shared/libs
|
|
# EXTRA_READ_PATHS=
|
|
|
|
# Google Cloud Vertex AI Configuration (Optional)
|
|
# To use Claude via Vertex AI on Google Cloud Platform, uncomment and set these variables.
|
|
# Requires: gcloud CLI installed and authenticated (run: gcloud auth application-default login)
|
|
# Note: Use @ instead of - in model names for date-suffixed models (e.g., claude-sonnet-4-5@20250929)
|
|
#
|
|
# CLAUDE_CODE_USE_VERTEX=1
|
|
# CLOUD_ML_REGION=us-east5
|
|
# ANTHROPIC_VERTEX_PROJECT_ID=your-gcp-project-id
|
|
# ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-6
|
|
# ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4-5@20250929
|
|
# ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-3-5-haiku@20241022
|
|
|
|
# ===================
|
|
# Alternative API Providers (GLM, Ollama, Kimi, Custom)
|
|
# ===================
|
|
# Configure via Settings UI (recommended) or set env vars below.
|
|
# When both are set, env vars take precedence.
|
|
#
|
|
# GLM (Zhipu AI):
|
|
# ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic
|
|
# ANTHROPIC_AUTH_TOKEN=your-glm-api-key
|
|
# ANTHROPIC_DEFAULT_OPUS_MODEL=glm-4.7
|
|
# ANTHROPIC_DEFAULT_SONNET_MODEL=glm-4.7
|
|
# ANTHROPIC_DEFAULT_HAIKU_MODEL=glm-4.7
|
|
#
|
|
# Ollama (Local):
|
|
# ANTHROPIC_BASE_URL=http://localhost:11434
|
|
# ANTHROPIC_DEFAULT_OPUS_MODEL=qwen3-coder
|
|
# ANTHROPIC_DEFAULT_SONNET_MODEL=qwen3-coder
|
|
# ANTHROPIC_DEFAULT_HAIKU_MODEL=qwen3-coder
|
|
#
|
|
# Kimi (Moonshot):
|
|
# ANTHROPIC_BASE_URL=https://api.kimi.com/coding/
|
|
# ANTHROPIC_API_KEY=your-kimi-api-key
|
|
# ANTHROPIC_DEFAULT_OPUS_MODEL=kimi-k2.5
|
|
# ANTHROPIC_DEFAULT_SONNET_MODEL=kimi-k2.5
|
|
# ANTHROPIC_DEFAULT_HAIKU_MODEL=kimi-k2.5
|