When a model is defined inline in models.providers without an explicit api field,
the resolveModel function now correctly inherits the api from the provider config.
This fixes Bedrock model discovery which relies on api: bedrock-converse-stream.
- Look up provider config using inlineMatch.provider
- Merge api field with fallback chain: model.api → provider.api → openai-responses
- Add tests validating api inheritance for inline models
Fixes inline model resolution for providers like Amazon Bedrock that require
specific API implementations.
Co-Authored-By: Claude Haiku 4.5 <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.