Safer check for xAI reasoning content (#2936)

This commit is contained in:
Matt Rubens 2025-04-16 21:45:07 -04:00 committed by GitHub
parent 02120810ce
commit 6c5b99d304
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Safer check for xAI reasoning content

View File

@ -47,7 +47,7 @@ export class XAIHandler implements ApiHandler {
}
}
if ("reasoning_content" in delta && delta.reasoning_content) {
if (delta && "reasoning_content" in delta && delta.reasoning_content) {
yield {
type: "reasoning",
// @ts-ignore-next-line