Skip to content

bug: tool execution approval not working with gateway #10663

@nicoalbanese

Description

@nicoalbanese

Description

Tool execution approval rejections work with OpenAI provider but fail with Gateway provider.

Steps to repro:

  1. run examples/ai-core/src/stream-text/openai-tool-approval.ts
  2. change provider / model to use gateway
  3. ask for weather somewhere then reject the execution approval

When a user denies a tool execution approval (answers "n" to the approval prompt), the gateway returns a GatewayInvalidRequestError: Invalid input error, specifically complaining about invalid output field in the prompt at "prompt",3,"content",0,"output"

AI SDK Version

Latest

Code of Conduct

  • I agree to follow this project's Code of Conduct

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