model-provider: route model discovery through HTTP client factory

This commit is contained in:
Michael Bolin
2026-07-07 10:16:25 -07:00
parent 7409481cf2
commit 11a2bdaf0a
7 changed files with 62 additions and 9 deletions
+7 -1
View File
@@ -11,6 +11,8 @@ use codex_exec_server::EnvironmentManager;
use codex_extension_api::LoadUserInstructionsFuture;
use codex_extension_api::LoadedUserInstructions;
use codex_extension_api::UserInstructionsProvider;
use codex_http_client::HttpClientFactory;
use codex_http_client::OutboundProxyPolicy;
use codex_login::AuthManager;
use codex_login::CodexAuth;
use codex_model_provider::create_model_provider;
@@ -148,7 +150,11 @@ pub fn models_manager_with_provider(
provider: ModelProviderInfo,
) -> SharedModelsManager {
let provider = create_model_provider(provider, Some(auth_manager));
provider.models_manager(codex_home, /*config_model_catalog*/ None)
provider.models_manager(
codex_home,
HttpClientFactory::new(OutboundProxyPolicy::ReqwestDefault),
/*config_model_catalog*/ None,
)
}
pub fn get_model_offline(model: Option<&str>) -> String {