Skip to content

feat: v1/messages support, part 1 (types): add reasoning field to ChatMessage - #2282

Open
RobGeada wants to merge 1 commit into
NVIDIA-NeMo:developfrom
RobGeada:feat/anthropic-message-types
Open

feat: v1/messages support, part 1 (types): add reasoning field to ChatMessage#2282
RobGeada wants to merge 1 commit into
NVIDIA-NeMo:developfrom
RobGeada:feat/anthropic-message-types

Conversation

@RobGeada

Copy link
Copy Markdown
Contributor

Description

Add an optional reasoning field to the ChatMessage dataclass so reasoning content survives round-tripping through to_dict/from_dict, and extract it from OpenAI-compatible responses via the 'reasoning' key in addition to 'reasoning_content'. This is in preparation for the inline reasoning blocks inside of Anthropic v1/messages. Incidentally, this should also add vLLM reasoning support, which arrives in the reasoning field of a message.

Related Issue(s)

#2226

Verification

AI Assistance

  • No AI tools were used.
  • AI tools were used; a human reviewed and can explain every change (tool: Claude code).

Checklist

  • I've read the CONTRIBUTING guidelines.
  • This PR links to a triaged issue assigned to me.
  • My PR title follows the project commit convention.
  • I've updated the documentation if applicable.
  • I've added tests if applicable.
  • I've noted any verification beyond CI and any checks I couldn't run.
  • I did not update generated changelog files manually.
  • I addressed all CodeRabbit, Greptile, and other review comments, or replied with why no change is needed.
  • @mentions of the person or team responsible for reviewing proposed changes.

Add an optional reasoning field to the ChatMessage dataclass so
reasoning content survives round-tripping through to_dict/from_dict,
and extract it from OpenAI-compatible responses via the 'reasoning'
key in addition to 'reasoning_content'.

Signed-off-by: Rob Geada <rob@geada.net>
@github-actions github-actions Bot added size: S status: needs triage New issues that have not yet been reviewed or categorized. needs: signing labels Aug 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR merge guidance

@RobGeada thanks for the PR. GitHub is currently blocking merge for one or more repository requirements:

  • 1 commit does not have a verified signature (26e6b0e). Please sign the commits and force-push the updated branch.

Relevant guide:

@RobGeada RobGeada changed the title feat: v1/messages support types, part 1: add reasoning field to ChatMessage feat: v1/messages support, part 1 (types): add reasoning field to ChatMessage Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs: signing size: S status: needs triage New issues that have not yet been reviewed or categorized.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant