Commit f45f584
committed
fix: set include_thoughts=False when thinking_budget is 0
When thinking_budget is set to 0 (disabling thinking), include_thoughts
was hardcoded to True, causing a 400 INVALID_ARGUMENT error from the
Vertex AI API. Now include_thoughts is set based on whether thinking
is actually enabled (thinking_budget != 0).
Closes deepset-ai/haystack#28451 parent 6c8c1bf commit f45f584
2 files changed
Lines changed: 8 additions & 1 deletion
File tree
- integrations/google_genai
- src/haystack_integrations/components/generators/google_genai/chat
- tests
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
901 | 901 | | |
902 | 902 | | |
903 | 903 | | |
904 | | - | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
905 | 908 | | |
906 | 909 | | |
907 | 910 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1508 | 1508 | | |
1509 | 1509 | | |
1510 | 1510 | | |
| 1511 | + | |
1511 | 1512 | | |
1512 | 1513 | | |
1513 | 1514 | | |
1514 | 1515 | | |
1515 | 1516 | | |
1516 | 1517 | | |
1517 | 1518 | | |
| 1519 | + | |
1518 | 1520 | | |
1519 | 1521 | | |
1520 | 1522 | | |
1521 | 1523 | | |
1522 | 1524 | | |
| 1525 | + | |
1523 | 1526 | | |
1524 | 1527 | | |
1525 | 1528 | | |
1526 | 1529 | | |
1527 | 1530 | | |
| 1531 | + | |
1528 | 1532 | | |
1529 | 1533 | | |
1530 | 1534 | | |
| |||
0 commit comments