fix(ai): clamp streamSimple max tokens

Clamps streamSimple max-token defaults against estimated context, addressing #5595.

closes #6061
This commit is contained in:
Mario Zechner
2026-06-25 14:10:05 +02:00
parent 49956a7cd0
commit 09f1059575
13 changed files with 198 additions and 20 deletions
+1
View File
@@ -8,6 +8,7 @@
### Fixed
- Fixed `streamSimple()` to send a context-aware max-token cap so providers that count input and output against one context window do not reject long requests ([#5595](https://github.com/earendil-works/pi/issues/5595)).
- Fixed OpenAI Responses streams to preserve reasoning replay state when output items finish out of order ([#6009](https://github.com/earendil-works/pi/issues/6009)).
- Fixed retry classification for provider errors that explicitly tell callers to retry the request ([#6019](https://github.com/earendil-works/pi/issues/6019)).