GeezerVison is showing github.com — antigravity-ls-proxy: translate model tool calls into OpenAI tool_calls (route is text-only today) · Issue #865 · developing-today/code
antigravity-ls-proxy: translate model tool calls into OpenAI tool_calls (route is text-only today) #865
Description
Problem
antigravity-ls is the fleet's one Antigravity provider (2026-10-24 decision; antigravity-agy is disabled as the parked fallback), but no OpenCode session routed through it can execute tools. Models return their tool calls as plain text and tool_calls is always null, so a coding session on this provider announces actions and does nothing.
This went unseen because every "verified working" check was a text completion probe (laptop pass 2026-10-24: agy 6s / ls 2s). Tool execution over this route was never verified.
Evidence (2026-10-25, laptop, direct proxy probes)
POST http://127.0.0.1:18745/v1/chat/completions with an OpenAI tools payload (a single run_echo function, "call the tool, do not answer in text"):
gemini-3-flash → finish_reason: stop, tool_calls: null, content = a fenced JSON block naming the function and arguments.
claude-opus-5-5 in a live OpenCode session (ses_e93894d2, 2026-10-25 ~04:23 CDT) streamed Anthropic <invoke name="shell"> XML blocks as text; the turn ended "succeeded" with zero tools executed. (A later direct probe of the Claude model returned 429 — the Antigravity account's Claude quota fraction is separately exhausted; that is a quota state, not this bug.)
Root cause
bin/antigravity-ls-proxy.mjs (~907 lines) is a text-flattening bridge:
- Request side: it serializes the conversation — including prior
tool_calls and tool results — into prompt text (around lines 480–494).
- Response side: there is no tool-call handling at all.
grep for functionCall / function_call in the file returns zero hits; nothing parses a language-server response into OpenAI tool_calls, and finish_reason is never tool_calls.
Fix scope
- Parse LS responses for tool invocations per model family (Claude's XML invoke format; Gemini's function-call parts / JSON blocks) and emit structured OpenAI
tool_calls with finish_reason: "tool_calls", including on the streaming path if the proxy streams.
- Keep the existing request-side flattening of tool results, or replace it with the LS-native equivalent where one exists.
- Add a regression probe/test: a tools payload against the running proxy must return structured
tool_calls for at least one Claude and one Gemini model (quota permitting for Claude).
Acceptance
- An OpenCode session on
antigravity-ls/<model> executes a shell tool end to end (tool part recorded as executed in the session, result fed back, work continues).
- The direct probe above returns
tool_calls instead of a text block.
Related
- code#480 (warm-session proxies) — same proxy family; this is the correctness gap underneath it.
- The still-owed antigravity benchmark (which model works with the plan, draws quota correctly, reuses sessions, caches, and is not ~10s+/command) cannot be run meaningfully for session work until this lands.
Activity
developing-today commented on Oct 25, 2026
Metadata
Metadata
Development
No branches or pull requestsIssue actions