Minor Changes
-
#10666
2bb55b0Thanks @hnustwjj! - feat(openrouter): surface reasoning content as v1 standard content blocksconvertOpenRouterResponseToBaseMessageand
convertOpenRouterDeltaToBaseMessageChunknow copy OpenRouter's
reasoning(flat string) andreasoning_details(structured array) fields
ontoadditional_kwargs.reasoning_content/additional_kwargs.reasoning_details.
A newChatOpenRouterTranslatoris registered in@langchain/coreunder
the"openrouter"provider key soAIMessage.contentBlocksemits standard
{type: "reasoning"}blocks alongside text and tool calls.Previously, reasoning text returned by reasoning-capable models routed
through OpenRouter (DeepSeek R1, Minimax M2, Claude extended thinking,
o-series, etc.) was silently dropped: only thereasoning_tokenscount
was preserved viausage_metadata. Consumers using standard content blocks
(including the frontend agent UI patterns shown in the docs) could not
display the model's chain of thought.
Patch Changes
-
#10832
1b24369Thanks @info-arnav! - fix(core, openrouter): make CJS default re-exports callable -
Updated dependencies [
3999fab,fce9ab4]:- @langchain/openai@1.4.7