Files
openfang/crates
Dmitry ButkoandCopilot 64b1ec5a7e fix: model-aware assistant message stripping for Claude via Copilot
The Copilot proxy for Claude enforces Anthropic's rule that conversations
must end with a user message. For Claude models, strip any trailing
assistant message without tool_calls (including non-empty ones). For
other models, only strip truly empty assistant messages.

This fixes the 'assistant message prefill not supported' error seen
in Telegram and other channel adapters when using Claude via Copilot,
without causing infinite agent loops for other models.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 21:07:14 +10:00
..
2026-03-15 19:50:43 +03:00
2026-03-15 19:50:43 +03:00