Skip to content

Call TranslateGemma by its installed tag instead of the bare name - #249

Merged
rouges78 merged 1 commit into
mainfrom
fix/translategemma-model-tag
Nov 24, 2026
Merged

rouges78 merged 1 commit into
mainfrom
fix/translategemma-model-tag

Conversation

@rouges78

Copy link
Copy Markdown
Owner

What changed

  • New lib/ai/ollama-model-name.ts: picks a model's exact installed name from Ollama's /api/tags (exact name, then :latest, then the first tagged variant of the same family).
  • lib/ai/ai-translate-direct.ts (translateWithTranslateGemma, used by the String it chain): calls Ollama with that installed name instead of the hardcoded translategemma.
  • lib/ai/ai-translation-service.ts: the AI Translator menu lists only the installed TranslateGemma variants, so its default model is a real one.
  • docs/METODI-DI-TRADUZIONE.md: trap # 👋 Welcome to GameStringer Community! #1 marked as fixed.

Why

Ollama resolves a bare model name as :latest. With only translategemma:12b installed, both the chain and the AI Translator (default model translategemma) got 404. This was logged as trap #1 in the translation-methods log and never fixed. It came up again while testing React 19 in Tauri.

Verification

  • 6 new cases in __tests__/lib/ollama-model-name.test.ts. They pass together with the reflection and chain-cost tests, 64 in total.
  • npm run typecheck and eslint on the touched files are clean.
  • In npm run tauri:dev, the AI Translator defaults to translategemma:12b and translates "The door is locked. Find the key in the basement." without picking the model by hand.

Not covered

  • The chain path (String it) is covered by types and unit tests only. It was not run on a real game.
  • HY-MT has the same kind of name mismatch (installed as huihui_ai/hy-mt1.5-abliterated:7b), and it is left as is.

🤖 Generated with Claude Code

Ollama resolves a bare model name as ":latest", so a user with only
translategemma:12b got 404 from both the translation chain and the AI
Translator, whose default model was the bare "translategemma".
Pick the exact installed name from /api/tags in the chain, and list only
the installed variants in the AI Translator menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rouges78
rouges78 merged commit b3475dc into main Nov 24, 2026
7 checks passed
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