fix(ai): openai-completions - throw error on missing finish-reason

- require \ before treating \ streams as successful
- add regression coverage for truncated streams without \
- closes #4345
This commit is contained in:
Ramiz Wachtler
2026-05-15 15:11:43 +02:00
parent a8af0b5e99
commit 98ffad0437
3 changed files with 38 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
### Fixed
- Fixed GitHub Copilot model availability to ignore generic `GH_TOKEN` and `GITHUB_TOKEN` environment variables, requiring OAuth login or `COPILOT_GITHUB_TOKEN` instead ([#4485](https://github.com/earendil-works/pi/issues/4485)).
- Fixed `openai-completions` streams to surface an error when the stream ends before any terminal `finish_reason`, so truncated responses can retry instead of being accepted as success ([#4345](https://github.com/earendil-works/pi/issues/4345)).
- Fixed Bedrock proxy handling to preserve `NO_PROXY` exclusions while using HTTP(S)-only proxy agents.
- Fixed GitHub Copilot Claude test coverage to use the current Claude Sonnet 4.6 model ID.
- Fixed OpenAI Responses requests for models that support disabling reasoning to send `reasoning.effort: "none"` when thinking is off.