Skip to content

Google Provider - .enum: only allowed for STRING type #28397

Closed as not planned
Closed as not planned

Description

@GewoonJaap

Description

I added the Google provider via the OpenCode MacOS Desktop app, with an API key gotten from Google's AI studio.

When sending a message (fresh chat), I always get this error for all Google provider models: GenerateContentRequest.tools[0].function_declarations[102].parameters.properties[operation].enum: only allowed for STRING type

Plugins

No response

OpenCode version

1.15.5

Steps to reproduce

  1. Add Google provider with AI studio API Key
  2. Select a Gemini model Gemini 3.5 for example
  3. Send a chat
  4. Observe the error

Screenshot and/or share link

https://opncd.ai/share/BpdgIS4q

Operating System

MacOS

Terminal

No response

Activity

  1. github-actions commented on May 19, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. github-actions commented on Jul 19, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  3. riopratama7253-alt commented on Jul 20, 2026

    @riopratama7253-alt

    Description

    I added the Google provider via the OpenCode MacOS Desktop app, with an API key gotten from Google's AI studio.

    When sending a message (fresh chat), I always get this error for all Google provider models: GenerateContentRequest.tools[0].function_declarations[102].parameters.properties[operation].enum: only allowed for STRING type

    Plugins

    No response

    OpenCode version

    1.15.5

    Steps to reproduce

    1. Add Google provider with AI studio API Key
    2. Select a Gemini model Gemini 3.5 for example
    3. Send a chat
    4. Observe the error

    Screenshot and/or share link

    https://opncd.ai/share/BpdgIS4q

    Operating System

    MacOS

    Terminal

    No response

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

Metadata

Metadata

Assignees

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