Skip to content

fix(ai-sdk-provider): fix tool call propagation and tool message formatting - #3501

Open
Adityakk9031 wants to merge 1 commit into
inkeep:mainfrom
Adityakk9031:fix/ai-sdk-provider-tool-calling
Open

fix(ai-sdk-provider): fix tool call propagation and tool message formatting#3501
Adityakk9031 wants to merge 1 commit into
inkeep:mainfrom
Adityakk9031:fix/ai-sdk-provider-tool-calling

Conversation

@Adityakk9031

Copy link
Copy Markdown

Summary

This PR fixes tool call handling and message serialization in @inkeep/ai-sdk-provider:

  1. Tool Message Format & Propagation:
    • Added \ ool_call_id\ and \ ool_calls\ properties to \InkeepChatMessage\ interface in \inkeep-chat-prompt.ts.
    • Updated \convertToInkeepChatMessages\ in \convert-to-inkeep-messages.ts\ so that \ ool\ role messages properly format their \ ool_call_id\ and content, and assistant tool calls are preserved.
  2. Schema & Model Output Handling:
    • Updated \inkeepChatCompletionSchema\ in \inkeep-chat-language-model.ts\ to accept nullable content when \ ool_calls\ are present.
    • Fixed \doGenerate\ to emit tool-call generation objects and avoid discarding model-invoked tool calls.

Verification

  • \pnpm --filter @inkeep/ai-sdk-provider test\ passes (all unit tests pass).
  • \pnpm --filter @inkeep/ai-sdk-provider typecheck\ passes with 0 errors.

@itoqa

itoqa Bot commented Aug 15, 2026

Copy link
Copy Markdown

⚠️ Ito did not review this pull request because the PR author doesn't have an Ito seat.

An admin can assign one in Ito team settings.

@changeset-bot

changeset-bot Bot commented Aug 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c919083

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@inkeep/ai-sdk-provider Patch
@inkeep/agents-api Patch
@inkeep/agents-manage-ui Patch
@inkeep/agents-cli Patch
@inkeep/agents-core Patch
@inkeep/agents-email Patch
@inkeep/agents-mcp Patch
@inkeep/agents-sdk Patch
@inkeep/agents-work-apps Patch
@inkeep/create-agents Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution!

What happens next:

  • A maintainer will review your PR.
  • If you don't hear back within a few business days, please comment here to nudge our team.
  • This repository is maintained through an internal mirror. When your change is accepted, this PR will close automatically. Don't be alarmed when it closes — that's how it merges, and your authorship is preserved.

@Adityakk9031

Copy link
Copy Markdown
Author

@robert-inkeep have a look

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant