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
SHANNON_AI_MODELThe provider and model for the whole scan, as <provider>:<model-id>. Default: anthropic:claude-sonnet-4-6.
SHANNON_AI_API_KEYKey for the provider that SHANNON_AI_MODEL names, or the gateway’s key when a base URL is set.
SHANNON_AI_BASE_URLOptional proxy or LLM gateway endpoint. It changes only where requests go.
ANTHROPIC_API_KEY, OPENAI_API_KEY, XAI_API_KEYNative alternatives. When the selected provider’s variable is set, it is used instead of SHANNON_AI_API_KEY.
CLAUDE_CODE_OAUTH_TOKENOAuth token accepted by the Anthropic provider.

A model the catalogue does not carry, including a local one, is described in a file passed with the --models-config flag rather than through an environment variable. See Custom model configuration.

Select Bedrock with SHANNON_AI_MODEL=amazon-bedrock:<model-id>. Bedrock uses bearer-token authentication only.

VariableDescription
AWS_REGIONAWS region, e.g. us-east-1.
AWS_BEARER_TOKEN_BEDROCKBedrock bearer token.
VariableDescription
SHANNON_USE_PI_AUTHSet to 1 to reuse a Pi login for a ChatGPT Plus or Pro (Codex) or xAI (Grok) subscription.
VariableDescription
SHANNON_FORWARD_HOSTSSet to false to disable forwarding /etc/hosts custom hostnames into the worker.

These no longer do anything. See Upgrading from earlier versions.

RemovedReplacement
SHANNON_AI_OPENAI_FORMAT (removed in 3.1)None. An openai: model with a base URL always speaks OpenAI Responses.
ANTHROPIC_SMALL_MODEL, ANTHROPIC_MEDIUM_MODEL, ANTHROPIC_LARGE_MODELA single SHANNON_AI_MODEL.
CLAUDE_CODE_USE_BEDROCKSHANNON_AI_MODEL=amazon-bedrock:<model-id>.
ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKENSHANNON_AI_BASE_URL.
CLAUDE_CODE_USE_VERTEX, CLOUD_ML_REGION, ANTHROPIC_VERTEX_PROJECT, GOOGLE_APPLICATION_CREDENTIALSNone. Vertex AI is no longer supported; use Anthropic, Bedrock, or a custom base URL.
CLAUDE_CODE_MAX_OUTPUT_TOKENS, CLAUDE_ADAPTIVE_THINKINGNone.

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