Skip to content

feat: support reasoning in responses chat adapter#1241

Merged
HaiHui886 merged 1 commit into
mainfrom
sync_mr_2691_bd81794
Jul 9, 2026
Merged

feat: support reasoning in responses chat adapter#1241
HaiHui886 merged 1 commit into
mainfrom
sync_mr_2691_bd81794

Conversation

@Rader

@Rader Rader commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary:

  • Extends the chat adapter to correctly parse and transform reasoning outputs (e.g., reasoning_content, reasoning) into standard Responses items while preserving normal text, ensuring compatibility across upstreams like DeepSeek and GLM.
  • Introduces a configurable metadata field for upstreams to define custom reasoning request mappings, allowing the gateway to translate standard reasoning.effort parameters into provider-specific chat body fields without hardcoding logic.
  • Enhances input validation and token usage tracking to handle reasoning summaries, drop unsupported tools gracefully, and ensure accurate token counting even when upstream usage data is missing.

@Rader

Rader commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

Depends on #1240

@HaiHui886 HaiHui886 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@HaiHui886
HaiHui886 merged commit acf6674 into main Jul 9, 2026
7 checks passed
@HaiHui886
HaiHui886 deleted the sync_mr_2691_bd81794 branch July 9, 2026 00:30
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.

3 participants