mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
* fix: warn when default chat provider is unset * fix: align startup warning with provider fallback * refactor: simplify default chat provider warning guard checks * feat: warn when default chat provider id is invalid or missing - Emit a warning when `default_provider_id` points to a non-existent enabled provider, preventing silent fallback to an unexpected model. - Reset the warning guard before each `provider_manager.initialize()` so configuration reloads trigger a fresh re-evaluation. - Harden guard checks to handle `None` `provider_settings` and `None` provider IDs gracefully. * test: cover fallback and invalid default provider id warnings - Add case for `curr_provider_inst=None` to verify fallback to `providers[0]`. - Add case for a `default_provider_id` that does not match any enabled provider. * style: format default chat provider warning --------- Co-authored-by: RC-CHN <1051989940@qq.com>