mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
## What changed - Let model providers identify recoverable authentication errors and refresh their own authentication state before falling back to `AuthManager` recovery. - Apply provider recovery to both HTTP and WebSocket response requests, with at most one provider-owned recovery attempt per request. - Preserve existing `401 Unauthorized` handling as the default for providers that do not customize recovery. ## Testing - Add coverage for successful and failed provider recovery, including the single-attempt bound and preservation of the original unauthorized error. GitOrigin-RevId: 9a737e3be96354699586f97dd88e544a45082969
30 lines
1.1 KiB
Rust
30 lines
1.1 KiB
Rust
mod amazon_bedrock;
|
|
mod auth;
|
|
mod bearer_auth_provider;
|
|
mod models_endpoint;
|
|
mod provider;
|
|
|
|
pub use amazon_bedrock::is_supported_amazon_bedrock_region;
|
|
pub use auth::AgentIdentitySessionFallback;
|
|
pub use auth::ProviderAuthScope;
|
|
pub use auth::ResolvedProviderAuth;
|
|
pub use auth::auth_provider_from_auth;
|
|
pub use auth::auth_provider_from_auth_manager;
|
|
pub use auth::unauthenticated_auth_provider;
|
|
pub use bearer_auth_provider::BearerAuthProvider;
|
|
pub use bearer_auth_provider::BearerAuthProvider as CoreAuthProvider;
|
|
pub use codex_model_provider_info::AMAZON_BEDROCK_PROVIDER_ID;
|
|
pub use codex_model_provider_info::AMAZON_BEDROCK_RUNTIME_PROVIDER_ID;
|
|
pub use codex_model_provider_info::CHATGPT_CODEX_BASE_URL;
|
|
pub use codex_protocol::account::ProviderAccount;
|
|
pub use provider::ModelProvider;
|
|
pub use provider::ModelProviderFuture;
|
|
pub use provider::ProviderAccountError;
|
|
pub use provider::ProviderAccountResult;
|
|
pub use provider::ProviderAccountState;
|
|
pub use provider::ProviderCapabilities;
|
|
pub use provider::ProviderUnauthorizedRecovery;
|
|
pub use provider::RemoteCompactionSupport;
|
|
pub use provider::SharedModelProvider;
|
|
pub use provider::create_model_provider;
|