← ClaudeAtlas

prefill-rejectionlisted

Use when an OpenRouter run dies on "does not support assistant message prefill", intermittently, or after a provider pin appeared to fix it. Pins cannot fix it and a green run proves nothing.
MrBinnacle/skills · ★ 0 · AI & Automation · score 68
Install: claude install-skill MrBinnacle/skills
# OpenRouter Assistant-Prefill Host Rejection ## Problem A client (observed: opencode driving an agent loop) sometimes sends a request whose `messages` array ends on an `assistant` turn — assistant prefill. OpenRouter hosts serving Anthropic models reject that shape with: ``` This model does not support assistant message prefill. The conversation must end with a user message. ``` The run dies mid-conversation. Because the client only produces the prefill shape on SOME turns (continuation after truncation, certain compaction states), the failure is intermittent, which invites two wrong fixes: retrying, and pinning providers. ## Context / Trigger Conditions - The exact error above, prefixed with a host name: `[Azure]`, `[Amazon Bedrock]`, `[Google]` (Vertex), or `[Anthropic]`. - Model id is an Anthropic model via OpenRouter (`openrouter/anthropic/...`). - Same pipeline succeeded on other runs with no config change. - A `provider.only` / `provider.ignore` routing pin was added and the error recurred from a different (or eventually the same) host. ## Why the obvious fixes fail (measured, one project, 4 host families) 1. **Ignore-listing the failing host** grows one corpse at a time: Azure, then "Claude Platform on AWS", then Anthropic first-party each rejected identically. 2. **Positively pinning the one host not yet observed rejecting** (Vertex) held for two runs, then rejected too. The green runs were conversation-shape luck — those conversations never happ