Skip to content

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

@guhur1

Description

@guhur1

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions