docs: add model fallback docs and update config example
Add cross-provider model_fallbacks section to README.md and README.ja.md. Update config.example.json with provider, model_fallbacks, and task_reminder_interval fields. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
da664fd4a5
commit
2cfe24ba98
3 changed files with 64 additions and 1 deletions
30
README.ja.md
30
README.ja.md
|
|
@ -621,6 +621,36 @@ HEARTBEAT_OK 応答 ユーザーが直接結果を受け取る
|
|||
- `PICOCLAW_HEARTBEAT_ENABLED=false` で無効化
|
||||
- `PICOCLAW_HEARTBEAT_INTERVAL=60` で間隔変更
|
||||
|
||||
### モデルフォールバック
|
||||
|
||||
`model_fallbacks` はプライマリモデルがリトライ可能なエラー(レート制限、サーバーエラー等)を返した時に起動するフォールバックチェーンです。**異なるプロバイダー**をターゲットにでき、プロバイダーは初回使用時に遅延生成・キャッシュされます。
|
||||
|
||||
```json
|
||||
{
|
||||
"agents": {
|
||||
"defaults": {
|
||||
"provider": "vllm",
|
||||
"model": "MiniMax-M1-80k",
|
||||
"model_fallbacks": ["openai/gpt-4o", "anthropic/claude-sonnet-4-5-20250929"]
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"vllm": {
|
||||
"api_key": "minimax-key",
|
||||
"api_base": "https://api.minimax.io/v1"
|
||||
},
|
||||
"openai": {
|
||||
"auth_method": "oauth"
|
||||
},
|
||||
"anthropic": {
|
||||
"api_key": "sk-ant-xxx"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
フォーマットは `provider/model`。`/` がない場合はプライマリプロバイダーが使われます(同一プロバイダー内フォールバック)。失敗したプロバイダーはクールダウン期間に入り、連続タイムアウトを防ぎます。
|
||||
|
||||
### 基本設定
|
||||
|
||||
1. **設定ファイルの作成:**
|
||||
|
|
|
|||
30
README.md
30
README.md
|
|
@ -689,6 +689,36 @@ PicoClaw routes providers by protocol family:
|
|||
|
||||
This keeps the runtime lightweight while making new OpenAI-compatible backends mostly a config operation (`api_base` + `api_key`).
|
||||
|
||||
### Model Fallbacks
|
||||
|
||||
`model_fallbacks` defines a fallback chain that activates when the primary model returns a retriable error (rate limit, server error, etc.). Fallbacks can target **different providers** — the provider is lazily created and cached on first use.
|
||||
|
||||
```json
|
||||
{
|
||||
"agents": {
|
||||
"defaults": {
|
||||
"provider": "vllm",
|
||||
"model": "MiniMax-M1-80k",
|
||||
"model_fallbacks": ["openai/gpt-4o", "anthropic/claude-sonnet-4-5-20250929"]
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"vllm": {
|
||||
"api_key": "minimax-key",
|
||||
"api_base": "https://api.minimax.io/v1"
|
||||
},
|
||||
"openai": {
|
||||
"auth_method": "oauth"
|
||||
},
|
||||
"anthropic": {
|
||||
"api_key": "sk-ant-xxx"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The format is `provider/model`. If no `/` is present, the primary provider is assumed (same-provider fallback). Failed providers enter a cooldown period to avoid repeated timeouts.
|
||||
|
||||
<details>
|
||||
<summary><b>Zhipu</b></summary>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,13 @@
|
|||
"defaults": {
|
||||
"workspace": "~/.picoclaw/workspace",
|
||||
"restrict_to_workspace": true,
|
||||
"provider": "zhipu",
|
||||
"model": "glm-4.7",
|
||||
"model_fallbacks": ["openai/gpt-4o"],
|
||||
"max_tokens": 8192,
|
||||
"temperature": 0.7,
|
||||
"max_tool_iterations": 20
|
||||
"max_tool_iterations": 20,
|
||||
"task_reminder_interval": 5
|
||||
}
|
||||
},
|
||||
"channels": {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue