Call models endpoint in models manager (#7616)

- Introduce `with_remote_overrides` and update
`refresh_available_models`
- Put `auth_manager` instead of `auth_mode` on `models_manager`
- Remove `ShellType` and `ReasoningLevel` to use already existing
structs
This commit is contained in:
Ahmed Ibrahim
2025-12-04 18:28:03 -08:00
committed by GitHub
parent 6736d1828d
commit 7b359c9c8e
13 changed files with 329 additions and 88 deletions

View File

@@ -393,7 +393,7 @@ fn make_chatwidget_manual() -> (
active_cell: None,
config: cfg.clone(),
auth_manager: auth_manager.clone(),
models_manager: Arc::new(ModelsManager::new(auth_manager.get_auth_mode())),
models_manager: Arc::new(ModelsManager::new(auth_manager)),
session_header: SessionHeader::new(cfg.model),
initial_user_message: None,
token_info: None,
@@ -431,7 +431,7 @@ fn make_chatwidget_manual() -> (
fn set_chatgpt_auth(chat: &mut ChatWidget) {
chat.auth_manager =
AuthManager::from_auth_for_testing(CodexAuth::create_dummy_chatgpt_auth_for_testing());
chat.models_manager = Arc::new(ModelsManager::new(chat.auth_manager.get_auth_mode()));
chat.models_manager = Arc::new(ModelsManager::new(chat.auth_manager.clone()));
}
pub(crate) fn make_chatwidget_manual_with_sender() -> (