You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today /model autocomplete suggests aliases/static model aliases instead of the concrete provider/model combinations that are actually usable in the current session/profile.
That makes the command confusing when multiple providers are configured:
autocomplete can suggest aliases that do not belong to the current provider
it does not clearly show which authenticated provider will be used
it does not disambiguate the same model name across multiple providers
it can diverge from the no-argument /model picker, which already works from authenticated provider availability
Example: typing /model sonnet may show an alias-like suggestion, but the actual switch can resolve through provider fallback. Users should be able to see the concrete authenticated options before selecting one.
Related to #13621, but distinct: that issue covers TUI trailing-space behavior and custom provider models missing from completions. This request is specifically about making /model autocomplete provider-aware and authenticated-only.
Proposed Solution
Build /model completions from the same authenticated provider catalog used by the no-argument /model picker.
Suggested behavior:
only include providers that are authenticated/available in the current profile/session
complete concrete model IDs rather than alias names
emit completions as <model> --provider <provider_slug> so selection is deterministic
if the same model is available from multiple providers, show one option per provider
filter typed text against model IDs across all authenticated providers
make classic CLI and TUI slash completion use the same behavior
For example, if several authenticated providers expose Sonnet models, /model sonnet should produce explicit options such as:
If maintainers prefer backward compatibility, this could be controlled by a config flag, for example:
model:
autocomplete_mode: aliases # current behavior# autocomplete_mode: authenticated
I am happy to submit a PR for this.
Alternatives Considered
Alternatives considered:
Keep the current alias-based autocomplete. This is backward compatible, but it hides provider resolution and can suggest values that do not reflect authenticated provider availability.
Require users to type --provider manually. This works for advanced users, but it makes discovery worse and does not help with duplicate model names.
Problem or Use Case
Today
/modelautocomplete suggests aliases/static model aliases instead of the concrete provider/model combinations that are actually usable in the current session/profile.That makes the command confusing when multiple providers are configured:
/modelpicker, which already works from authenticated provider availabilityExample: typing
/model sonnetmay show an alias-like suggestion, but the actual switch can resolve through provider fallback. Users should be able to see the concrete authenticated options before selecting one.Related to #13621, but distinct: that issue covers TUI trailing-space behavior and custom provider models missing from completions. This request is specifically about making
/modelautocomplete provider-aware and authenticated-only.Proposed Solution
Build
/modelcompletions from the same authenticated provider catalog used by the no-argument/modelpicker.Suggested behavior:
<model> --provider <provider_slug>so selection is deterministicFor example, if several authenticated providers expose Sonnet models,
/model sonnetshould produce explicit options such as:If maintainers prefer backward compatibility, this could be controlled by a config flag, for example:
I am happy to submit a PR for this.
Alternatives Considered
Alternatives considered:
--providermanually. This works for advanced users, but it makes discovery worse and does not help with duplicate model names.custom_providersmodels to the current completion list, as discussed in [Bug]: TUI /model with trailing space skips ModelPicker, custom providers missing from completions #13621. That would help one case, but it still would not make autocomplete match authenticated provider availability.<model> --provider <slug>completions are easier to select and match the current/modelcommand form.Feature Type
CLI improvement
Scope
Medium (few files, < 300 lines)
Contribution
Debug Report (optional)