When a model is defined inline in models.providers without an explicit api field,
resolveModel now correctly inherits the api from the provider config. This fixes
Bedrock model discovery which relies on api: bedrock-converse-stream.
Changes:
- Look up provider config using normalized key matching (handles whitespace)
- Merge api field with fallback: 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.
The function signature had an optional raw parameter followed by a
required opts parameter, which violates TypeScript rules. Since opts
is always provided together with raw in actual usage, make it optional.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* feat(sessions): add channelIdleMinutes config for per-channel session idle durations
Add new `channelIdleMinutes` config option to allow different session idle
timeouts per channel. For example, Discord sessions can now be configured
to last 7 days (10080 minutes) while other channels use shorter defaults.
Config example:
sessions:
channelIdleMinutes:
discord: 10080 # 7 days
The channel-specific idle is passed as idleMinutesOverride to the existing
resolveSessionResetPolicy, integrating cleanly with the new reset policy
architecture.
* fix
* feat: add per-channel session reset overrides (#1353) (thanks @cash-echo-bot)
---------
Co-authored-by: Cash Williams <cashwilliams@gmail.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Add support for '*' wildcard in Discord channel configuration,
matching the existing guild-level wildcard behavior.
This allows applying default channel settings (like autoThread)
to all channels without listing each one explicitly:
guilds:
'*':
channels:
'*': { autoThread: true }
Specific channel configs still take precedence over the wildcard.