Model selection

⚠️ CodeSpeak is in Alpha Preview: many things are rough around the edges. Please use at your own risk and report any issues to our Discord. Thank you!

CodeSpeak uses Anthropic's models for code generation and other tasks. By default, it uses the sonnet model, which is optimized for cost/effectiveness. However, you can configure which model(s) CodeSpeak uses through environment variables, for example:

CODESPEAK_ANTHROPIC_STANDARD_MODEL=claude-opus-4-6 codespeak build

The following variables control model selection for different roles:

Environment variableUse caseDefault
CODESPEAK_ANTHROPIC_STANDARD_MODELCode generation (build, impl, change)latest Sonnet
CODESPEAK_ANTHROPIC_FAST_MODELFast tasks (Claude Code mode, LLM judge)latest Haiku
CODESPEAK_ANTHROPIC_GENERAL_CONVERSATION_MODELInteractive conversationSame as standard model
CODESPEAK_ANTHROPIC_LLM_JUDGE_MODELLLM-as-judge evaluationsSame as fast model

If only CODESPEAK_ANTHROPIC_STANDARD_MODEL is set, it applies to all use cases that default to it. The fast and judge models fall back independently.

Alternative model providers

⚠️ Support for alternative model providers is experimental. Please use at your own risk and report any issues to our Discord. Thank you!

CodeSpeak lets you configure Anthropic-compatible model providers. Set the ANTHROPIC_BASE_URL environment variable:

export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"
export ANTHROPIC_API_KEY="your-zai-api-key"

Make sure your API key configuration is not interfering — alternative providers use their own keys. Set ANTHROPIC_API_KEY to the alternative provider's key. Make sure that your .env.local or other config files don't have conflicting keys.

The following providers are currently supported (in experimental mode):

ProviderBase URL
Z.aihttps://api.z.ai/api/anthropic
Moonshot AIhttps://api.moonshot.ai/anthropic
MiniMaxhttps://api.minimax.io/anthropic
DeepSeekhttps://api.deepseek.com/anthropic
Alibaba Cloud (DashScope)https://dashscope-intl.aliyuncs.com/apps/anthropic
OpenRouterhttps://openrouter.ai/api

If your preferred provider is not listed, feel free to contact us on Discord.