feat(core): support custom model aliases in config.toml#13665
Closed
friel-openai wants to merge 8 commits intomainfrom
Closed
feat(core): support custom model aliases in config.toml#13665friel-openai wants to merge 8 commits intomainfrom
friel-openai wants to merge 8 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8e4d9af73
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
friel-openai
added a commit
that referenced
this pull request
Mar 6, 2026
friel-openai
added a commit
that referenced
this pull request
Mar 6, 2026
f196327 to
225af45
Compare
friel-openai
added a commit
that referenced
this pull request
Mar 7, 2026
friel-openai
added a commit
that referenced
this pull request
Mar 7, 2026
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
Accept custom model aliases from [[custom_models]] entries so user config matches the documented TOML shape. Also add explicit alias names plus duplicate-alias validation and refresh the generated schema/docs to match.
List custom model aliases before bundled models in the picker while keeping default-model selection anchored to the bundled priority order when bundled presets exist. Also add a regression test covering the new ordering.
Use the existing model_info::with_config_overrides path for alias-specific context window and auto-compact overrides instead of mutating those fields inline in ModelsManager. The custom alias path now folds alias-level override values into a temporary config and reuses the centralized override helper, which keeps the precedence behavior unchanged while removing duplicated override logic.
ad9e1c9 to
f1b7eeb
Compare
This was referenced Mar 9, 2026
friel-openai
added a commit
that referenced
this pull request
Mar 9, 2026
friel-openai
added a commit
that referenced
this pull request
Mar 9, 2026
friel-openai
added a commit
that referenced
this pull request
Mar 10, 2026
friel-openai
added a commit
that referenced
this pull request
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by #13825.
This older PR is kept only as historical reference. The current, canonical custom-model PR is #13825, which carries the rebased branch head and the cleaned-up PR description.