Skip to content

Commit 0d07b42

Browse files
celestial-vaultdcbartlettellipsis-dev[bot]
authored
Stream Grok 3 Mini reasoning tokens (RooCodeInc#2829)
* stream reasoning tokens * changeset * Update .changeset/sixty-jokes-hope.md Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: Dennis Bartlett <[email protected]> Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
1 parent ff9484e commit 0d07b42

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.changeset/sixty-jokes-hope.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"claude-dev": minor
3+
---
4+
5+
Stream Grok 3 mini reasoning tokens

src/api/providers/xai.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ export class XAIHandler implements ApiHandler {
3535
}
3636
}
3737

38+
if ("reasoning_content" in delta && delta.reasoning_content) {
39+
yield {
40+
type: "reasoning",
41+
// @ts-ignore-next-line
42+
reasoning: delta.reasoning_content,
43+
}
44+
}
45+
3846
if (chunk.usage) {
3947
yield {
4048
type: "usage",

0 commit comments

Comments
 (0)