Skip to content

fix(models): register Gemma-4-31B-it in Model enum + MODEL_CONFIG - #7

Merged
aistackdev merged 1 commit into
masterfrom
fix/register-gemma4-in-model-enum
May 26, 2026
Merged

fix(models): register Gemma-4-31B-it in Model enum + MODEL_CONFIG#7
aistackdev merged 1 commit into
masterfrom
fix/register-gemma4-in-model-enum

Conversation

@aistackdev

Copy link
Copy Markdown

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 {
...

  • Gemma_4_31B = 'Gemma-4-31B-it',
    }

const MODEL_CONFIG = {
...

  • [Model.Gemma_4_31B]: { label: 'Gemma-4 31B', prefix: 'gemma4', category: 'default' },
    };
    ```

Test plan

  • `pnpm typecheck` clean
  • Post-deploy: hard-refresh `/evaluation` — should auto-select Gemma-4-31B-it and show 12 rows.

🤖 Generated with Claude Code

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>
@aistackdev
aistackdev merged commit 55798d3 into master May 26, 2026
3 of 9 checks passed
@aistackdev
aistackdev deleted the fix/register-gemma4-in-model-enum branch May 26, 2026 08:27
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.

1 participant