Repository navigation
v1.3.0 — native adaptive ModeAuto on xhigh, continuous SSE heartbeat, output telemetry
Why this release
Under real-world workloads, Google Antigravity / Borg TPU infrastructure experiences queue and scheduling spikes resulting in TTFT (time-to-first-token) pauses of 30s to 66s. Without keepalive frames on the wire, client socket timeouts (in Node.js/undici) trigger silent connection drops (BrokenPipeError: [Errno 32] Broken pipe in the proxy when upstream finally replies). Furthermore, hardcoding budget limits on the gateway's adaptive tiered models (gemini-3.8-flash-tiered) disabled Google's native ModeAuto thinking logic, forcing excessive reasoning on trivial turns while hiding actual token usage.
This release eliminates BrokenPipeError entirely, unlocks Google's native dynamic reasoning, and adds transparent reasoning telemetry.
Native adaptive thinking on /effort xhigh
gemini-3.8-flash-tieredwithout bracket suffixes now routes cleanly to Google AntigravityModeAuto(thinkingBudget = -1). When no artificial token cap (like(16384)) is attached, the model itself dynamically evaluates task complexity: spending zero reasoning tokens on routine file reads and scaling to deep reasoning on architectural analysis.- Dynamic
-tieredmodel resolver: Claude Code's/effortsetting dynamically selects the underlying backend model:low→*-low(2048)medium→*-medium(8192)high→*-high(16384)xhigh/max→ cleangemini-3.8-flash-tiered(ModeAuto).
- Default
effortLevelinsettings.jsonandsetup-agent.pyis now set toxhigh.
Continuous SSE Keepalive Ping Heartbeat (fixes BrokenPipeError)
- Automatic
event: pingticker (5.0s interval) keeps the client connection alive across long Borg queue waits and heavy reasoning spikes. - Continuous across the entire stream: unlike simple TTFT-only guards, the idle timer resets on every received chunk and keeps running mid-stream. If generation pauses mid-response, keepalive frames continue to flow. Thread-safe lock (
wfile_lock) ensures ping events and response frames never collide. - Tested and verified live under upstream delay simulations and real 30s+ Borg spikes (
pings=4, zero connection drops).
Granular output telemetry & hidden reasoning accounting
- Proxy logging now decomposes total output into visible vs hidden tokens:
out_tok=3439(vis~1835,hid~1604)vis(visible tokens): estimated tokens across generated text (text_chars), streamed reasoning (think_chars), and tool call JSON (tool_chars).hid(hidden tokens): internal Borg/TPU reasoning tokens accounted for by Google'susageMetadata(thoughtsTokenCount) that are not streamed as visible deltas.
- Logs include accurate character counts (
think_chars,text_chars,tool_chars) and ping counts (pings=N). - Fixed capture of
message_deltaframes to ensure terminalusageandstop_reason(end_turn/tool_use) are consistently recorded.
Upgrading
python setup-agent.pySafe to re-run on an existing install.