Skip to content

fix(coding-agent): naturally sort both model selectors - #7692

Closed
Omzig wants to merge 2 commits into
earendil-works:mainfrom
Omzig:fix/natural-sort-model-selectors
Closed

fix(coding-agent): naturally sort both model selectors#7692
Omzig wants to merge 2 commits into
earendil-works:mainfrom
Omzig:fix/natural-sort-model-selectors

Conversation

@Omzig

@Omzig Omzig commented Aug 5, 2026

Copy link
Copy Markdown

Summary

Make both interactive model selectors easier to navigate when providers expose context-window variants.

What changed

  • Share a natural model-ID comparator between /model and /scoped-models.

  • Sort model IDs case-insensitively with numeric awareness.

  • Keep canonical model IDs before their context aliases.

  • Sort numeric context aliases by actual size, so variants appear as:

    gpt-5.6-luna
    gpt-5.6-luna@200k
    gpt-5.6-luna@1m

  • Preserve the explicit order of enabled models in /scoped-models; Alt+Up/Alt+Down still controls that order.

  • Sort the remaining available catalog predictably in /scoped-models.

  • Apply the same provider-and-model ordering to the all-model /model selector.

  • Preserve existing search and enable/disable behavior.

The comparator is provider-agnostic and applies to any model IDs using numeric @...k or @...m context suffixes, not only GitHub Copilot models.

Why

GitHub Copilot discovery now exposes multiple context-tier aliases for many models. The previous selectors displayed newly discovered models in provider/catalog order, and lexical ordering placed @1m before @200k. The two selectors could also present different orders, making variants difficult to find and compare.

Validation

  • Added regression coverage for /scoped-models ordering and /model all-model ordering.
  • Targeted coding-agent tests: 5 passed.
  • npm run check: passed.
  • Full ./test.sh was attempted; unrelated Windows/environment failures occurred in workspace startup, Unix socket, path-normalization, provider setup, and missing built workspace artifact tests.

Fixes #7693

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This PR was auto-closed. Only contributors approved with lgtm can open PRs. Open an issue first and ask a maintainer for approval.

Maintainers review auto-closed issues daily. Issues that do not meet the quality bar in CONTRIBUTING.md will not be reopened or receive a reply.

If a maintainer replies lgtmi, your future issues will stay open. If a maintainer replies lgtm, your future issues and PRs will stay open. The command must be at the start of the reply (optionally after one or more @username mentions) or at the end.

See CONTRIBUTING.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Naturally sort model variants in /model and /scoped-models selectors

1 participant