Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/api/providers/nano-gpt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ export class NanoGptHandler extends BaseProvider implements SingleCompletionHand
}
}

// Handle native reasoning fields (reasoning_content or reasoning)
if (delta) {
for (const key of ["reasoning_content", "reasoning"] as const) {
if (key in delta) {
const reasoning_content = ((delta as any)[key] as string | undefined) || ""
if (reasoning_content?.trim()) {
yield { type: "reasoning", text: reasoning_content }
}
break
}
}
}

// Handle native tool calls
if (delta?.tool_calls) {
for (const toolCall of delta.tool_calls) {
Expand Down