Skip to content

Releases

v1.8.0 — Native Windows Support, Strict Responses Proxy Fix & State-Machine Refactor

Choose a tag to compare

@ShawTim ShawTim released this 23 Nov 21:12

Highlights

  • Native Windows (win32) Support & windows-latest CI (Fixes #5):
    • Kernel-backed single-instance locking on Windows via libuv UV_FS_O_EXLOCK (dwShareMode = 0) on a persistent .state.lock handle with an immediate fail-closed EBUSY self-probe (zero PID-reclamation races or PID-reuse lockouts).
    • Locale-independent SID-based icacls.exe ACL hardening (*S-1-5-18, *S-1-5-32-544, and current local S-1-5-* / Entra ID S-1-12-1-* user SID), bounded renameSync retry on transient Defender EPERM/EACCES/EBUSY, SIGBREAK handling, and pathToFileURL + Winsock env fixes in scripts/run-current-contract.mjs.
    • Verified on GitHub Actions windows-latest (current-contract + windows-native NTFS lock, cross-process contention, forced-kill recovery, 4-way race, .env, and loopback /health checks).
  • Strict Responses Proxy Compatibility (Fixes #6):
    • Qualified usable POST /v1/responses SSE response.completed events now always emit response.error: null while preserving incomplete: true, incomplete_details: { reason: "upstream_interrupted", code }, and res.incomplete = true (preventing resumption cache retention)—stopping reconnect loops on strict OpenAI Responses proxies (e.g., Codex Desktop via Cockpit Tools).
    • response.failed, response.incomplete, and non-streaming partial responses keep error intact.
  • Sticky Session & Image Blob Cache Preservation:
    • Verified post_tool and post_output idle stalls no longer poison session.lastFailure or thrash per-account image blobCache on subsequent turns; X-Gemini-Recovery-Errors is only emitted on actual retry attempts.
  • State-Machine Refactor & Strict JSON Recovery:
    • Closed, privacy-safe TOOL_JSON_REASONS syntax subcodes in parseBoundedJson() with targeted recovery directives appended at the prompt tail and 2 uncommitted tool_protocol retries across Gateway, Pi, and OpenCode.
    • Converged response-delivery.mjs onto monotonic 4-state wirePhase, replaced O(N^2) per-frame idle probing in native-provider.mjs with O(1) classifyIdleSnapshot() + pure selectIdleDeadline(), unified pool.mjs retry planning in pure planRetry(), fixed OpenCode post_tool stall handling, and added committed multi-call tail salvage in Pi/OpenCode.
    • Added synthetic 150K-token HTTP/2 adversarial long-context suite (test/gateway-long-context-adversarial.test.mjs).

Extension Packages

  • pi-gemini-app@0.1.11
  • openclaw-gemini-app@0.1.7
  • mcp-gemini-app@0.1.2
  • opencode-gemini-app@0.1.2

v1.7.1 — Keepalive Headers, Idle Anchoring, HTTP/2 Watchdog & Large Image Upload Recovery

Choose a tag to compare

@ShawTim ShawTim released this 23 Nov 10:07

Highlights

Streaming & Timeout Reliability

  • 45s Comment-Only SSE Keepalive Headers (/v1/chat/completions): Flushes HTTP 200 text/event-stream + : keepalive heartbeats at 45s while buffering large slow tool_call blocks (20–35 KB), preventing 300s client/SDK header timeouts without committing output or breaking uncommitted retry safety.
  • Anchored Idle Timers (No Infinite Waits): Locks post_complete, post_tool, post_output, and post_tool_error deadlines to actual text/completion progress so repeated duplicate or metadata-only frames can never reset idle timers forever.
  • Smarter Tool-Block Idle Probing: Distinguishes tool_choice: 'required' preambles and still-streaming 2nd tool calls (TRUNCATED_TOOL_CALL) from closed invalid tool blocks, preventing premature cancellations while promptly closing stalled malformed tool calls.
  • HTTP/2 PING ACK Watchdog (30s): Detects unresponsive upstream HTTP/2 sessions cleanly with client.connecting guards, ERR_HTTP2_PING_CANCEL handling, and monotonic sequence tracking.

Large Image Upload Stability

  • Byte-Budget Upload Pacing (4 MiB In-Flight Cap): Keeps small images uploading in parallel while automatically pacing multi-megabyte PNG bursts (e.g., 4–7 × 2.9 MiB screenshots) so they no longer overwhelm a single HTTP/2 upload session.
  • Incremental Blob Caching & Sequential Reset Retry: Preserves completed uploads immediately in blobCache via onUploaded, retries remaining uncached images on fresh HTTP/2 sessions (concurrency: 1), and classifies NATIVE_IMAGE_UPLOAD_RESET for gateway-level transient failover.

Tool Protocol & Test Speed

  • Mid-Stream Tool Error Recovery: Defers mid-stream TOOL_ERRORS to validate with exact postFenceOffset tracking and a shared 1-retry tool_protocol cap.
  • Parallel Offline Product Suite: Runs the 75-file offline product suite in a bounded parallel worker pool (~4.6× faster).

Updated Extension Packages (npm)

  • pi-gemini-app@0.1.10
  • openclaw-gemini-app@0.1.6
  • mcp-gemini-app@0.1.1
  • opencode-gemini-app@0.1.1

Verification

  • Offline pre-release checks: 6/6 current-contract, 75/75 product tests, 71/71 Playwright browser E2E, 3/3 Python SDK smoke, 5/5 release package checks.
  • Live real-upstream verification: 4 × 2.9 MiB PNGs, 24-image (~24 MiB) batch, tool_choice: 'required', 28.9 KB slow tool call with 45s SSE keepalive flush, Gateway POST /mcp, mcp-gemini-app (gateway proxy & standalone direct stdio), and opencode-gemini-app on OpenCode 1.19.6.

v1.7.0 — Native Gateway POST /mcp, Trilingual Admin UI (EN/繁/简), Standalone MCP & OpenCode Plugins, and Pi 1.5.2 Session Affinity

Choose a tag to compare

@ShawTim ShawTim released this 22 Nov 22:52

Highlights

Native Gateway Streamable HTTP MCP (POST /mcp) & stdio Bridge (bin/gemini-gateway mcp)

  • Added an in-process, API-key-authenticated Streamable HTTP JSON-RPC 2.0 MCP endpoint at POST /mcp exposing ask_gemini (with inline data: image support and LFI blocking of images[].path), gemini_search (grounded native_search + formatted Markdown citations), and gemini_quota (sanitized pool-level summary with zero emails, labels, tokens, or account IDs).
  • Enforced DNS-rebinding Origin allowlist (403 ORIGIN_REJECTED), MCP-Protocol-Version validation (2025-06-18 / 2025-03-26 / 2024-11-05), strict JSON-RPC -32700/-32600 responses, raw-byte maxPromptBytes enforcement before image decoding, and a persisted mcpEnabled setting (403 MCP_DISABLED when disabled without affecting /v1/*).
  • Added bin/gemini-gateway mcp stdio bridge with HTTPS enforcement for non-loopback hosts, cwd .env isolation, bounded concurrency (8), typed JSON-RPC request-ID tracking, and client notifications/cancelled aborts.

Trilingual Admin UI (English / 繁體中文 / 简体中文) & MCP Controls

  • Added a compact 3-language switcher (EN | 繁 | 简) with full Simplified Chinese (zh-CN) localization across all Admin Console views and a complete README.zh-CN.md.
  • Added MCP Quick Connect (MCP preset), Client Setup (MCP Endpoint URL + status badge + strict JSON MCP (HTTP) with "type": "http" and local-path MCP (stdio) tabs), API Keys dual /v1 + /mcp endpoint strip, Settings Enable MCP Streamable HTTP endpoint switch, and /mcp request telemetry & onboarding recognition.

Standalone Zero-Dependency Extensions (extensions/mcp, extensions/opencode)

  • Added mcp-gemini-app@0.1.0: zero-dependency Node.js >=22 stdio MCP server with fail-closed owner-tagged credential isolation, serialized .reclaim cross-process locking + pre-refresh inode-pinned O_RDWR updates, read-only external Pi auth support, retry account-epoch pinning, O_NONBLOCK | O_NOFOLLOW local image loading, and explicit --accept-terms ToS opt-in.
  • Added opencode-gemini-app@0.1.0: zero-dependency Bun/Node OpenCode provider plugin with loopback & remote OAuth flows, explicit GEMINI_OPENCODE_ACCEPT_TERMS=1 opt-in, per-loader isolated tier resolution before gemini-auto selection, post-tier-probe account identity verification, retry account-epoch pinning, deferred SSE error responses, and ReadableStream.cancel() upstream abort.

Pi 1.5.2 Session Affinity (Fixes #4)

  • Recognized hyphenated session-id in explicit session header resolution (x-session-id → x-session-affinity → session-id → session_id) with strict INVALID_SESSION_ID validation.
  • Updated Pi User-Agent matching to support versioned pi/<version> (...) / pi/<version> headers (e.g. pi/1.5.2 (win32; node/v24.13.0; x64)) for prompt_cache_key fallback affinity.

Verification

  • Full offline pre-release suite passed: 75/75 staged product tests, 71/71 Playwright browser tests (390px + 1440px, light/dark, EN/繁/简), Python + JS SDK smoke tests, all 5 package release checks, and live 9-account gateway affinity verification.
  • Multi-arch Docker image (linux/amd64, linux/arm64) published to ghcr.io/shawtim/gemini-app2api:v1.7.0 and :latest.

Full Changelog: v1.6.6...v1.7.0

v1.6.6 — Responses Multimodal function_call_output with Tool-Image Attribution (Fixes #3)

Choose a tag to compare

@ShawTim ShawTim released this 22 Nov 11:58

Fixes

  • Responses function_call_output Multimodal Arrays (src/openai-contract.mjs, src/openai-usage.mjs, Fixes #3 — thanks @xiao398008!):
    • Accepted array output on POST /v1/responses function_call_output items containing input_text and input_image parts (matching OpenAI Responses & pi-ai's convertToolResultOutput), while strictly rejecting invalid part types (output_text, bare text, logprobs, annotations, parsed) and non-string/non-array output (INVALID_TEXT).
    • Preserved exact interleaved text positions and parallel tool-call attribution by inserting [Tool image N for <call_id>] markers in each tool result and flushing deferred tool images together as a labeled user image turn immediately after each consecutive function_call_output group (avoiding PENDING_TOOL_CALLS on parallel tool calls).
    • Added function_call_output input_image slots to requestBudget() (256 MiB image budget / shared MAX_IMAGES = 256 cap) and measurePromptImagePayload() (258 tokens/image), and deduplicated inline base64 image decoding per request in src/image-input.mjs + src/openai-contract.mjs (4× → 1× decode).
    • Verified with offline unit/HTTP tests and live E2E against gemini-neon using both the exact Issue #3 payload (200 OK) and parallel multi-image attribution (call_a=red, call_b=blue).

Internal Refactors

  • Consolidated NATIVE_VERSION (1.135.1.1291), GATEWAY_USER_AGENT (gemini-app2api/1.0), and shared MODEL_SPECS across Gateway, Pi, and OpenClaw with drift-prevention tests (5a1370b).

Note: pi-gemini-app@0.1.9 and openclaw-gemini-app@0.1.5 do not require version bumps for this release.

Full Changelog: v1.6.5...v1.6.6

v1.6.5 — Dynamic Gateway & Admin UI Version Reporting (Fixes #2)

Choose a tag to compare

@ShawTim ShawTim released this 21 Nov 19:25

Fixes

  • Dynamic Package Version (src/gateway/app.mjs, scripts/live-acceptance.mjs): Replaced hardcoded "1.5.3" version strings in overview(), GET /health (and /admin/api/diagnostics), and scripts/live-acceptance.mjs with dynamic reads from package.json so the Admin UI, health probe, and diagnostics always report the installed release version. Fixes #2 (thanks @kyop21!).
  • Admin UI Version Pill Cleanup (src/admin-v2/app.js): Removed the stale '1.5.3' fallback in versionTag() (hiding the version pill until /admin/api/overview finishes loading) and updated demo mode's synthetic version label to 'demo'.
  • Regression Tests (test/gateway-http.test.mjs, test/admin-v2-static.test.mjs): Added assertions verifying GET /health, GET /admin/api/overview, and versionTag() match package.json with zero stale version literals.

Note: pi-gemini-app@0.1.9 and openclaw-gemini-app@0.1.5 are unchanged in this release.

Full Changelog: v1.6.4...v1.6.5

v1.6.4 — OpenClaw OAuth Login Hotfix, 8,192 Message Limit & Accurate Image Token Usage

Choose a tag to compare

@ShawTim ShawTim released this 21 Nov 15:28

Highlights

  • Critical OpenClaw OAuth Login Hotfix (openclaw-gemini-app@0.1.5):
    • Fixed OAuth login displaying visit: undefined by reading session.authorizationUrl from startLoopbackLogin() (with an explicit non-empty URL guard).
    • Added the required post-login scoped token exchange (refreshNativeCredential(config, tokens.refreshToken)) to acquire assistant/gemini scopes before terms acceptance, quota/tier detection, and generation.
    • Fixed swapped (cred.refresh, config) arguments in refreshOpenClawOAuth, covered by a real-loopback + real-refresh integration test (test/openclaw-extension.test.mjs).
  • Long-Session Message Limit (MAX_MESSAGES = 8,192): Raised MAX_MESSAGES from 1,024 to 8,192 and requestBudget() JSON node limit from 32,768 to 131,072 (src/openai-contract.mjs), returning standard 413 REQUEST_TOO_LARGE (param: "messages" / "input") on overflow instead of misleading 400 MESSAGES_REQUIRED.
  • Accurate Image Token Estimation (pi-gemini-app@0.1.9, Gateway & OpenClaw): Excluded base64 image_url / input_image data strings from promptChars and billed a fixed 258 tokens per image (src/openai-usage.mjs, src/gateway/app.mjs, src/gateway/response-delivery.mjs, extensions/pi/stream.js) so multi-screenshot sessions no longer inflate usage.prompt_tokens.

Packages & Docker

  • Gateway: gemini-app2api@1.6.4 · ghcr.io/shawtim/gemini-app2api:v1.6.4 (linux/amd64, linux/arm64)
  • OpenClaw Plugin: openclaw-gemini-app@0.1.5
  • Pi Extension: pi-gemini-app@0.1.9

Full Changelog: v1.6.3...v1.6.4

v1.6.3 — Clean Short-Reply Stall Recovery, Safe Deliverable Watchdogs & Extension Parity

Choose a tag to compare

@ShawTim ShawTim released this 20 Nov 12:11

Highlights

  • Clean Short-Reply Stall Recovery (< 2,048 B): When upstream finishes streaming verified plain text (mode and attribution verified, no unclosed tool_call fence, tool choice satisfied, no refusal/soft-error, valid structured JSON) and stalls without sending completed: true / END_STREAM, the gateway flushes the reply on attempt 1 with finish_reason: "stop", incomplete: true, and data: [DONE] — eliminating shortOutputRetry and client 300s headers-timeout retry loops.
  • Standalone Pi & OpenClaw Extension Parity: extensions/pi/stream.js (bundled into pi-gemini-app@0.1.8 and openclaw-gemini-app@0.1.4) now finishes verified post-tool and post-output idle stalls cleanly with done (toolUse / stop) instead of raising retryable errors.
  • Tighter, Safe Deliverable-Only Idle Watchdogs: Tuned src/native-provider.mjs defaults to 2s (postCompleteGraceMs), 6s (postToolIdleMs), and 15s (postOutputIdleMs), strictly gated so idle timers only arm once verified, complete, deliverable output already exists — preventing premature 504 -> 422 GENERATION_FAILED aborts during slow mid-tool_call, mid-JSON, or prefill pauses.
  • One-Command Extension Publishing Scripts: Added npm run publish:pi, publish:openclaw:npm, publish:openclaw:clawhub, publish:openclaw, and publish:extensions to package.json.

Packages & Docker

  • Gateway: gemini-app2api@1.6.3 · ghcr.io/shawtim/gemini-app2api:v1.6.3 (linux/amd64, linux/arm64)
  • Pi Extension: pi-gemini-app@0.1.8
  • OpenClaw Plugin: openclaw-gemini-app@0.1.4

Full Changelog: v1.6.2...v1.6.3

v1.6.2 — Long-Context Streaming Resilience, Idle Watchdogs & reasoning_content Compat

Choose a tag to compare

@ShawTim ShawTim released this 20 Nov 07:41

Highlights

  • SSE Keepalive Heartbeats: Emits periodic 15s SSE : keepalive\n\n comments on live streams (src/gateway/response-delivery.mjs, SharedResponse.writeKeepalive in src/gateway/request-resumption.mjs) without polluting replay buffers, preventing Node.js undici 300s bodyTimeout (TypeError: terminated) drops during long prefill/thinking turns.
  • Graceful Deadline Flush: Gives delivery.interrupt() a 2-second grace window on healthy sockets at REQUEST_DEADLINE (src/gateway/app.mjs) to flush finish_reason: "tool_calls" / "stop", incomplete: true, and data: [DONE] cleanly instead of resetting the TCP socket.
  • Post-Tool Hallucination Early-Stop: Immediately cancels upstream generation (turn.cancel()) when liveSplitter.suppressed detects a hallucinated [Caller tool result] after valid tool calls (src/tool-protocol.mjs, src/native-provider.mjs), shared across Gateway, pi-gemini-app@0.1.7, and openclaw-gemini-app@0.1.3.
  • Bounded Upstream Idle Watchdogs: Handles stalled Google Robin streams in src/native-provider.mjs without affecting prefill/thinking silence or < 2,048 B short replies:
    • postCompleteGraceMs (8s): finishes verified completed turns cleanly when upstream omits END_STREAM.
    • postToolIdleMs (15s): flushes committed tool_calls cleanly when upstream stalls after emitting tool calls.
    • postOutputIdleMs (45s): flushes committed >= 2,048 B text cleanly when upstream stalls mid-reply (never tripping short < 2,048 B prefix-gated replies into retry loops).
  • OpenClaw & Reasoning Client Compatibility: Accepts and strips optional reasoning_content / reasoning (string | null) fields on replayed assistant messages (src/openai-contract.mjs), fixing 400 UNSUPPORTED_PARAMETER: messages.reasoning_content.
  • Streamlined Bilingual READMEs: Focused README.md and README.zh.md for faster 30-second onboarding.

Packages & Docker

  • Gateway: gemini-app2api@1.6.2 · ghcr.io/shawtim/gemini-app2api:v1.6.2 (linux/amd64, linux/arm64)
  • Pi Extension: pi-gemini-app@0.1.7
  • OpenClaw Plugin: openclaw-gemini-app@0.1.3

Full Changelog: v1.6.1...v1.6.2

v1.6.1 — Multi-Image E2E Pipeline (Lifted 4-Image/2 MiB Caps, Parallel HTTP/2 Uploads & Per-Account Blob Cache)

Choose a tag to compare

@ShawTim ShawTim released this 20 Nov 03:30

Highlights

  • Lifted Artificial 4-Image / 2 MiB Caps Across Gateway, Pi & OpenClaw Extensions:
    • Raised image safety bounds across the HTTP Gateway (src/image-input.mjs, src/openai-contract.mjs, src/gateway/image-upload.mjs, native-wire/robin-current.mjs), pi-gemini-app@0.1.6, and openclaw-gemini-app@0.1.2 (extensions/pi/transcript.js) to 256 images, 20 MiB per image, and 256 MiB combined decoded bytes, after live Robin verification confirmed 32+ multi-image batches and 10 MiB+ single PNG uploads. Non-image prompt text/JSON remains strictly bounded at 4 MiB.
    • Raised default HTTP JSON maxBodyBytes from 4 MiB to 128 MiB (max 256 MiB) in src/gateway/state.mjs, automatically upgrading untouched legacy 4 MiB defaults on restart while respecting explicit custom overrides.
  • Parallel HTTP/2 Image Uploads & Per-Account In-Memory blobId Cache:
    • Upgraded uploadNativeImages (src/gateway/image-upload.mjs) to multiplex concurrent HTTP/2 uploads (concurrency = 8, preserving exact attachment ordering) with upload timeouts scaled to the request deadline (up to 180s per turn / 600s max).
    • Added a lightweight, strictly isolated ephemeral in-memory ImageBlobCache ((accountId, tokenFingerprint, mimeType, sha256) -> blobId, 15 min TTL, max 2,048 entries, never storing image bytes or persisting to disk) across src/native-provider.mjs and extensions/pi/stream.js—eliminating redundant screenshot re-uploads across multi-turn E2E runs with transparent single-shot eviction and fresh re-upload fallback if a cached blobId expires before frames arrive.

Verification

  • npm run test:prerelease + CI offline gates (docker-copy-closure-offline, historical-entry-gate-offline): ALL PASS (verify-offline-product-runner 70 files, test:current-contract 6/6, test:product 70/70, test:browser 70/70 Playwright, test:python, docker build + test:docker, and test:release incl. pi-gemini-app@0.1.6 + openclaw-gemini-app@0.1.2).

Full Changelog: v1.6.0...v1.6.1

v1.6.0 — Standalone OpenClaw Provider Plugin (openclaw-gemini-app) & Retryable 503 SERVER_SHUTDOWN

Choose a tag to compare

@ShawTim ShawTim released this 19 Nov 21:27

Highlights

  • Standalone Zero-Dependency OpenClaw Provider Plugin (openclaw-gemini-app@0.1.1):
    • Published on npm (openclaw-gemini-app) and ClawHub (openclaw plugins install npm:openclaw-gemini-app).
    • Manifest-first openclaw.plugin.json registering gemini-app with 512k gemini-neon / gemini-hydrogen, 128k gemini-flash-lite / gemini-auto, gemini-argon → gemini-neon alias normalization, and automatic Free-tier model filtering.
    • Local browser and remote VPS copy-paste OAuth login with automatic ToS acceptance, refreshOAuth, OpenClaw requestAuth v1 fresh token resolution with assertCurrent(), /usage quota snapshots + /gemini-quota, failover & context-overflow classifiers, and full parity with 15s HTTP/2 PING keepalives, HTTPS_PROXY tunneling, and 256-tool support.
    • Deterministic builder (scripts/build-openclaw-package.mjs), verifier (scripts/check-openclaw-package.mjs, wired into npm run test:release), and offline tests (test/openclaw-extension.test.mjs, test/openclaw-package-build.test.mjs), passing @openclaw/plugin-inspector (0 breakages, 0 issues) against openclaw@2026.11.6.
  • Retryable 503 SERVER_SHUTDOWN on Gateway Restarts:
    • Fixed in-flight generation turns interrupted by gateway shutdown/restart (src/gateway/app.mjs) to return standard retryable HTTP 503 (code: "SERVER_SHUTDOWN", type: "server_error", Retry-After: 2) instead of non-retryable 499 invalid_request_error / NATIVE_TURN_ABORTED, with regression coverage in test/gateway-http.test.mjs.
  • Visual Assets & Bilingual Docs:
    • Added docs/assets/openclaw-extension.jpg, docs/assets/extensions-overview.jpg, and openclaw-gemini-app npm badges across README.md, README.zh.md, and extensions/openclaw/README.md.

Verification

  • npm run test:prerelease: PASS (verify-offline-product-runner 70 files, test:current-contract 6/6, test:product 70/70, test:browser 70/70 Playwright, test:python, docker build + test:docker, and test:release incl. pi-gemini-app@0.1.5 + openclaw-gemini-app@0.1.1).

Full Changelog: v1.5.3...v1.6.0