Skip to content

Improve support for reasoning models#287

Open
djfarrelly wants to merge 4 commits intomainfrom
dan/exe-1250-agentkit-fails-to-work-with-gpt-52-reasoning-models
Open

Improve support for reasoning models#287
djfarrelly wants to merge 4 commits intomainfrom
dan/exe-1250-agentkit-fails-to-work-with-gpt-52-reasoning-models

Conversation

@djfarrelly
Copy link
Member

Changes and improvements include:

  • Add ReasoningMessage type to support reasoning/thinking content from OpenAI (o-series, gpt-*-pro/codex) and Anthropic (extended thinking) models
  • Extract reasoning_content from OpenAI responses and thinking blocks from Anthropic responses into the new message type
  • Filter reasoning messages from outbound requests across all adapters (OpenAI, Anthropic, Gemini)
  • Improve OpenAI reasoning model detection with isReasoningModel() helper, replacing hardcoded o1/o3 checks
  • Fix potential infinite loop in agent run loop when model output contains only reasoning messages (no stop_reason)
  • Stream reasoning content via reasoning.delta events when streaming is enabled

@linear
Copy link

linear bot commented Feb 5, 2026

@changeset-bot
Copy link

changeset-bot bot commented Feb 5, 2026

🦋 Changeset detected

Latest commit: 2ff46bf

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

This PR includes changesets to release 1 package
Name Type
@inngest/agent-kit 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

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