mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 10:02:23 +00:00
fix(ai): filter empty error assistant messages in transformMessages
When 429/500 errors occur during tool execution, empty assistant messages with stopReason='error' get persisted. These break the tool_use -> tool_result chain for Claude/Gemini APIs. Added centralized filtering in transformMessages to skip assistant messages with empty content and no tool calls. Provider-level filters remain for defense-in-depth.
This commit is contained in:
parent
d2f9ab110c
commit
fbb74bb29e
11 changed files with 125 additions and 8 deletions
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
- Fixed OpenAI-compatible provider feature detection to use `model.provider` in addition to URL, allowing custom base URLs (e.g., proxies) to work correctly with provider-specific settings ([#774](https://github.com/badlogic/pi-mono/issues/774))
|
||||
- Fixed Bedrock tool call IDs to use only alphanumeric characters, avoiding API errors from invalid characters ([#781](https://github.com/badlogic/pi-mono/pull/781) by [@pjtf93](https://github.com/pjtf93))
|
||||
- Fixed empty error assistant messages (from 429/500 errors) breaking the tool_use to tool_result chain by filtering them in `transformMessages`
|
||||
|
||||
## [0.47.0] - 2026-01-16
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue