Repository navigation
fix(insights): collapse duplicate provider entries in the AI Model filter - #12
Merged
Merged
Conversation
…lter AI engine vendors swap underlying model slugs between runs (a ChatGPT response can come back tagged "gpt-5-3-mini" one day and "gpt-5-5" the next, the engine often A/B-tests across versions for the same user). Each slug was landing in prompt_results.model_used as a distinct value, and the Insights filter built its dropdown from a deduped Set of raw slugs — so two "ChatGPT" rows showed up, and a third would appear the moment gpt-5-6 ships. Group the dropdown by resolved provider display name. Each option's value is now a comma-separated list of every raw slug that maps to the same family (e.g. "gpt-5-3-mini,gpt-5-5"). The label uses the family display name once. Server side, applyModelFilter() detects the comma list and switches from .eq() to .in() on prompt_results.model_used so a single "ChatGPT" selection still pulls runs from every underlying slug. Single-slug callers stay on .eq() — backwards compatible.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…aw slugs When a provider family option was selected (value carries a comma-separated slug list so the server can filter the whole family), the SelectTrigger was rendering the literal value — "gpt-5-3-mini, gpt-5-5" — instead of the resolved label. Pass a render function to SelectValue so the trigger maps the value back to the family's display name (ChatGPT / Gemini / Claude). Falls back to the placeholder when nothing is selected.
5 tasks
7 of 12 tasks
This branch was successfully deployed
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.
AI engine vendors swap underlying model slugs between runs.
Each slug was landing in prompt_results.model_used as a distinct value,
and the Insights filter built its dropdown from a deduped Set of raw
slugs — so two "ChatGPT" rows showed up, and a third would appear the
moment gpt-5-6 ships.
Group the dropdown by resolved provider display name. Each option's
value is now a comma-separated list of every raw slug that maps to the
same family (e.g. "gpt-5-3-mini,gpt-5-5"). The label uses the family
display name once.
Server side, applyModelFilter() detects the comma list and switches
from .eq() to .in() on prompt_results.model_used so a single "ChatGPT"
selection still pulls runs from every underlying slug. Single-slug
callers stay on .eq() — backwards compatible.