mirror of
https://github.com/openai/codex.git
synced 2026-10-27 18:48:37 +00:00
feat(core): support custom model aliases in config.toml
This adds config.toml-defined model aliases that map to provider model slugs while applying alias-specific context settings for the active session. - added custom_models config entries plus schema and docs coverage - taught ModelsManager to resolve aliases to a provider-facing request_model while preserving the user-facing alias slug - applied alias-specific context_window and model_auto_compact_token_limit overrides during model info resolution - updated session/test plumbing and added regression coverage for alias resolution with local and remote model catalogs Model selection and per-session context overrides already flow through ModelsManager and Config. Resolving aliases there keeps the provider slug separate from the user-facing alias while reusing the existing override plumbing. - just write-config-schema - just fmt - cargo test -p codex-app-server -p codex-api -p codex-exec -p codex-mcp-server - cargo test -p codex-tui - cargo test -p codex-protocol -p codex-core (same two existing seatbelt failures remained in this environment: create_seatbelt_args_with_read_only_git_pointer_file and create_seatbelt_args_with_read_only_git_and_codex_subpaths) - just fix -p codex-core -p codex-protocol -p codex-app-server -p codex-api -p codex-exec -p codex-mcp-server -p codex-tui
This commit is contained in:
@@ -54,6 +54,7 @@ async fn models_client_hits_models_endpoint() {
|
||||
let response = ModelsResponse {
|
||||
models: vec![ModelInfo {
|
||||
slug: "gpt-test".to_string(),
|
||||
request_model: None,
|
||||
display_name: "gpt-test".to_string(),
|
||||
description: Some("desc".to_string()),
|
||||
default_reasoning_level: Some(ReasoningEffort::Medium),
|
||||
|
||||
Reference in New Issue
Block a user