[BUG]: todoread tool missing schema causes 400 error with Antigravity API #6626

Closed
opened 2026-02-16 18:04:48 -05:00 by yindo · 1 comment
Owner

Originally created by @MalteBoehm on GitHub (Jan 17, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

The todoread tool is defined without a schema (hasSchema=n in debug output), which causes HTTP 400 errors when using Antigravity API (via opencode-antigravity-auth plugin).

Antigravity's API strictly validates tool definitions and rejects requests where any tool has an empty/missing parameters schema.

Error

Request contains an invalid argument.
Status: 400
Tool Debug Missing: 1
Tool Debug Summary: ... decl=todoread,src=functionDeclarations,hasSchema=n ...

Expected Behavior

todoread should have a minimal schema, e.g.:

{
  "parameters": {
    "type": "object",
    "properties": {
      "_placeholder": {
        "type": "boolean",
        "description": "Placeholder. Always pass true."
      }
    },
    "required": ["_placeholder"]
  }
}

This matches the pattern used by other tools like todowrite.

Environment

  • opencode version: 1.1.25
  • Plugin: opencode-antigravity-auth@beta
  • Platform: macOS ARM64

Workaround

Currently no workaround - cannot use Antigravity API with opencode due to this bug.

Related

This may affect other providers with strict schema validation.

Originally created by @MalteBoehm on GitHub (Jan 17, 2026). Originally assigned to: @rekram1-node on GitHub. ## Description The `todoread` tool is defined without a schema (`hasSchema=n` in debug output), which causes HTTP 400 errors when using Antigravity API (via `opencode-antigravity-auth` plugin). Antigravity's API strictly validates tool definitions and rejects requests where any tool has an empty/missing `parameters` schema. ## Error ``` Request contains an invalid argument. Status: 400 Tool Debug Missing: 1 Tool Debug Summary: ... decl=todoread,src=functionDeclarations,hasSchema=n ... ``` ## Expected Behavior `todoread` should have a minimal schema, e.g.: ```json { "parameters": { "type": "object", "properties": { "_placeholder": { "type": "boolean", "description": "Placeholder. Always pass true." } }, "required": ["_placeholder"] } } ``` This matches the pattern used by other tools like `todowrite`. ## Environment - opencode version: 1.1.25 - Plugin: opencode-antigravity-auth@beta - Platform: macOS ARM64 ## Workaround Currently no workaround - cannot use Antigravity API with opencode due to this bug. ## Related This may affect other providers with strict schema validation.
yindo closed this issue 2026-02-16 18:04:48 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 17, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #8184: Strict JSON Schema validation fail on backends like SGLang (Missing required field in empty tool parameters)
  • #8857: Gemini 3 models fail with "Invalid JSON payload received. Unknown name 'parameters'" error
  • #9020: Claude models fail on MCP tools with no required parameters (undefined vs {})

These issues are all related to the todoread tool's missing schema and parameter validation, affecting various LLM backends that have strict validation requirements (Antigravity API, SGLang, Gemini 3, etc.).

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 17, 2026): This issue might be a duplicate of existing issues. Please check: - #8184: Strict JSON Schema validation fail on backends like SGLang (Missing required field in empty tool parameters) - #8857: Gemini 3 models fail with "Invalid JSON payload received. Unknown name 'parameters'" error - #9020: Claude models fail on MCP tools with no required parameters (undefined vs {}) These issues are all related to the `todoread` tool's missing schema and parameter validation, affecting various LLM backends that have strict validation requirements (Antigravity API, SGLang, Gemini 3, etc.). Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6626