Ryan Ward
345057a147
Fix: Ensure OpenAI requests end with user message for Bedrock/LiteLLM compatibility
...
When LiteLLM routes OpenAI-format requests to AWS Bedrock, the provider
rejects conversations ending with an assistant message with:
'This model does not support assistant message prefill.'
Add ensure_ends_with_user_message() as the final sanitization step in
sanitize_messages_for_openai(). If the conversation ends with an assistant
message, a minimal 'Continue.' user message is appended.
Updated tests to reflect the new behavior and added dedicated tests for
the new function.
2026-07-16 09:55:38 -05:00
..
2026-07-15 16:17:13 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-07-01 16:08:58 -05:00
2026-07-15 16:17:13 -05:00
2026-07-15 16:17:13 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-04-28 08:43:33 -05:00
2026-07-01 16:08:58 -05:00
2026-07-02 14:54:15 -05:00
2026-05-07 11:29:34 -05:00
2026-07-02 14:54:15 -05:00
2026-07-16 09:55:38 -05:00
2026-07-01 16:08:58 -05:00
2026-07-02 14:54:15 -05:00
2026-07-01 14:30:04 -05:00
2026-07-15 16:17:13 -05:00
2026-07-02 14:54:15 -05:00
2026-04-28 08:43:33 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-04-29 10:43:20 -05:00
2026-07-01 16:08:58 -05:00
2026-04-28 08:43:33 -05:00
2026-07-02 14:54:15 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-05-13 10:04:59 -05:00
2026-07-02 14:54:15 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-07-01 16:08:58 -05:00
2026-07-02 14:54:15 -05:00
2026-05-07 11:29:34 -05:00
2026-07-02 14:54:15 -05:00
2026-07-01 16:08:58 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00
2026-07-15 16:17:13 -05:00
2026-07-15 16:17:13 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-07-02 14:54:15 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-07-02 14:54:15 -05:00
2026-07-01 16:08:58 -05:00
2026-07-02 14:54:15 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-07-01 16:08:58 -05:00
2026-07-02 14:54:15 -05:00
2026-07-02 14:54:15 -05:00