"question" tool schema causes "400 Bad Request" with Gemini/Vertex AI` #8107

Open
opened 2026-02-16 18:09:11 -05:00 by yindo · 3 comments
Owner

Originally created by @guhur1 on GitHub (Jan 31, 2026).

Originally assigned to: @thdxr on GitHub.

Description

I am encountering compatibility issues when using Google Gemini models (via Custom Provider). Even after removing all plugins (like oh-my-opencode), the chat still fails with a 400 error unless the built-in question tool is explicitly disabled.

It appears the JSON Schema definition for the question tool contains keywords or structures that are incompatible with the strict schema requirements of Google's Vertex AI/Gemini API.

Plugins

oh my opencode

OpenCode version

1.1.47

Steps to reproduce

Using the following opencode.json configuration triggers the error:

{
  "plugin": [],
  "tools": {
    "question": true  // Default behavior
  }
}

### Screenshot and/or share link

<img width="617" height="212" alt="Image" src="https://github.com/user-attachments/assets/932aca33-78d0-4c7e-af7b-2b7bc68debda" />
<img width="827" height="466" alt="Image" src="https://github.com/user-attachments/assets/2898c1b4-9b53-485d-a826-2f005f6f583f" />

### Operating System

Windows 10

### Terminal

Windows Terminal
Originally created by @guhur1 on GitHub (Jan 31, 2026). Originally assigned to: @thdxr on GitHub. ### Description I am encountering compatibility issues when using Google Gemini models (via Custom Provider). Even after removing all plugins (like `oh-my-opencode`), the chat still fails with a 400 error unless the built-in **`question`** tool is explicitly disabled. It appears the JSON Schema definition for the `question` tool contains keywords or structures that are incompatible with the strict schema requirements of Google's Vertex AI/Gemini API. ### Plugins oh my opencode ### OpenCode version 1.1.47 ### Steps to reproduce Using the following `opencode.json` configuration triggers the error: ```json { "plugin": [], "tools": { "question": true // Default behavior } } ### Screenshot and/or share link <img width="617" height="212" alt="Image" src="https://github.com/user-attachments/assets/932aca33-78d0-4c7e-af7b-2b7bc68debda" /> <img width="827" height="466" alt="Image" src="https://github.com/user-attachments/assets/2898c1b4-9b53-485d-a826-2f005f6f583f" /> ### Operating System Windows 10 ### Terminal Windows Terminal
yindo added the windowsbug labels 2026-02-16 18:09:11 -05:00
Author
Owner

@rekram1-node commented on GitHub (Jan 31, 2026):

Can you share your error? I tried using google and it works fine

@rekram1-node commented on GitHub (Jan 31, 2026): Can you share your error? I tried using google and it works fine
Author
Owner

@guhur1 commented on GitHub (Jan 31, 2026):

Image Image
@guhur1 commented on GitHub (Jan 31, 2026): <img width="617" height="212" alt="Image" src="https://github.com/user-attachments/assets/8a2054f7-e913-4933-bfc7-d78945149971" /> <img width="827" height="466" alt="Image" src="https://github.com/user-attachments/assets/89bb2f2c-e557-49fd-a3f2-5ebeed44b514" />
Author
Owner

@guhur1 commented on GitHub (Jan 31, 2026):

Image Image
@guhur1 commented on GitHub (Jan 31, 2026): <img width="837" height="618" alt="Image" src="https://github.com/user-attachments/assets/797f8b5c-5cc7-48af-9329-741c34093915" /> <img width="780" height="420" alt="Image" src="https://github.com/user-attachments/assets/f5e04c2a-f17e-4bb5-a24b-97c8faf8b8e9" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8107