Skip to content

fix: add experimental_onToolCallStart/Finish to AgentCallParameters type#14348

Open
Christian-Sidak wants to merge 1 commit intovercel:release-v6.0from
Christian-Sidak:fix/agent-call-parameters-type
Open

fix: add experimental_onToolCallStart/Finish to AgentCallParameters type#14348
Christian-Sidak wants to merge 1 commit intovercel:release-v6.0from
Christian-Sidak:fix/agent-call-parameters-type

Conversation

@Christian-Sidak
Copy link
Copy Markdown

Summary

  • Added missing experimental_onToolCallStart and experimental_onToolCallFinish optional callback properties to the AgentCallParameters type
  • Added type test confirming the callbacks are accepted by agent.generate()
  • Added changeset

These callbacks already worked at runtime (flowing through the ...options rest spread into generateText/streamText) but were missing from the TypeScript type, forcing consumers to use as any.

Fixes #14278

Test plan

  • Verify type test in tool-loop-agent.test-d.ts passes
  • Confirm no new type errors introduced (existing pre-existing errors in v6 branch unaffected)

The AgentCallParameters type was missing experimental_onToolCallStart and
experimental_onToolCallFinish callback properties. These callbacks already
worked at runtime (flowing through the rest spread into generateText/streamText)
but caused TypeScript errors when passed to agent.generate() or agent.stream().

Fixes vercel#14278
@tigent tigent bot added ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. bug Something isn't working as documented labels Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. bug Something isn't working as documented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant