mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 08:02:53 +00:00
Add a top-level "prefer" config field ("zen" or "go", default "go") that
controls which upstream is used when a model is available in both pools,
including during the temporary model-discovery fallback. Previously Zen
was always preferred.
32 lines
669 B
JSON
32 lines
669 B
JSON
{
|
|
"listen": "127.0.0.1:8080",
|
|
"server_keys": ["change-this-local-key"],
|
|
"zen_keys": ["sk-your-zen-key"],
|
|
"go_keys": [],
|
|
"prefer": "go",
|
|
"proxies": ["direct"],
|
|
"upstream": {
|
|
"zen": "https://opencode.ai/zen",
|
|
"go": "https://opencode.ai/zen/go"
|
|
},
|
|
"retry": {
|
|
"max_attempts": 3,
|
|
"timeout_seconds": 300
|
|
},
|
|
"models": {
|
|
"refresh_seconds": 300,
|
|
"protocols": {}
|
|
},
|
|
"performance": {
|
|
"max_idle_conns": 2048,
|
|
"max_idle_conns_per_host": 256,
|
|
"max_conns_per_host": 0,
|
|
"idle_conn_timeout_seconds": 120,
|
|
"connect_timeout_seconds": 5,
|
|
"failure_cooldown_seconds": 15
|
|
},
|
|
"logging": {
|
|
"level": "info"
|
|
}
|
|
}
|