Skip to content

[bug] google provider not running due to tool call schema mismatches #365

Closed

Description

@monotykamary

This seems to affect most, if not all gemini models

opencode run --model google/gemini-2.5-pro --print-logs "Read the README file"
...
INFO  2025-06-24T18:07:10 +0ms service=bus type=message.part.updated subscribing
INFO  2025-06-24T18:07:10 +1ms service=session session=ses_85ce0a527ffeuB624MpMl5toK5 chatting
INFO  2025-06-24T18:07:10 +0ms service=app name=provider registering service
INFO  2025-06-24T18:07:10 +1ms service=models.dev refreshing
INFO  2025-06-24T18:07:10 +0ms service=provider init
INFO  2025-06-24T18:07:10 +1ms service=provider providerID=openai found
INFO  2025-06-24T18:07:10 +0ms service=provider providerID=anthropic found
INFO  2025-06-24T18:07:10 +0ms service=provider providerID=openrouter found
INFO  2025-06-24T18:07:10 +0ms service=provider providerID=groq found
INFO  2025-06-24T18:07:10 +0ms service=provider providerID=google found
INFO  2025-06-24T18:07:10 +0ms service=provider providerID=google modelID=gemini-2.5-pro getModel
INFO  2025-06-24T18:07:10 +1ms service=provider status=started providerID=google getSDK
INFO  2025-06-24T18:07:10 +13ms service=provider status=completed duration=13 providerID=google getSDK
INFO  2025-06-24T18:07:10 +0ms service=provider providerID=google modelID=gemini-2.5-pro found
INFO  2025-06-24T18:07:10 +1ms service=session sessionID=ses_85ce0a527ffeuB624MpMl5toK5 locking
INFO  2025-06-24T18:07:10 +4ms service=bus type=storage.write publishing
INFO  2025-06-24T18:07:10 +0ms service=bus type=message.updated publishing
INFO  2025-06-24T18:07:10 +1ms service=bus type=storage.write publishing
INFO  2025-06-24T18:07:10 +0ms service=bus type=message.updated publishing
INFO  2025-06-24T18:07:10 +0ms service=app name=mcp registering service
INFO  2025-06-24T18:07:10 +0ms service=mcp key=playbook type=local found
ERROR 2025-06-24T18:07:13 +3123ms service=session error=AI_APICallError: * GenerateContentRequest.tools[0].function_declarations[22].parameters.required[4]: property is not defined
* GenerateContentRequest.tools[0].function_declarations[22].parameters.properties[evaluators].items.required[1]: property is not defined
* GenerateContentRequest.tools[0].function_declarations[22].parameters.properties[testData].items: missing field.
 callback error
INFO  2025-06-24T18:07:13 +0ms service=bus type=session.error publishing
INFO  2025-06-24T18:07:13 +2ms service=session session=ses_85ce0a527ffeuB624MpMl5toK5 type=error part
INFO  2025-06-24T18:07:13 +0ms service=session session=ses_85ce0a527ffeuB624MpMl5toK5 type=error unhandled
INFO  2025-06-24T18:07:13 +2ms service=bus type=storage.write publishing
INFO  2025-06-24T18:07:13 +0ms service=bus type=message.updated publishing
INFO  2025-06-24T18:07:13 +1ms service=session sessionID=ses_85ce0a527ffeuB624MpMl5toK5 unlocking
INFO  2025-06-24T18:07:13 +0ms service=app name=session shutdown
INFO  2025-06-24T18:07:13 +0ms service=app name=mcp shutdown
INFO  2025-06-24T18:07:15 +1378ms service=bus type=storage.write publishing
INFO  2025-06-24T18:07:15 +0ms service=bus type=session.updated publishing

Activity

  1. changed the title [-][bug] google provider not running due to undefined property[/-] [+][bug] google provider not running due to tool call schema mismatches[/+] on Jun 24, 2025
  2. monotykamary commented on Jun 24, 2025

    @monotykamary
    ContributorAuthor

    hmm, it seemed to be an intermittent issue on Google's side it seems.

  3. oatmealm commented on Jul 26, 2025

    @oatmealm

    I'm seeing it now with all models.

    Error: AI_APICallError: * GenerateContentRequest.tools[0].function_declarations[42].parameters.properties[end_published_date].format: only 'enum' and 'date-time' are supported for STRING type
    * GenerateContentRequest.tools[0].function_declarations[42].parameters.properties[start_published_date].format: only 'enum' and 'date-time' are supported for STRING type
    * GenerateContentRequest.tools[0].function_declarations[43].parameters.properties[url].format: only 'enum' and 'date-time' are supported for STRING type
    
  4. jacquesbh commented on Nov 26, 2025

    @jacquesbh

    Hi,

    Even if it's closed, I would like to give some details.

    Some models don't support stdio MCP servers.

    Disable all your MCPs in your configuration file, then enable them one by one to check if your opencode is responding.

    I found out that I was using a MCP server using stdio protocol, which wasn't compatible with the new Gemini models!

    Disabling this MCP server gave me those models back!

    edit: it seems obvious to proceed like this, but at least it is written :)

  5. rekram1-node commented on Nov 26, 2025

    @rekram1-node
    Collaborator

    @jacquesbh it shouldn't have anything to do with stdio, but it does have to do with tool schemas, we need better sanitization of tools

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions