OpenRouter API returns model IDs with the provider prefix already
included (e.g., "openrouter/auto"). This was causing two issues:
1. model-scan was blindly prefixing, creating "openrouter/openrouter/auto"
2. Model lookup failed because pi-ai catalog expects "openrouter/auto"
Fix by normalizing at boundaries:
- Strip prefix at input (model-scan)
- Add fallback lookup at output (resolveModel)
This keeps internal representation clean while handling pi-ai's
catalog structure.
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
When resolving models from custom provider configurations, ensure the
provider name is attached to each inline model entry. This fixes model
resolution for custom providers where the model definition exists in
the config but lacks an explicit provider field.
Without this fix, inline models from custom providers (like amazon-bedrock)
would fail to resolve because the provider context was lost during the
flatMap operation.