fix(ai): handle unknown finish_reason in openai-completions gracefully

Map unknown finish_reason values (e.g. "end" from Ollama/LM Studio) to
"stop" instead of throwing, since assistant content is already produced.

fixes #2142
This commit is contained in:
Mario Zechner
2026-03-14 03:59:55 +01:00
parent 9c0ba357ad
commit a79ca41190
2 changed files with 7 additions and 2 deletions

View File

@@ -2,6 +2,10 @@
## [Unreleased]
### Fixed
- Handle `finish_reason: "end"` from Ollama/LM Studio by mapping it to `"stop"` instead of throwing ([#2142](https://github.com/badlogic/pi-mono/issues/2142))
## [0.58.0] - 2026-03-14
### Added