You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(llm)!: extract reasoning traces to separate field instead of prepending (#1468)
* feat(llm)!: add reasoning_content field to GenerationResponse
BREAKING CHANGE: Reasoning traces are no longer prepended directly to
response content. When using GenerationOptions, reasoning is now
available
in the separate reasoning_content field. Without GenerationOptions,
reasoning is wrapped in <thinking> tags.
Refactor reasoning trace handling to expose reasoning content as a
separate
field in GenerationResponse instead of prepending it to response
content.
- Add reasoning_content field to GenerationResponse for structured
access
- Populate reasoning_content in generate_async when using
GenerationOptions
- Wrap reasoning traces in <thinking> tags for dict/string responses
- Update test to reflect new behavior (no longer prepending reasoning)
- Add comprehensive tests for new field and behavior changes
This improves API usability by separating reasoning content from the
actual
response, allowing clients to handle thinking traces independently.
Resolves the TODO from PR #1432 about not prepending reasoning traces to
final generation content.
0 commit comments