Skip to content

gemini schema error: invalid value (TYPE_STRING), false #54033

Description

@jardon

Description

opencode 1.18.35 with gemini fails to communicate with the gemini api. attempting to use any of their models results in the following error

Invalid value at 'tools[0].function_declarations[10].parameters.properties[10].value.enum[0]' (TYPE_STRING), true
Invalid value at 'tools[0].function_declarations[41].parameters.properties[0].value.properties[5].value.items.properties[7].value.enum[0]' (TYPE_STRING), false

Plugins

diff-viewer internal:home-footer internal:home-tips internal:notifications internal:sidebar-context internal:sidebar-files internal:sidebar-footer internal:sidebar-lsp internal:sidebar-mcp internal:sidebar-todo which-key

OpenCode version

1.18.35

Steps to reproduce

  1. add a gemini api key
  2. swap to a gemini model
  3. weep

Screenshot and/or share link

Image

Operating System

arch linux

Terminal

GNOME Console

Activity

  1. opencode-agent commented on Oct 8, 2026

    @opencode-agent
    Contributor

    Thanks for the report and the exact error, @jardon!

    1.18.35 is OpenCode v1. v1 only gets fixes for critical bugs (data loss, security problems, or breakage with no workaround), so this is unlikely to be fixed there.

    What's happening: one or more of your tools has a parameter schema with an enum that contains booleans (true/false). Gemini only accepts strings in enum here. The tool numbers in the error (function_declarations[10] and [41]) suggest the tools come from an MCP server or a plugin, not OpenCode's built-in tools.

    Workaround: disable your MCP servers or plugin tools one at a time until Gemini works again. Then keep the one causing the error turned off while you use Gemini models.

    v2: OpenCode v2 (@opencode/cli) sends tool schemas to Gemini in a different way, so it may not hit this error. Please try upgrading.

    If you think this is critical, or you see the same error on v2, please reply here.

    Related issues:

  2. opencode-agent commented on Oct 9, 2026

    @opencode-agent
    Contributor

    We haven't heard back, so I'm closing this as not planned. This Gemini schema error was reported on v1 (1.18.35), and v1 only gets fixes for critical bugs. You can work around it by disabling the MCP server or plugin tool whose schema has boolean enum values. OpenCode v2 (@opencode/cli) sends tool schemas to Gemini in a different way, so it's worth trying.

    If you see the same error on v2, please open a new issue with your v2 version, or reply here. Thanks again for the report, @jardon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions