Commit e9113ba
committed
fix(models): pass NOT_GIVEN instead of None for system instruction in AnthropicLlm
When no system instruction is set (e.g. during event compaction),
system_instruction is None. The Anthropic API rejects None — it
expects a str or list of content blocks. This causes a 400 Bad
Request when compaction fires via LlmEventSummarizer.
Pass NOT_GIVEN (already imported) when system_instruction is
None/empty so the parameter is omitted from the API call. Fixes
both streaming and non-streaming code paths.
Fixes #53181 parent 454188d commit e9113ba
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
405 | 411 | | |
406 | 412 | | |
407 | 413 | | |
408 | | - | |
| 414 | + | |
409 | 415 | | |
410 | 416 | | |
411 | 417 | | |
| |||
431 | 437 | | |
432 | 438 | | |
433 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
434 | 445 | | |
435 | 446 | | |
436 | | - | |
| 447 | + | |
437 | 448 | | |
438 | 449 | | |
439 | 450 | | |
| |||
0 commit comments