๐ Providers & Model Configuration
Back to Guides
Providersโ
Note
Voice transcription can use a configured multimodal model via voice.model_name. Groq Whisper remains available as a fallback when no voice model is configured.
| Provider | Purpose | Get API Key |
|---|---|---|
gemini | LLM (Gemini direct) | aistudio.google.com |
zhipu | LLM (Zhipu direct) | bigmodel.cn |
zai | LLM (Z.AI Coding Plan) | z.ai |
volcengine | LLM(Volcengine direct) | volcengine.com |
openrouter | LLM (recommended, access to all models) | openrouter.ai |
anthropic | LLM (Claude direct) | console.anthropic.com |
openai | LLM (GPT direct) | platform.openai.com |
venice | LLM (Venice AI direct) | venice.ai |
nearai | LLM (NEAR AI Cloud TEE inference) | near.ai |
deepseek | LLM (DeepSeek direct) | platform.deepseek.com |
qwen | LLM (Qwen direct) | dashscope.console.aliyun.com |
groq | LLM + Voice transcription (Whisper) | console.groq.com |
cerebras | LLM (Cerebras direct) | cerebras.ai |
vivgrid | LLM (Vivgrid direct) | vivgrid.com |
nvidia | LLM (NVIDIA NIM) | build.nvidia.com |
moonshot | LLM (Kimi/Moonshot direct) | platform.moonshot.cn |
minimax | LLM (Minimax direct) | platform.minimaxi.com |
avian | LLM (Avian direct) | avian.io |
mistral | LLM (Mistral direct) | console.mistral.ai |
longcat | LLM (Longcat direct) | longcat.ai |
modelscope | LLM (ModelScope direct) | modelscope.cn |
mimo | LLM (Xiaomi MiMo direct) | platform.xiaomimimo.com |
Model Configuration (model_list)โ
What's New? PicoClaw now prefers explicit
provider+ nativemodelconfiguration (for example"provider": "zhipu", "model": "glm-4.7"). The legacy single-fieldprovider/modelform remains supported for compatibility whenprovideris omitted.
For agent dispatch and light-model routing examples, see the Routing Guide.
This design also enables multi-agent support with flexible provider selection:
- Different agents, different providers: Each agent can use its own LLM provider
- Model fallbacks: Configure primary and fallback models for resilience
- Load balancing: Distribute requests across multiple endpoints
- Centralized configuration: Manage all providers in one place
๐ All Supported Vendorsโ
| Vendor | provider Value | Default API Base | Protocol | API Key |
|---|---|---|---|---|
| OpenAI | openai | https://api.openai.com/v1 | OpenAI | Get Key |
| Venice AI | venice | https://api.venice.ai/api/v1 | OpenAI | Get Key |
| NEAR AI Cloud | nearai | https://cloud-api.near.ai/v1 | OpenAI | Get Key |
| Anthropic | anthropic | https://api.anthropic.com/v1 | Anthropic | Get Key |
| ๆบ่ฐฑ AI (GLM) | zhipu | https://open.bigmodel.cn/api/paas/v4 | OpenAI | Get Key |
| Z.AI Coding Plan | zai | https://api.z.ai/api/coding/paas/v4 | OpenAI | Get Key |
| DeepSeek | deepseek | https://api.deepseek.com/v1 | OpenAI | Get Key |
| Google Gemini | gemini | https://generativelanguage.googleapis.com/v1beta | Gemini | Get Key |
| Groq | groq | https://api.groq.com/openai/v1 | OpenAI | Get Key |
| Moonshot | moonshot | https://api.moonshot.cn/v1 | OpenAI | Get Key |
| ้ไนๅ้ฎ (Qwen) | qwen | https://dashscope.aliyuncs.com/compatible-mode/v1 | OpenAI | Get Key (China endpoint) |
| Qwen International | qwen-intl | https://dashscope-intl.aliyuncs.com/compatible-mode/v1 | OpenAI | Get Key |
| Qwen US | qwen-us | https://dashscope-us.aliyuncs.com/compatible-mode/v1 | OpenAI | Get Key |
| NVIDIA | nvidia | https://integrate.api.nvidia.com/v1 | OpenAI | Get Key |
| Ollama | ollama | http://localhost:11434/v1 | OpenAI | Local (no key needed) |
| LM Studio | lmstudio | http://localhost:1234/v1 | OpenAI | Optional (local default: no key) |
| OpenRouter | openrouter | https://openrouter.ai/api/v1 | OpenAI | Get Key |
| LiteLLM Proxy | litellm | http://localhost:4000/v1 | OpenAI | Your LiteLLM proxy key |
| VLLM | vllm | http://localhost:8000/v1 | OpenAI | Local |
| GPT4Free | gpt4free | http://localhost:1337/v1 | OpenAI | Local (no key needed); alias: g4f |
| Cerebras | cerebras | https://api.cerebras.ai/v1 | OpenAI | Get Key |
| VolcEngine (Doubao) | volcengine | https://ark.cn-beijing.volces.com/api/v3 | OpenAI | Get Key |
| ็ฅ็ฎไบ | shengsuanyun | https://router.shengsuanyun.com/api/v1 | OpenAI | - |
| SiliconFlow | siliconflow | https://api.siliconflow.cn/v1 | OpenAI | Get Key |
| BytePlus | byteplus | https://ark.ap-southeast.bytepluses.com/api/v3 | OpenAI | Get Key |
| Vivgrid | vivgrid | https://api.vivgrid.com/v1 | OpenAI | Get Key |
| LongCat | longcat | https://api.longcat.chat/openai | OpenAI | Get Key |
| ModelScope (้ญๆญ) | modelscope | https://api-inference.modelscope.cn/v1 | OpenAI | Get Token |
| Xiaomi MiMo | mimo | https://api.xiaomimimo.com/v1 | OpenAI | Get Key |
| MiniMax | minimax | https://api.minimaxi.com/v1 | OpenAI | Get Key |
| Mistral AI | mistral | https://api.mistral.ai/v1 | OpenAI | Get Key |
| Avian | avian | https://api.avian.io/v1 | OpenAI | Get Key |
| Novita AI | novita | https://api.novita.ai/openai | OpenAI | Get Key |
| ElevenLabs ASR | elevenlabs | https://api.elevenlabs.io | ASR only | Get Key (voice transcription, not a chat model) |
| Alibaba Coding Plan | alibaba-coding | https://coding-intl.dashscope.aliyuncs.com/v1 | OpenAI | Get Key |
| Alibaba Coding Plan (Anthropic) | alibaba-coding-anthropic | https://coding-intl.dashscope.aliyuncs.com/apps/anthropic | Anthropic Messages | Get Key |
| AWS Bedrock | bedrock | (endpoint from region or env) | Bedrock Converse | AWS SDK credentials (no api_key needed) |
| Azure OpenAI | azure | https://{resource}.openai.azure.com | Azure | Get Key or keyless (Managed Identity / Entra ID) |
| Claude CLI | claude-cli | (local CLI binary) | CLI | No API key; uses Claude CLI auth (alias: claudecli) |
| Codex CLI | codex-cli | (local CLI binary) | CLI | No API key; uses Codex CLI auth (alias: codexcli) |
| Antigravity | antigravity | Google Cloud | Custom | OAuth only |
| GitHub Copilot | github-copilot | localhost:4321 | gRPC | - |
| OpenCode Go | opencode-go | https://opencode.ai/inference/go | Multi | Get Key |
Qwen regional endpoints:
qwen(aliasqwen-portal) targets the China DashScope endpoint and is the default. Outside China useqwen-intl(international) orqwen-us(US) to avoid connectivity issues. All three accept the same API key.
AWS Bedrock note: Bedrock support requires the
bedrockbuild tag:go build -tags bedrock. Without it the provider returns an error at runtime. Credentials come from the AWS SDK default chain (env vars such asAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY,~/.aws/credentialsprofiles, or IAM instance/task roles). Noapi_keyfield is used.
Basic Configurationโ
{
"model_list": [
{
"model_name": "ark-code-latest",
"provider": "volcengine",
"model": "ark-code-latest",
"api_keys": ["sk-your-api-key"]
},
{
"model_name": "gpt-5.4",
"provider": "openai",
"model": "gpt-5.4",
"api_keys": ["sk-your-openai-key"]
},
{
"model_name": "claude-sonnet-4.6",
"provider": "anthropic",
"model": "claude-sonnet-4.6",
"api_keys": ["sk-ant-your-key"]
},
{
"model_name": "glm-4.7",
"provider": "zhipu",
"model": "glm-4.7",
"api_keys": ["your-zhipu-key"]
}
],
"agents": {
"defaults": {
"model_name": "gpt-5.4"
}
}
}
model_list Entry Fieldsโ
| Field | Type | Required | Description |
|---|---|---|---|
model_name | string | Yes | Unique name used to reference this model in agent config |
provider | string | No | Preferred provider identifier. When present, PicoClaw sends model unchanged to that provider |
model | string | Yes | Native model ID when provider is set. If provider is omitted, the legacy provider/model form is still supported |
api_keys | string[] | Yes* | API key(s) for authentication. Multiple keys enable per-request rotation. Not required for local providers (Ollama, LM Studio, VLLM) |
api_base | string | No | Override the default API endpoint URL. For bedrock: a value containing :// is a full endpoint URL; otherwise treated as a region name (e.g. us-east-1). |
proxy | string | No | HTTP proxy URL for this model entry |
auth_method | string | No | Authentication method: oauth or token. Used by openai (Codex OAuth) and anthropic (Claude OAuth) to authenticate via the PicoClaw auth store instead of an API key. |
connect_mode | string | No | Connection mode for github-copilot: grpc (default) or stdio. |
workspace | string | No | Working directory for CLI-based providers (claude-cli, codex-cli). Defaults to . (current directory). |
user_agent | string | No | Custom User-Agent header sent with API requests (supported by OpenAI-compatible, Gemini, Anthropic, and Azure providers) |
session_header | string | No | HTTP header name that carries a stable per-conversation session ID. Supported by OpenAI-compatible, OpenAI Responses, Anthropic Messages, and OpenCode Go providers; other providers log a warning and ignore it. Leave empty to disable. |
request_timeout | int | No | Request timeout in seconds (default varies by provider) |
provider_sort | string | No | OpenRouter provider routing preference: price, throughput, or latency. Ignored by other providers. Leave empty to use OpenRouter's default routing. |
max_tokens_field | string | No | Override the max tokens field name in request body (e.g., max_completion_tokens for o1 models) |
thinking_level | string | No | Extended thinking level: off, low, medium, high, xhigh, or adaptive |
max_tokens | int | No | Max output tokens for requests to this model. Overrides agents.defaults.max_tokens; unset inherits it. Applies to the primary model and to each fallback candidate |
temperature | float | No | Sampling temperature for requests to this model. Overrides agents.defaults.temperature; unset inherits it (an explicit 0 is honored) |
context_window | int | No | Context window in tokens. Overrides agents.defaults.context_window when this model is the agent's primary model; unset inherits it. Fallback candidates keep the primary's window for context budgeting |
tool_schema_transform | string | No | Optional compatibility transform for tool parameter schemas. Default: disabled. Supported values: simple. |
extra_body | object | No | Additional fields to inject into every request body |
custom_headers | object | No | Additional HTTP headers to inject into every request (e.g., {"X-Source":"coding-plan"}). If a key matches a built-in header, the custom value overrides the built-in one (e.g., Authorization, User-Agent, Content-Type, Accept). |
streaming.enabled | bool | No | Opt-in for provider streaming on this model entry. Defaults to false and also requires the active channel's settings.streaming.enabled to be true. |
rpm | int | No | Per-minute request rate limit |
fallbacks | string[] | No | Fallback model names for automatic failover |
enabled | bool | No | Whether this model entry is active (default: true) |
When streaming is disabled, omit the streaming block. Writing "streaming": {"enabled": false} is optional and not needed in generated or hand-written config.
extra_body is especially useful for model-specific TTS fields on OpenAI-compatible
speech routes, for example custom voice names or response_format: "mp3".
OpenRouter Provider Routingโ
OpenRouter can route one model to several upstream providers. Set provider_sort
on the model entry to choose how PicoClaw asks OpenRouter to rank those
providers:
provider_sort | Optimizes |
|---|---|
latency | Lowest time to first token (TTFT), best for interactive streaming chat |
throughput | Highest generated tokens per second, best for long generations, coding, and batch work |
price | Lowest price, best for cost-sensitive workloads |
{
"model_name": "openrouter-fast",
"provider": "openrouter",
"model": "openai/gpt-5.4",
"provider_sort": "throughput",
"api_keys": ["sk-or-your-key"]
}
PicoClaw sends this as "provider": {"sort": "<value>"} in the chat
completions request. The setting only applies to OpenRouter (the openrouter
provider or an openrouter.ai API base) and is ignored by other providers. If
extra_body already contains a provider object, PicoClaw merges the sort
value into it and keeps existing routing fields such as order or only; an
explicit extra_body.provider.sort takes precedence.
Tool Schema Compatibilityโ
By default, PicoClaw forwards tool JSON Schemas unchanged, with automatic handling for the native Gemini provider.
Native Gemini endpointsโ
When the gemini provider targets Google AI Studio (generativelanguage.googleapis.com, API version v1beta, v1, or v1alpha), PicoClaw sends tool parameters through Gemini's parametersJsonSchema field, which accepts full JSON Schema. Before sending, PicoClaw deep-copies the schema, inlines same-document $ref values, drops $defs and definitions, removes a root $schema, and guarantees an object root. If a reference is circular or cannot be resolved, PicoClaw logs a debug message and forwards the schema unchanged so the upstream error stays visible instead of silently truncating the tool definition.
Vertex AI and custom Gemini-compatible proxies keep the legacy parameters field, which only accepts the conservative OpenAPI subset. PicoClaw sanitizes those schemas automatically: local refs are dereferenced, anyOf, oneOf, and allOf are flattened, and keywords such as additionalProperties, pattern, or numeric bounds are removed.
tool_schema_transform is therefore unnecessary for native Gemini. It remains available for other providers that reject advanced JSON Schema features such as $ref, $defs, anyOf, oneOf, allOf, pattern, or numeric and string constraints inside tool declarations.
Use simple when such a provider expects the conservative function schema subset:
{
"model_name": "custom-relay-safe-tools",
"provider": "openai",
"model": "my-model",
"api_keys": ["your-key"],
"tool_schema_transform": "simple"
}
Notes:
- For non-Gemini providers the transform is disabled by default. If you omit
tool_schema_transform, PicoClaw sends the original tool schema. - Native Gemini endpoints are handled automatically; the transform is not needed there.
- The setting is per model entry, so you can enable it only for the providers that need it.
Provider / Model Resolutionโ
PicoClaw resolves provider and the runtime model ID using these rules:
- If
provideris set,modelis used as-is. - If
provideris omitted, PicoClaw treats the first/segment inmodelas the provider and everything after that first/as the runtime model ID.
Examples:
| Config | Resolved Provider | Model Sent Upstream |
|---|---|---|
"provider": "openai", "model": "gpt-5.4" | openai | gpt-5.4 |
"model": "openai/gpt-5.4" | openai | gpt-5.4 |
"provider": "openrouter", "model": "openai/gpt-5.4" | openrouter | openai/gpt-5.4 |
"model": "openrouter/openai/gpt-5.4" | openrouter | openai/gpt-5.4 |
Voice Transcriptionโ
You can configure a dedicated model for audio transcription with voice.model_name. This lets you reuse existing multimodal providers that support audio input instead of relying only on Groq.
If voice.model_name is not configured, PicoClaw will continue to fall back to Groq transcription when a Groq API key is available.
ElevenLabs ASR: The
elevenlabsprovider (https://api.elevenlabs.io) is a dedicated speech-to-text provider. It is not a chat model and cannot be used inmodel_listfor general agent inference. Use it only as thevoice.model_namefor audio transcription.
{
"model_list": [
{
"model_name": "voice-gemini",
"provider": "gemini",
"model": "gemini-2.5-flash",
"api_keys": ["your-gemini-key"]
}
],
"voice": {
"model_name": "voice-gemini",
"echo_transcription": false
},
"providers": {
"groq": {
"api_key": "gsk_xxx"
}
}
}
Voice Synthesisโ
You can configure a dedicated text-to-speech model with voice.tts_model_name.
When the provider needs model-specific TTS request fields, put them in
model_list[].extra_body.
Example with OpenRouter microsoft/mai-voice-2:
{
"model_list": [
{
"model_name": "mai-voice-2",
"provider": "openrouter",
"model": "microsoft/mai-voice-2",
"api_base": "https://openrouter.ai/api/v1",
"extra_body": {
"voice": "en-US-Harper:MAI-Voice-2",
"response_format": "mp3"
},
"api_keys": ["sk-or-your-openrouter-key"]
}
],
"voice": {
"tts_model_name": "mai-voice-2"
}
}
Notes that matter:
- PicoClaw still uses the OpenAI-compatible
/audio/speechroute for this setup. - The default TTS request uses
voice: alloyandresponse_format: opus. - Override those defaults with
extra_bodywhen your selected TTS model requires different values.
Vendor-Specific Examplesโ
OpenAI
{
"model_name": "gpt-5.4",
"provider": "openai",
"model": "gpt-5.4",
"api_keys": ["sk-..."]
}
NEAR AI Cloud
{
"model_name": "nearai-glm",
"provider": "nearai",
"model": "zai-org/GLM-5.1-FP8",
"api_keys": ["your-nearai-api-key"]
}
VolcEngine (Doubao)
{
"model_name": "ark-code-latest",
"provider": "volcengine",
"model": "ark-code-latest",
"api_keys": ["sk-..."]
}
ๆบ่ฐฑ AI (GLM)
{
"model_name": "glm-4.7",
"provider": "zhipu",
"model": "glm-4.7",
"api_keys": ["your-key"]
}
Z.AI Coding Plan (GLM)
Z.AI and ๆบ่ฐฑ AI are two brands of the same provider. Use the canonical
zaiprovider:
{
"model_name": "glm-4.7",
"provider": "zai",
"model": "glm-4.7",
"api_keys": ["your-z.ai-key"]
}
Legacy form (still works):
"provider": "openai"with"api_base": "https://api.z.ai/api/coding/paas/v4".
DeepSeek
{
"model_name": "deepseek-chat",
"provider": "deepseek",
"model": "deepseek-chat",
"api_keys": ["sk-..."]
}
Anthropic (with API key)
{
"model_name": "claude-sonnet-4.6",
"provider": "anthropic",
"model": "claude-sonnet-4.6",
"api_keys": ["sk-ant-your-key"]
}
Run
picoclaw auth login --provider anthropicto paste your API token.
Anthropic Messages API (native format)
For direct Anthropic API access or custom endpoints that only support Anthropic's native message format:
{
"model_name": "claude-opus-4-6",
"provider": "anthropic-messages",
"model": "claude-opus-4-6",
"api_keys": ["sk-ant-your-key"],
"api_base": "https://api.anthropic.com"
}
Use
anthropic-messagesprotocol when:
- Using third-party proxies that only support Anthropic's native
/v1/messagesendpoint (not OpenAI-compatible/v1/chat/completions)- Connecting to services like MiniMax, Synthetic that require Anthropic's native message format
- The existing
anthropicprotocol returns 404 errors (indicating the endpoint doesn't support OpenAI-compatible format)Note: The
anthropicprotocol uses OpenAI-compatible format (/v1/chat/completions), whileanthropic-messagesuses Anthropic's native format (/v1/messages). Choose based on your endpoint's supported format.Requests to Claude models enable Anthropic automatic prompt caching with a top-level
cache_control: {"type": "ephemeral"}. The cache covers tool definitions and the system prompt, and the breakpoint advances with the conversation. Anthropic applies its normal minimum-prefix rules, so short prompts are processed uncached without an error.
OpenCode Go
One OpenCode Go key serves models on four different wire protocols. PicoClaw picks the endpoint from the model ID prefix, so just name the model:
| Model ID prefix | Protocol | Endpoint under api_base |
|---|---|---|
grok-, gpt-, muse-spark- | OpenAI Responses | /openai/v1/responses |
claude-, minimax-, qwen | Anthropic Messages | /anthropic/v1/messages |
gemini- | Google Gemini | /google/v1beta/models/{id}:โฆ |
anything else (kimi-, glm-, deepseek-, โฆ) | OpenAI Chat Completions | /openai/v1/chat/completions |
{
"model_name": "go-kimi",
"model": "opencode-go/kimi-k3",
"api_keys": ["your-opencode-go-key"]
}
When
provideris set explicitly, use the bare model ID:{"provider": "opencode-go", "model": "glm-5.3-flash"}. A redundantopencode-go/prefix is dropped before routing and before the upstream request, so{"provider": "opencode-go", "model": "opencode-go/glm-5.3-flash"}keeps working as well.
api_baseis optional and defaults tohttps://opencode.ai/inference/go. OpenCode Go rejects requests without anx-opencode-sessionheader, so PicoClaw always sends it: the conversation session key during a chat turn, orpicoclaw-<model_name>for background calls such as summarization. An explicitcustom_headersentry for that header takes precedence.The Responses endpoint is called without
temperature(reasoning models reject it). For a model PicoClaw routes wrongly, useprovider: "openai"or"anthropic-messages"with the full family URL asapi_baseinstead.
For a custom OpenAI-compatible relay that also requires this header, set
"session_header": "x-opencode-session" on the model entry. The Web UI exposes
the same field under Models โ Add/Edit โ Advanced โ Session Header, with a
one-click x-opencode-session preset.
Ollama (local)
{
"model_name": "llama3",
"provider": "ollama",
"model": "llama3"
}
LM Studio (local)
{
"model_name": "lmstudio-local",
"provider": "lmstudio",
"model": "openai/gpt-oss-20b"
}
api_base defaults to http://localhost:1234/v1. API key is optional unless your LM Studio server enables authentication.
With explicit provider, PicoClaw sends openai/gpt-oss-20b unchanged to the LM Studio server. The legacy compatibility form "model": "lmstudio/openai/gpt-oss-20b" still resolves to the same upstream model ID when provider is omitted.
GPT4Free (local)
GPT4Free runs a local OpenAI-compatible server on http://localhost:1337/v1. No API key is required:
{
"model_name": "gpt4free-local",
"provider": "gpt4free",
"model": "gpt-4o"
}
Alias g4f works as well. Set api_base if your server listens on a different address.
Custom Proxy/API
{
"model_name": "my-custom-model",
"provider": "openai",
"model": "custom-model",
"api_base": "https://my-proxy.com/v1",
"api_keys": ["sk-..."],
"user_agent": "MyApp/1.0",
"request_timeout": 300
}
LiteLLM Proxy
{
"model_name": "lite-gpt4",
"provider": "litellm",
"model": "lite-gpt4",
"api_base": "http://localhost:4000/v1",
"api_keys": ["sk-..."]
}
With explicit provider, PicoClaw sends model unchanged. That means "provider": "litellm", "model": "lite-gpt4" sends lite-gpt4, while "provider": "litellm", "model": "openai/gpt-4o" sends openai/gpt-4o. The legacy compatibility forms litellm/lite-gpt4 and litellm/openai/gpt-4o still resolve the same way when provider is omitted.
MiniMax
PicoClaw automatically injects "reasoning_split": true into every request body for the minimax provider unless you set it yourself. This field splits the response into reasoning and answer parts as required by the MiniMax API. To override it (e.g. disable it), set the field explicitly in extra_body:
{
"model_name": "minimax-m3",
"provider": "minimax",
"model": "MiniMax-M3",
"api_keys": ["your-minimax-key"],
"extra_body": { "reasoning_split": false }
}
Azure OpenAI (keyless)
When api_keys is omitted, PicoClaw uses Azure's DefaultAzureCredential (Managed Identity, Workload Identity, Entra ID CLI login, etc.) โ no API key needed:
{
"model_name": "azure-gpt-5",
"provider": "azure",
"model": "gpt-5-deployment",
"api_base": "https://your-resource.openai.azure.com"
}
Claude CLI / Codex CLI (local)
claude-cli and codex-cli spawn the respective CLI binary in a local workspace. No API key is used; authentication is handled by the CLI itself. Set workspace to control the working directory:
{
"model_name": "claude-local",
"provider": "claude-cli",
"model": "claude-sonnet-4-6",
"workspace": "/path/to/your/project"
}
{
"model_name": "codex-local",
"provider": "codex-cli",
"model": "codex-mini-latest",
"workspace": "/path/to/your/project"
}
workspace defaults to . (current directory) when omitted.
Z.AI Coding Plan
If the standard Zhipu endpoint (https://open.bigmodel.cn/api/paas/v4) returns 429 (code 1113: insufficient balance), try using the canonical zai provider instead:
{
"model_name": "glm-4.7",
"provider": "zai",
"model": "glm-4.7",
"api_keys": ["your-z.ai-key"]
}
Note: The Z.AI Coding Plan endpoint and standard Zhipu endpoint use the same API key format but have separate billing. If you encounter 429 errors with the standard Zhipu endpoint, the Z.AI Coding Plan endpoint may have available balance.
AWS Bedrock
Bedrock requires the -tags bedrock build flag. Credentials are resolved automatically via the AWS SDK default chain (env vars, ~/.aws/credentials, IAM roles). No api_key is used.
The api_base field has special semantics for Bedrock:
- Region name (no
://): PicoClaw passes it to the AWS SDK as the region, which resolves the correct partition endpoint (all AWS partitions:aws,aws-cn,aws-us-gov, etc.). - Full endpoint URL (contains
://): PicoClaw uses it directly as the Bedrock Runtime endpoint.
{
"model_name": "bedrock-claude",
"provider": "bedrock",
"model": "anthropic.claude-sonnet-4-6-v1:0",
"api_base": "us-east-1"
}
{
"model_name": "bedrock-claude-custom-endpoint",
"provider": "bedrock",
"model": "anthropic.claude-sonnet-4-6-v1:0",
"api_base": "https://bedrock-runtime.us-east-1.amazonaws.com"
}
Load Balancingโ
Configure multiple endpoints for the same model name. PicoClaw selects one of
them round-robin when the model is resolved (at agent startup or when switching
models with /model), then reuses the resolved candidate set for the agent's
subsequent turns, so the rotation is not per-request. The round-robin counter is
process-wide, so selection is shared across all agents:
{
"model_list": [
{
"model_name": "gpt-5.4",
"provider": "openai",
"model": "gpt-5.4",
"api_base": "https://api1.example.com/v1",
"api_keys": ["sk-key1"]
},
{
"model_name": "gpt-5.4",
"provider": "openai",
"model": "gpt-5.4",
"api_base": "https://api2.example.com/v1",
"api_keys": ["sk-key2"]
}
]
}
Automatic Model Failover (Cascade)โ
PicoClaw already supports automatic failover when you configure primary + fallbacks in the agent model settings.
The runtime fallback chain retries the next candidate for retriable failures such as HTTP 429, quota/rate-limit errors, and timeout errors.
It also applies cooldown tracking per candidate to avoid immediately retrying a recently failed target.
{
"model_list": [
{
"model_name": "qwen-main",
"provider": "openai",
"model": "qwen3.5:cloud",
"api_base": "https://api.example.com/v1",
"api_keys": ["sk-main"]
},
{
"model_name": "deepseek-backup",
"provider": "deepseek",
"model": "deepseek-chat",
"api_keys": ["sk-backup-1"]
},
{
"model_name": "gemini-backup",
"provider": "gemini",
"model": "gemini-2.5-flash",
"api_keys": ["sk-backup-2"]
}
],
"agents": {
"defaults": {
"model_name": "qwen-main",
"model_fallbacks": ["deepseek-backup", "gemini-backup"]
}
}
}
If you use key-level failover for the same model, PicoClaw can chain through additional key-backed candidates before moving to cross-model backups.
Migration from Legacy providers Configโ
The old providers configuration is deprecated and has been removed in V2. Existing V0/V1 configs are auto-migrated.
Old Config (deprecated):
{
"providers": {
"zhipu": {
"api_key": "your-key",
"api_base": "https://open.bigmodel.cn/api/paas/v4"
}
},
"agents": {
"defaults": {
"provider": "zhipu",
"model": "glm-4.7"
}
}
}
New Config (recommended):
{
"version": 3,
"model_list": [
{
"model_name": "glm-4.7",
"provider": "zhipu",
"model": "glm-4.7",
"api_keys": ["your-key"]
}
],
"agents": {
"defaults": {
"model_name": "glm-4.7"
}
}
}
For detailed migration guide, see migration/model-list-migration.md.
Provider Architectureโ
PicoClaw routes providers by protocol family:
- OpenAI-compatible HTTP (
openai,openrouter,groq,zhipu,deepseek,nvidia,cerebras,volcengine,moonshot,venice,nearai,ollama,lmstudio,vllm,gpt4free,litellm,qwen-portal/qwen,qwen-intl,qwen-us,mistral,avian,novita,siliconflow,shengsuanyun,vivgrid,byteplus,longcat,modelscope,mimo,zai,alibaba-codingand other OpenAI-compatible endpoints). - OAuth/token auth (
openaioranthropicwithauth_method: oauth|token): authenticates via the PicoClaw auth store instead of an API key. Used by both Codex (openai, viacreateCodexAuthProvider) and Claude (anthropic, viacreateClaudeAuthProvider). Runpicoclaw auth login --provider openai|anthropicto store credentials. - Azure OpenAI (
azure): deployment-based URLs with API key or keyless Managed Identity / Entra ID. - AWS Bedrock (
bedrock): Bedrock Runtime Converse API; credentials from the AWS SDK default chain. Requires-tags bedrockbuild flag. - Google Gemini native (
gemini): nativemodels/*:generateContentandmodels/*:streamGenerateContentendpoints. - MiniMax (
minimax): OpenAI-compatible with automaticreasoning_splitinjection. - Anthropic HTTP (
anthropic): OpenAI-compatible chat completions endpoint atapi.anthropic.com; optionally useauth_method: oauth|token(see OAuth/token above). - Anthropic Messages native (
anthropic-messages,alibaba-coding-anthropic): Anthropic's native/v1/messageswire format. - OpenCode Go (
opencode-go): multi-protocol proxy; selects OpenAI Responses, Anthropic Messages, or Gemini automatically from the model ID prefix. - Antigravity / Google Code Assist (
antigravity): OAuth-only managed provider. - CLI providers (
claude-cli,codex-cli): spawn the respective CLI binary in a workspace directory; no API key or network connection required. - GitHub Copilot (
github-copilot): gRPC connection to a local Copilot bridge onlocalhost:4321.
This keeps the runtime lightweight while making new OpenAI-compatible backends mostly a config operation (api_base + api_keys).
Zhipu
1. Get API key and base URL
- Get API key
2. Configure
{
"agents": {
"defaults": {
"workspace": "~/.picoclaw/workspace",
"model_name": "glm-4.7",
"max_tokens": 8192,
"temperature": 0.7,
"max_tool_iterations": 20
}
},
"providers": {
"zhipu": {
"api_key": "Your API Key",
"api_base": "https://open.bigmodel.cn/api/paas/v4"
}
}
}
3. Run
picoclaw agent -m "Hello"
Full config example
{
"agents": {
"defaults": {
"model_name": "claude-opus-4-5"
}
},
"session": {
"dm_scope": "per-channel-peer"
},
"providers": {
"openrouter": {
"api_key": "sk-or-v1-xxx"
},
"groq": {
"api_key": "gsk_xxx"
}
},
"voice": {
"model_name": "voice-gemini",
"echo_transcription": false
},
"channel_list": {
"telegram": {
"enabled": true,
"type": "telegram",
"token": "123456:ABC...",
"allow_from": ["123456789"]
},
"discord": {
"enabled": true,
"type": "discord",
"token": "",
"allow_from": [""]
},
"whatsapp": {
"enabled": false,
"type": "whatsapp",
"bridge_url": "ws://localhost:3001",
"use_native": false,
"session_store_path": "",
"allow_from": []
},
"feishu": {
"enabled": false,
"type": "feishu",
"app_id": "cli_xxx",
"app_secret": "xxx",
"encrypt_key": "",
"verification_token": "",
"allow_from": []
},
"qq": {
"enabled": false,
"type": "qq",
"app_id": "",
"app_secret": "",
"allow_from": []
}
},
"tools": {
"web": {
"brave": {
"enabled": false,
"api_key": "BSA...",
"max_results": 5
},
"duckduckgo": {
"enabled": true,
"max_results": 5
},
"perplexity": {
"enabled": false,
"api_key": "",
"max_results": 5
},
"searxng": {
"enabled": false,
"base_url": "http://localhost:8888",
"max_results": 5
}
},
"cron": {
"exec_timeout_minutes": 5,
"allow_command": true,
"command_allowed_remotes": []
}
},
"heartbeat": {
"enabled": true,
"interval": 30
}
}
๐ API Key Comparisonโ
| Service | Pricing | Use Case |
|---|---|---|
| OpenRouter | Free: 200K tokens/month | Multiple models (Claude, GPT-4, etc.) |
| Volcengine CodingPlan | ยฅ9.9/first month | Best for Chinese users, multiple SOTA models (Doubao, DeepSeek, etc.) |
| Zhipu | Free: 200K tokens/month | Suitable for Chinese users |
| Brave Search | $5/1000 queries | Web search functionality |
| SearXNG | Free (self-hosted) | Privacy-focused metasearch (70+ engines) |
| Groq | Free tier available | Fast inference (Llama, Mixtral) |
| Cerebras | Free tier available | Fast inference (Llama, Qwen, etc.) |
| LongCat | Free: up to 5M tokens/day | Fast inference |
| ModelScope | Free: 2000 requests/day | Inference (Qwen, GLM, DeepSeek, etc.) |