Skip to content

Conversation

@bhuvaneshprasad
Copy link

Fix DurableAgent + OpenAI Responses API failing on tool calls due to missing required reasoning item. The issue occurred because tool calls were forwarding itemId in providerMetadata, which requires a paired reasoning item that DurableAgent doesn't provide.

Changes:

  • Remove itemId from tool call providerMetadata
  • Add previousResponseId tracking for proper conversation continuity
  • Extract responseId from finish chunk and pass it in subsequent requests

The previousResponseId approach is sufficient for conversation continuity and avoids the duplicate item error that occurs when both previousResponseId and itemId are present.

Fixes #880

@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

⚠️ No Changeset found

Latest commit: fbcd78a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link
Contributor

vercel bot commented Jan 29, 2026

@bhuvaneshprasad is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@bhuvaneshprasad bhuvaneshprasad force-pushed the fix/openai-responses-api branch from 5f6a49f to daddac9 Compare January 29, 2026 09:53
Fix DurableAgent + OpenAI Responses API failing on tool calls due to
missing required reasoning item. The issue occurred because tool calls
were forwarding itemId in providerMetadata, which requires a paired
reasoning item that DurableAgent doesn't provide.

Changes:
- Remove itemId from tool call providerMetadata
- Add previousResponseId tracking for proper conversation continuity
- Extract responseId from finish chunk and pass it in subsequent
  requests

The previousResponseId approach is sufficient for conversation
continuity and avoids the duplicate item error that occurs when
both previousResponseId and itemId are present.

Fixes vercel#880

Signed-off-by: bhuvaneshprasad <98113536+bhuvaneshprasad@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant