profile-level model_catalog_json overrie (#12410)

enable `model-catalog_json` config value on `ConfigProfile` as well
This commit is contained in:
sayan-oai
2026-02-21 11:39:02 -08:00
committed by GitHub
parent b3202cbd58
commit 5a635f3427
3 changed files with 16 additions and 1 deletions

View File

@@ -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": [
{

View File

@@ -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

View File

@@ -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.