Skip to content

[Bug]: Gemini from Vertex Error: edit functionDeclaration parameters.edits.lines schema didn't specify the schema type field. #2408

@Ritel-T

Description

@Ritel-T

Prerequisites

  • I will write this issue in English (see our Language Policy)
  • I have searched existing issues to avoid duplicates
  • I am using the latest version of oh-my-opencode
  • I have read the documentation or asked an AI coding agent with this project's GitHub URL loaded and couldn't find the answer

Bug Description

Related (not identical issue): #2074 , QuantumNous/new-api#3022 , anomalyco/opencode#15795.

When using Google Vertex AI gemini-3-flash-preview, gemini-3.1-pro-preview or gemini-3.1-pro-preview-customtools models:

Unable to submit request because edit functionDeclaration parameters.edits.lines schema didn't specify the schema type field. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling

No such problem with glm-5 from Vertex.

No such problem when using original OpenCode without Oh-My-Openagent. (Related fix anomalyco/opencode#15318 but not the identical error)

All the related issues are talking about any_of must be the only field set but this one is not.

Screenshot: upper without oMo, lower with oMo.

Image

Steps to Reproduce

Use Gemini models from Google Vertex AI provider in OpenCode with Oh-My-Openagent.

Expected Behavior

No error.

Actual Behavior

Unable to submit request because edit functionDeclaration parameters.edits.lines schema didn't specify the schema type field. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling

Doctor Output

OpenCode version 1.2.23
oMo version v3.11.0

Error Logs

Configuration

Additional Context

No response

Operating System

Windows

OpenCode Version

1.2.23

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions