mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
profile-level model_catalog_json overrie (#12410)
enable `model-catalog_json` config value on `ConfigProfile` as well
This commit is contained in:
@@ -440,6 +440,14 @@
|
||||
"model": {
|
||||
"type": "string"
|
||||
},
|
||||
"model_catalog_json": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
}
|
||||
],
|
||||
"description": "Optional path to a JSON model catalog (applied on startup only)."
|
||||
},
|
||||
"model_instructions_file": {
|
||||
"allOf": [
|
||||
{
|
||||
|
||||
@@ -1908,7 +1908,12 @@ impl Config {
|
||||
let review_model = override_review_model.or(cfg.review_model);
|
||||
|
||||
let check_for_update_on_startup = cfg.check_for_update_on_startup.unwrap_or(true);
|
||||
let model_catalog = load_model_catalog(cfg.model_catalog_json.clone())?;
|
||||
let model_catalog = load_model_catalog(
|
||||
config_profile
|
||||
.model_catalog_json
|
||||
.clone()
|
||||
.or(cfg.model_catalog_json.clone()),
|
||||
)?;
|
||||
|
||||
let log_dir = cfg
|
||||
.log_dir
|
||||
|
||||
@@ -27,6 +27,8 @@ pub struct ConfigProfile {
|
||||
pub plan_mode_reasoning_effort: Option<ReasoningEffort>,
|
||||
pub model_reasoning_summary: Option<ReasoningSummary>,
|
||||
pub model_verbosity: Option<Verbosity>,
|
||||
/// Optional path to a JSON model catalog (applied on startup only).
|
||||
pub model_catalog_json: Option<AbsolutePathBuf>,
|
||||
pub personality: Option<Personality>,
|
||||
pub chatgpt_base_url: Option<String>,
|
||||
/// Optional path to a file containing model instructions.
|
||||
|
||||
Reference in New Issue
Block a user