Repository navigation
feat: add model aliases - #11352
Closed
pakerfeldt wants to merge 1 commit into
Closed
feat: add model aliases#11352pakerfeldt wants to merge 1 commit into
pakerfeldt wants to merge 1 commit into
Conversation
Add model_aliases config option to map short names to provider/model strings. Aliases can be used anywhere a model ID is accepted, enabling team workflows where shared agents reference aliases that each developer resolves in their personal config.
Contributor
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
Contributor
|
Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
1 task done
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.
Closes #3439
This is my first PR to OpenCode. I've done my best to follow the contributing guidelines and code style, but I fully expect maintainers may want adjustments to the code, documentation, or both. Happy to iterate based on feedback.
Summary
Adds
model_aliasesconfig option to map short names to provider/model strings. Aliases work anywhere a model ID is accepted.Example
One concern: I introduced an async resolveModel() function (since it needs config access). Most call sites were already async, but I'd appreciate a sanity check that this doesn't cause issues I'm not aware of.
Verification