fix: Logical model picker option order and naming#3532
Open
Twixes wants to merge 6 commits into
Open
Conversation
Sort the model picker by family (tier) first, then oldest-to-newest within each family, instead of by raw version number alone. Sorting by version alone interleaves families (e.g. a Sonnet 5 lands between Opus versions), which reads as an arbitrary order. Grouping keeps every family contiguous. Generated-By: PostHog Code Task-Id: ea8239ab-8fc1-46b7-8dc6-d3661caf8800
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Order model families most-capable first (Fable, Opus, Sonnet, Haiku) and display OpenAI/Cloudflare model names with their acronym uppercased (gpt-5.5 -> GPT-5.5, glm-5.2 -> GLM-5.2). Generated-By: PostHog Code Task-Id: ea8239ab-8fc1-46b7-8dc6-d3661caf8800
Remove a stray blank line flagged by `biome ci` in the quality check. Generated-By: PostHog Code Task-Id: ea8239ab-8fc1-46b7-8dc6-d3661caf8800
Sort each family newest-version-first (so Opus 4.8 sits above 4.7 with Fable at the top of the picker), render OpenAI/Cloudflare model names with the acronym uppercased, version attached, and any codename suffix title-cased (gpt-5.6-sol -> "GPT-5.6 Sol"), and trim the code comments to a minimum. Generated-By: PostHog Code Task-Id: ea8239ab-8fc1-46b7-8dc6-d3661caf8800
Twixes
marked this pull request as ready for review
July 17, 2026 10:22
Contributor
|
Reviews (1): Last reviewed commit: "Order newest version first, format provi..." | Re-trigger Greptile |
The Claude adapter's availableModels allowlist rebuilt the picker in the order the models were listed in settings, overriding the family/version sort (Codex, which does not apply the allowlist, was already correct). Re-sort the filtered list with the picker comparator so the allowlist only restricts which models appear, not their order. Generated-By: PostHog Code Task-Id: ea8239ab-8fc1-46b7-8dc6-d3661caf8800
Limit acronym uppercasing to GPT and GLM so ordinary Cloudflare model names (e.g. llama-3.1-8b-instruct) are not mangled into misleading all-caps labels. Addresses a Greptile review finding. Generated-By: PostHog Code Task-Id: ea8239ab-8fc1-46b7-8dc6-d3661caf8800
Twixes
enabled auto-merge (squash)
July 17, 2026 16:40
charlesvien
approved these changes
Jul 17, 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.
tl;dr: Models are now ordered logically in the model picker. And gpt-5.6-sol -> GPT-5.6 Sol, glm-5.2 -> GLM-5.2.
Problem
The model picker sorted models by the raw version number embedded in their id, which interleaved model families. With a full model list you'd see something like
… Opus 4.8, Sonnet 5, Fable 5, scattering the Sonnets and Opuses instead of keeping each family together. Raised in a Slack thread — the ordering read as arbitrary.Changes
Sort the picker by family (tier) first, then oldest-to-newest within each family. Families now stay contiguous (all Sonnets together, all Opuses together), with the newest flagship family closest to the trigger. Added a
compareModelsForPickercomparator ingateway-models.tsand pointed the ACP picker at it.How did you test this?
pnpm --filter @posthog/agent test gateway-models(30 passing, including an updated grouped-order test). Biome lint clean on the changed files.Created with PostHog from a Slack thread