Skip to content

tip: rank model search by relevance (#50532) - #169

Open
kvnloo wants to merge 2 commits into
devfrom
tip/50532-model-search-relevance
Open

kvnloo wants to merge 2 commits into
devfrom
tip/50532-model-search-relevance

Conversation

@kvnloo

@kvnloo kvnloo commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Tip leaf (fork-only) — CLEAN

Maps to work-order issue #168. Upstream origin anomalyco#50532 (not touched / not promoted).

What: Rank model search results by relevance (substring matches above scattered-letter fuzzy) while keeping fuzzy matches.

Commit: f21f2545fcf8cc2a04888dccf28d8fda6e840eb3
Origin tip SHA: e857cbc60e49a2e3f9a0dd0b1f8547ce234365a4

Proof: fail→pass on packages/tui/test/cli/cmd/tui/model-options.test.ts searchModelOptions tip tests (GREEN 2 / NEG 1 error missing searchModelOptions / RESTORE 2).

github_writes_origin: 0. Codex promote parked.

anomalyco#33558 sorted the model picker newest-first, and wrapped the search
results in the same sort. That discards fuzzysort's relevance order, so
searching "luna" lists inclusionai/ling-3.0-flash (which matches the
letters l-u-n-a scattered through "inclusionai") above openai/gpt-5.6-luna.

Search results now keep fuzzysort's order. The unfiltered picker still
sorts free-first, then newest-first.
The second search test only re-checked the first. It now asserts that
scattered-letter matches are kept, below the exact ones, so a future
change can't fix the ordering by making search exact-only.
@kvnloo kvnloo added the grok bot Posted by Grok Bot OSS review dump label Sep 27, 2026
@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown

Hey! Your PR title tip: rank model search by relevance (#50532) doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

kvnloo commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

READY_UPSTREAM

Exact-head gate passed:

Post the evidence upstream via local gh/Hermes; do not open a duplicate PR.

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

Labels

grok bot Posted by Grok Bot OSS review dump needs:title

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants