Summary
A synthesis model spec of the form openrouter/anthropic/<model> is resolved to the Anthropic provider (requiring ANTHROPIC_API_KEY) instead of being routed through OpenRouter (OPENROUTER_API_KEY). Panelist calls with the same slug route correctly via OpenRouter; only the synthesis path mis-detects the provider, presumably by matching the anthropic path segment rather than the leading openrouter/ provider prefix.
Repro
With only OPENROUTER_API_KEY set (no ANTHROPIC_API_KEY):
synthpanel panel synthesize <result-id> --synthesis-model openrouter/anthropic/claude-haiku-4.5
Output:
Synthesis will cost ~$0.1521 using openrouter/anthropic/claude-haiku-4.5
Error: synthesis failed: Missing API key for Anthropic: set ANTHROPIC_API_KEY ...
Note the cost line correctly echoes openrouter/anthropic/claude-haiku-4.5, then the provider resolver still demands an Anthropic key.
Same failure occurs in-run: a panel run --models "openrouter/anthropic/claude-haiku-4.5,..." --blend whose default synthesis model is the leading ensemble member fails synthesis ("Missing API key for Anthropic") and saves an empty synthesis: {} with no hard error surfaced to the user — the run otherwise "succeeds."
Expected
openrouter/anthropic/claude-haiku-4.5 (and any openrouter/<vendor>/<model>) routes through OpenRouter for synthesis exactly as it does for panelist calls, using OPENROUTER_API_KEY.
Suggested fixes
- In the synthesis model-resolution path, parse the leading provider segment (
openrouter/) the same way the panelist path does; don't infer provider from a later anthropic/openai/google segment.
- If synthesis fails, do not silently persist
synthesis: {} on an otherwise-successful run — surface a clear warning/error and a non-zero indication so the user knows synthesis didn't run.
Environment
synthpanel 1.5.6, Python 3.12, OpenRouter only (OPENROUTER_API_KEY).
Summary
A synthesis model spec of the form
openrouter/anthropic/<model>is resolved to the Anthropic provider (requiringANTHROPIC_API_KEY) instead of being routed through OpenRouter (OPENROUTER_API_KEY). Panelist calls with the same slug route correctly via OpenRouter; only the synthesis path mis-detects the provider, presumably by matching theanthropicpath segment rather than the leadingopenrouter/provider prefix.Repro
With only
OPENROUTER_API_KEYset (noANTHROPIC_API_KEY):Output:
Note the cost line correctly echoes
openrouter/anthropic/claude-haiku-4.5, then the provider resolver still demands an Anthropic key.Same failure occurs in-run: a
panel run --models "openrouter/anthropic/claude-haiku-4.5,..." --blendwhose default synthesis model is the leading ensemble member fails synthesis ("Missing API key for Anthropic") and saves an emptysynthesis: {}with no hard error surfaced to the user — the run otherwise "succeeds."Expected
openrouter/anthropic/claude-haiku-4.5(and anyopenrouter/<vendor>/<model>) routes through OpenRouter for synthesis exactly as it does for panelist calls, usingOPENROUTER_API_KEY.Suggested fixes
openrouter/) the same way the panelist path does; don't infer provider from a lateranthropic/openai/googlesegment.synthesis: {}on an otherwise-successful run — surface a clear warning/error and a non-zero indication so the user knows synthesis didn't run.Environment
synthpanel 1.5.6, Python 3.12, OpenRouter only (
OPENROUTER_API_KEY).