mirror of
https://gitcode.com/JianFeeeee/ModelRouter.git
synced 2026-10-03 15:44:05 +00:00
chore(compliance): drop opencode zen free-pool from default config and docs
opencode.ai/zen is a free-quota pool for the official opencode app, keyed by User-Agent fingerprint. Auto-provisioning it in the default config effectively impersonated the official client to bypass FreeUsageLimitError — a ToS risk. - default config (Go + GUI embed) now ships NO sources; users add their own - README/README_EN: remove opencode adapter from built-in list and the zen free-pool paragraph - adapter script and its unit tests stay (explicit opt-in only)
This commit is contained in:
@ -103,9 +103,10 @@ func EnsureDefault(path string) (bool, error) {
|
||||
}
|
||||
|
||||
// writeDefaultConfig writes a minimal, safe-by-default config: loopback-only
|
||||
// listen, a fresh random admin key, and a no-key zen source that works out of
|
||||
// the box. adapter_dir / runtime_file live next to the config file so the
|
||||
// binary works regardless of the working directory it is started from.
|
||||
// listen and a fresh random admin key. No upstream sources are preconfigured
|
||||
// (the repo ships none — add them via WebUI or config.yaml). adapter_dir /
|
||||
// runtime_file live next to the config file so the binary works regardless of
|
||||
// the working directory it is started from.
|
||||
func writeDefaultConfig(path string) error {
|
||||
key, err := NewGatewayKey()
|
||||
if err != nil {
|
||||
@ -122,15 +123,6 @@ func writeDefaultConfig(path string) error {
|
||||
DefaultModel: "AUTO",
|
||||
AdapterDir: filepath.Join(abs, "adapters"),
|
||||
RuntimeFile: filepath.Join(abs, "runtime.json"),
|
||||
Sources: []Source{
|
||||
{
|
||||
Name: "zen",
|
||||
BaseURL: "https://opencode.ai/zen/v1",
|
||||
APIKey: "public", // zen 免费池:官方无 key 客户端实际发送 Bearer public
|
||||
Adapter: "opencode",
|
||||
Models: []Model{{ID: "deepseek-v4-flash-free", Priority: 100, Kind: "chat"}},
|
||||
},
|
||||
},
|
||||
}
|
||||
out, err := yaml.Marshal(&cfg)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user