Skip to main content

Module smart_switch

Module smart_switch 

Source
Expand description

Smart model switching on provider errors.

Re-exports§

pub use candidates::smart_switch_candidates;
pub use error_detection::is_retryable_provider_error;
pub use error_detection::normalize_provider_alias;
pub use error_detection::smart_switch_model_key;
pub use helpers::should_execute_smart_switch;
pub use helpers::smart_switch_max_retries;
pub use models::smart_switch_preferred_models;
pub use retry::PendingSmartSwitchRetry;
pub use retry::maybe_schedule_smart_switch_retry;

Modules§

candidates
Candidate generation for smart switching — combines provider strategies.
error_detection
Provider error classification and normalization.
extra
Extra (non-priority) provider fallback candidates.
helpers
Small helper functions for smart switch.
local_model
Local CUDA model reference normalization and resolution.
models
Fallback model lists per provider.
priority
Cross-provider priority-ordered fallback candidates.
retry
Retry scheduling logic.
same_provider
Same-provider fallback generation.

Constants§

SCROLL_BOTTOM
Sentinel value meaning “follow the latest message position”.