fix: skip streaming normalization on finish_reason length
Truncated tool calls (finish_reason: 'length') now preserve the raw buffer instead of normalizing into executable commands, preventing incomplete commands from becoming runnable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1420,7 +1420,7 @@ test('does not normalize incomplete streamed Bash commands when finish_reason is
|
||||
.map(event => (event.delta as Record<string, unknown>).partial_json)
|
||||
.join('')
|
||||
|
||||
expect(streamedInput).toBe('{"command":"rg --fi"}')
|
||||
expect(streamedInput).toBe('rg --fi')
|
||||
})
|
||||
|
||||
test('does not repair truncated Bash objects that do not contain command', async () => {
|
||||
|
||||
Reference in New Issue
Block a user