@jinyu30openrouter 思考模式+流式下不兼容 openai TS SDK 的 finalChatCompletion函数 中发帖

openrouter的思维链返回在reasoning_details非标准字段中。如果此时使用 
const stream= client.chat.completions.stream(...)
await stream.finalChatCompletion()

在ChatCompletionStream.ts中的accumulateChatCompletion函数 
非标准字段会直接赋值而不是拼接 
Object.assign(choice.message, rest); 
因此 reasoning_details 就只会剩下最后一个…
 
 
Back to Top