Commit cee097e
committed
feat: add reasoning token support to OpenRouter integration
Extract reasoning/thinking content from OpenRouter responses and attach
to ChatMessage via ReasoningContent. Override run(), run_async(), and
stream handler. Handle multi-turn by re-injecting reasoning_details
into formatted message dicts.
13 new tests covering extraction, conversion, streaming, multi-turn,
edge cases, and async paths.
Closes #21811 parent 8d216d9 commit cee097e
3 files changed
Lines changed: 756 additions & 34 deletions
File tree
- integrations/openrouter
- src/haystack_integrations/components/generators/openrouter/chat
- tests
0 commit comments