Skip to content

Environment Variables

Shannon reads configuration from environment variables (which always take precedence over saved config files). Set them in your shell with export, or in a .env file in source-build mode.

VariableDescription
ANTHROPIC_API_KEYAnthropic API key. Recommended provider for most users.
CLAUDE_CODE_OAUTH_TOKENOAuth token to authenticate instead of ANTHROPIC_API_KEY.
CLAUDE_CODE_MAX_OUTPUT_TOKENSMaximum output tokens (e.g. 64000).
CLAUDE_ADAPTIVE_THINKINGSet to false to disable adaptive thinking (enabled automatically on Opus 4.6/4.7/4.8).

Point each tier at a specific model. Values depend on the provider (plain model IDs for Anthropic, Bedrock IDs for Bedrock, Vertex IDs for Vertex).

VariableTierUsed for
ANTHROPIC_SMALL_MODELsmallSummarization
ANTHROPIC_MEDIUM_MODELmediumSecurity analysis
ANTHROPIC_LARGE_MODELlargeDeep reasoning

Defaults when unset (direct Anthropic): small claude-haiku-4-5-20251001, medium claude-sonnet-4-6, large claude-opus-4-8. Bedrock and Vertex require these to be set explicitly with provider-specific model IDs.

VariableDescription
CLAUDE_CODE_USE_BEDROCKSet to 1 to use Bedrock.
AWS_REGIONAWS region, e.g. us-east-1.
AWS_BEARER_TOKEN_BEDROCKBedrock bearer token.
VariableDescription
CLAUDE_CODE_USE_VERTEXSet to 1 to use Vertex AI.
CLOUD_ML_REGIONRegion, e.g. us-east5, or global.
ANTHROPIC_VERTEX_PROJECT_IDGCP project ID.
GOOGLE_APPLICATION_CREDENTIALSPath to the service account JSON key file.
VariableDescription
ANTHROPIC_BASE_URLAnthropic-compatible endpoint URL.
ANTHROPIC_AUTH_TOKENAuth token for the custom endpoint.
VariableDescription
SHANNON_FORWARD_HOSTSSet to false to disable forwarding /etc/hosts custom hostnames into the worker.

See AI Providers for full setup sequences and Platforms & Networking for networking details.