fix(models): register Gemma-4-31B-it in Model enum + MODEL_CONFIG - #7
Merged
Merged
Conversation
PR #1 added `gemma4: 'Gemma-4-31B-it'` to DB_MODEL_TO_DISPLAY in constants/, but missed the parallel registration in the app's own Model enum + MODEL_CONFIG (data-mappings.ts). Result: MODEL_OPTIONS doesn't include Gemma-4-31B-it, so: GlobalFilterContext.availableModels = MODEL_OPTIONS.filter(... matches availability ...) // → [] because gemma4 isn't in MODEL_OPTIONS to begin with The PR #4 fallback effect saw `availableModels.length === 0` and bailed out, leaving the user stuck on the hardcoded DeepSeek_R1 default which has no data → "No data for DeepSeek-R1-0528" empty state on /evaluation. Add Gemma_4_31B to the enum + MODEL_CONFIG so the model surfaces in the dropdown and the fallback effect can land on it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
PR #1 added `gemma4: 'Gemma-4-31B-it'` to `DB_MODEL_TO_DISPLAY` in `packages/constants`, but missed the parallel registration in the app's own `Model` enum + `MODEL_CONFIG` in `packages/app/src/lib/data-mappings.ts`.
Net effect: `MODEL_OPTIONS` (derived from `MODEL_CONFIG` keys) doesn't include Gemma-4-31B-it. Then in `GlobalFilterContext`:
```ts
const availableModels = useMemo(() => MODEL_OPTIONS.filter((m) => ...), [...]);
```
iterates over `MODEL_OPTIONS` (no gemma4 entry), so `availableModels = []` even though `availabilityRows` has gemma4 data. PR #4's fallback effect checks `if (availableModels.length === 0) return;` and bails. User is left stuck on `Model.DeepSeek_R1` (the hardcoded default, has no data) → "No data for DeepSeek-R1-0528" empty state.
Fix
Add to `data-mappings.ts`:
```ts
enum Model {
...
}
const MODEL_CONFIG = {
...
};
```
Test plan
🤖 Generated with Claude Code