v3.13.0: Desktop Updater, profile system fix, Antigravity E2E, conservative compaction
- Codex Desktop Updater: check/install/rollback/service management + manual rebuild - Fix Codex CLI 0.134.0 profiles: separate <slug>.config.toml files - Fix Antigravity: prod endpoint first, model resolution, OAUTH_PROVIDER - Fix compaction: max_input_items 60->200 for 1M-token models - Antigravity E2E test suite: test-antigravity.sh - Windows GUI: UpdateDesktopWindow + profile slug fix - Updated CHANGELOG.md and README.md
This commit is contained in:
@@ -1031,6 +1031,10 @@ def _init_runtime():
|
||||
TARGET_URL = CONFIG["target_url"].rstrip("/")
|
||||
API_KEY = CONFIG["api_key"]
|
||||
OAUTH_PROVIDER = CONFIG.get("oauth_provider") or ""
|
||||
if not OAUTH_PROVIDER and BACKEND == "gemini-oauth-antigravity":
|
||||
OAUTH_PROVIDER = "google-antigravity"
|
||||
if not OAUTH_PROVIDER and BACKEND == "gemini-oauth":
|
||||
OAUTH_PROVIDER = "google-cli"
|
||||
MODELS = CONFIG["models"]
|
||||
CC_VERSION = CONFIG.get("cc_version", "")
|
||||
REASONING_ENABLED = CONFIG.get("reasoning_enabled", True)
|
||||
@@ -2007,10 +2011,10 @@ _PROVIDER_POLICIES = {
|
||||
"openadapter": {"reasoning_mode": "off", "max_tokens": 32768, "strip_reasoning": True,
|
||||
"tool_output_limit": 1000, "max_input_items": 10, "compaction": "aggressive",
|
||||
"synthetic_tool_results": True},
|
||||
"cloudcode-pa": {"compaction": "aggressive", "context_size": 1000000,
|
||||
"tool_output_limit": 6000, "max_input_items": 60},
|
||||
"googleapis": {"compaction": "balanced", "context_size": 1000000,
|
||||
"tool_output_limit": 6000, "max_input_items": 80},
|
||||
"cloudcode-pa": {"compaction": "conservative", "context_size": 1000000,
|
||||
"tool_output_limit": 8000, "max_input_items": 200},
|
||||
"googleapis": {"compaction": "conservative", "context_size": 1000000,
|
||||
"tool_output_limit": 8000, "max_input_items": 250},
|
||||
}
|
||||
|
||||
def provider_policy(target_url=None, backend=None):
|
||||
@@ -5544,6 +5548,28 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
||||
return chat_body
|
||||
|
||||
def _handle_antigravity_v2(self, body, model, stream, tracker=None):
|
||||
_model_alias = {
|
||||
"gemini-3.5-flash-high": "gemini-3-flash",
|
||||
"gemini-3.5-flash-medium": "gemini-3-flash",
|
||||
"gemini-3.5-flash-low": "gemini-3.5-flash-low",
|
||||
"gemini-3.5-flash": "gemini-3-flash",
|
||||
"gemini-3-flash-preview": "gemini-3-flash",
|
||||
"gemini-3-pro-preview": "gemini-3.1-pro-low",
|
||||
"gemini-3-pro": "gemini-3.1-pro-low",
|
||||
"gemini-3-pro-low": "gemini-3.1-pro-low",
|
||||
"gemini-3-pro-high": "gemini-3.1-pro-low",
|
||||
"gemini-3.1-pro": "gemini-3.1-pro-low",
|
||||
"gemini-3.1-pro-high": "gemini-3.1-pro-low",
|
||||
"claude-sonnet-4.6": "claude-sonnet-4-6",
|
||||
"claude-sonnet-4.6-thinking": "claude-sonnet-4-6",
|
||||
"claude-opus-4.6": "claude-opus-4-6-thinking",
|
||||
"claude-opus-4.6-thinking": "claude-opus-4-6-thinking",
|
||||
}
|
||||
_resolved = _model_alias.get(model, model)
|
||||
if _resolved != model:
|
||||
print(f"[{getattr(self, '_session_id', '?')}] [antigravity-v2] model resolved: {model} -> {_resolved}", file=sys.stderr)
|
||||
model = _resolved
|
||||
|
||||
input_data = body.get("input", "")
|
||||
_schema = _load_schema(model=model)
|
||||
if _schema and not _schema.supports_vision:
|
||||
@@ -5810,11 +5836,10 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
||||
}
|
||||
wrapped["request"]["sessionId"] = f"{uuid.uuid4().hex}{int(time.time()*1000)}"
|
||||
|
||||
# Use endpoint order from repo4/opencode-antigravity-auth: daily sandbox → autopush sandbox → prod
|
||||
_antigravity_endpoints = [
|
||||
"https://cloudcode-pa.googleapis.com",
|
||||
"https://daily-cloudcode-pa.sandbox.googleapis.com",
|
||||
"https://autopush-cloudcode-pa.sandbox.googleapis.com",
|
||||
"https://cloudcode-pa.googleapis.com",
|
||||
]
|
||||
|
||||
body_b = json.dumps(wrapped).encode()
|
||||
@@ -5861,8 +5886,12 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
||||
pass
|
||||
if e.code == 400:
|
||||
return self.send_json(e.code, {"error": {"type": "upstream_error", "message": _sanitize_err_body(err_body)}})
|
||||
if err_class in ("auth_permanent", "service_disabled", "forbidden", "account_banned", "validation_required"):
|
||||
if err_class in ("auth_permanent", "forbidden", "account_banned", "validation_required"):
|
||||
return self.send_json(e.code, {"error": {"type": "upstream_error", "message": _sanitize_err_body(err_body)}})
|
||||
if err_class == "service_disabled":
|
||||
_is_prod = "cloudcode-pa.googleapis.com" in ep and "sandbox" not in ep
|
||||
if _is_prod:
|
||||
return self.send_json(e.code, {"error": {"type": "upstream_error", "message": _sanitize_err_body(err_body)}})
|
||||
if err_class in ("quota_exhausted", "rate_limited"):
|
||||
pool = _google_antigravity_pool
|
||||
_, acct = _get_google_account(OAUTH_PROVIDER)
|
||||
|
||||
Reference in New Issue
Block a user