Skip to content

toolChoice required doesn't work with vertex gemini-2.0-pro or gemini-2.5-pro #6824

Open
@regevaz

Description

@regevaz

Description

when trying to force the agent to use tools through toolChoice: 'required' the agent won't response with anything and no tool will be triggered

either I misuse it (e.g. you're not expecting someone to force tool usage) or there's a bug. I must say that it seems like a regression

AI SDK Version

ai 4.3.15
@ai-sdk/google-vertex 2.2.24
@ai-sdk/react 1.2.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions