feat: opt-in user-visible notification on provider fallback (#33174) - #33891
feat: opt-in user-visible notification on provider fallback (#33174)#33891ousiaresearch wants to merge 1 commit into
Conversation
…arch#33174) Adds module-level callback _set_fallback_status_callback, config-driven _gateway_extra_flag for gateway.extra.fallback_notifications, and _notify_fallback_used that surfaces a provider-fallback message to the user when the primary provider fails and a fallback takes over. Opt-in via gateway.extra.fallback_notifications: true in config.yaml.
|
Thanks for picking this up! A couple of small thoughts on the current implementation — feel free to disregard if I'm missing context. 1. The notification might not fully close the gap on its own. Even with 2. On the default value. The flag currently defaults to Also, this looks like it only touches gateway mode at the moment — is the terminal/CLI path in scope here too, or is that tracked separately? Either way, thanks for working on this. |
|
Thanks for the contribution. Current
|
What does this PR do?
Adds opt-in user-visible fallback notification when the primary provider fails and a fallback takes over.
Fixes #33174
Type of Change
Changes Made
gateway/run.py: Added module-level_set_fallback_status_callback,_gateway_extra_flag,_notify_fallback_usedfunctions_resolve_runtime_agent_kwargsto fire_notify_fallback_usedwhen fallback activates_set_fallback_status_callbackgateway.extra.fallback_notifications: truein config.yaml (opt-in, default off)How to Test
gateway.extra.fallback_notifications: trueto config.yamlChecklist