diff --git a/codex-launcher_3.9.7_all.deb b/codex-launcher_3.9.7_all.deb index fce6636..923df05 100644 Binary files a/codex-launcher_3.9.7_all.deb and b/codex-launcher_3.9.7_all.deb differ diff --git a/src/translate-proxy.py b/src/translate-proxy.py index 0d3ff15..1237438 100755 --- a/src/translate-proxy.py +++ b/src/translate-proxy.py @@ -187,7 +187,7 @@ def load_config(): p = argparse.ArgumentParser(description="Responses API translation proxy") p.add_argument("--config", help="JSON config file path") p.add_argument("--port", type=int, default=None) - p.add_argument("--backend", default=None, choices=["openai-compat", "anthropic", "command-code", "codebuff", "auto"]) + p.add_argument("--backend", default=None, choices=["openai-compat", "anthropic", "command-code", "codebuff", "freebuff", "auto"]) p.add_argument("--target-url", default=None) p.add_argument("--api-key", default=None) p.add_argument("--models-file", default=None, help="JSON file with model list array") @@ -764,7 +764,7 @@ def _init_runtime(): REASONING_EFFORT = CONFIG.get("reasoning_effort", "medium") BGP_ROUTES = CONFIG.get("bgp_routes", []) _api_key_pool = None - if API_KEY and "," in API_KEY and not OAUTH_PROVIDER.startswith("google") and BACKEND not in ("codebuff",): + if API_KEY and "," in API_KEY and not OAUTH_PROVIDER.startswith("google") and BACKEND not in ("codebuff", "freebuff"): _api_key_pool = APIKeyPool(BACKEND, API_KEY) print(f"[multi-account] API key pool: {len(_api_key_pool._accounts)} keys for {BACKEND}", file=sys.stderr) if OAUTH_PROVIDER == "google-antigravity": @@ -4037,7 +4037,7 @@ class Handler(http.server.BaseHTTPRequestHandler): self.send_json(200, {"object": "list", "data": MODELS}) elif self.path in ("/v1/accounts", "/accounts"): info = {"provider": BACKEND, "oauth_provider": OAUTH_PROVIDER} - if BACKEND == "codebuff": + if BACKEND in ("codebuff", "freebuff"): info["accounts"] = _cb_pool.status() info["total"] = len(_cb_pool._accounts) elif OAUTH_PROVIDER and OAUTH_PROVIDER.startswith("google"): @@ -4149,7 +4149,7 @@ class Handler(http.server.BaseHTTPRequestHandler): self._handle_anthropic(body, model, stream, tracker) elif BACKEND == "command-code": self._handle_command_code(body, model, stream, tracker) - elif BACKEND == "codebuff": + elif BACKEND in ("codebuff", "freebuff"): self._handle_codebuff(body, model, stream, tracker) elif (BACKEND or "").startswith("gemini-oauth"): self._handle_gemini_oauth(body, model, stream, tracker) @@ -5896,7 +5896,7 @@ def main(): print(f"translate-proxy ({BACKEND}) listening on http://127.0.0.1:{PORT}", flush=True) print(f"Target: {TARGET_URL}", flush=True) print(f"Models: {[m['id'] for m in MODELS]}", flush=True) - if BACKEND == "codebuff": + if BACKEND in ("codebuff", "freebuff"): _cb_pool.load_accounts(force=True) fb_status = _cb_pool.status() print(f"[multi-account] codebuff: {len(fb_status)} accounts loaded {[a['id'] for a in fb_status]}", flush=True)