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:
JianFeeeee
2026-08-17 08:53:42 +08:00
parent f67831c3c2
commit d75d8411c0
4 changed files with 10 additions and 39 deletions

View File

@ -91,14 +91,8 @@ func TestEnsureDefaultGeneratesOnMissingFile(t *testing.T) {
if cfg.Listen != "127.0.0.1:8080" {
t.Fatalf("listen = %q, want loopback-only", cfg.Listen)
}
if len(cfg.Sources) != 1 || cfg.Sources[0].Name != "zen" || cfg.Sources[0].Adapter != "opencode" {
t.Fatalf("default sources = %+v", cfg.Sources)
}
if cfg.Sources[0].APIKey != "public" {
t.Fatalf("zen api_key = %q", cfg.Sources[0].APIKey)
}
if cfg.Sources[0].Models[0].ID != "deepseek-v4-flash-free" {
t.Fatalf("default model = %+v", cfg.Sources[0].Models)
if len(cfg.Sources) != 0 {
t.Fatalf("default config must ship no sources (user adds them), got %+v", cfg.Sources)
}
// adapter_dir / runtime_file resolve next to the config file
if !strings.HasPrefix(cfg.AdapterDir, dir) || !strings.HasPrefix(cfg.RuntimeFile, dir) {