mirror of
https://github.com/openai/codex.git
synced 2026-05-03 02:46:39 +00:00
client side modelinfo overrides (#12101)
TL;DR Add top-level `model_catalog_json` config support so users can supply a local model catalog override from a JSON file path (including adding new models) without backend changes. ### Problem Codex previously had no clean client-side way to replace/overlay model catalog data for local testing of model metadata and new model entries. ### Fix - Add top-level `model_catalog_json` config field (JSON file path). - Apply catalog entries when resolving `ModelInfo`: 1. Base resolved model metadata (remote/fallback) 2. Catalog overlay from `model_catalog_json` 3. Existing global top-level overrides (`model_context_window`, `model_supports_reasoning_summaries`, etc.) ### Note Will revisit per-field overrides in a follow-up ### Tests Added tests
This commit is contained in:
@@ -1580,7 +1580,7 @@ async fn make_chatwidget_manual(
|
||||
let auth_manager =
|
||||
codex_core::test_support::auth_manager_from_auth(CodexAuth::from_api_key("test"));
|
||||
let codex_home = cfg.codex_home.clone();
|
||||
let models_manager = Arc::new(ModelsManager::new(codex_home, auth_manager.clone()));
|
||||
let models_manager = Arc::new(ModelsManager::new(codex_home, auth_manager.clone(), None));
|
||||
let reasoning_effort = None;
|
||||
let base_mode = CollaborationMode {
|
||||
mode: ModeKind::Default,
|
||||
@@ -1699,6 +1699,7 @@ fn set_chatgpt_auth(chat: &mut ChatWidget) {
|
||||
chat.models_manager = Arc::new(ModelsManager::new(
|
||||
chat.config.codex_home.clone(),
|
||||
chat.auth_manager.clone(),
|
||||
None,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user