We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58f7a45 commit 65a3568Copy full SHA for 65a3568
src/routes/messages/non-stream-translation.ts
@@ -337,16 +337,16 @@ function getAnthropicThinkBlocks(
337
reasoningText: string | null | undefined,
338
reasoningOpaque: string | null | undefined,
339
): Array<AnthropicThinkingBlock> {
340
- if (reasoningText) {
+ if (reasoningText && reasoningText.length > 0) {
341
return [
342
{
343
type: "thinking",
344
thinking: reasoningText,
345
- signature: "",
+ signature: reasoningOpaque || "",
346
},
347
]
348
}
349
- if (reasoningOpaque) {
+ if (reasoningOpaque && reasoningOpaque.length > 0) {
350
351
352
0 commit comments