Repository navigation
Call TranslateGemma by its installed tag instead of the bare name - #249
Merged
Merged
Conversation
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>
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.
What changed
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 hardcodedtranslategemma.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 onlytranslategemma:12binstalled, both the chain and the AI Translator (default modeltranslategemma) 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
__tests__/lib/ollama-model-name.test.ts. They pass together with the reflection and chain-cost tests, 64 in total.npm run typecheckand eslint on the touched files are clean.npm run tauri:dev, the AI Translator defaults totranslategemma:12band translates "The door is locked. Find the key in the basement." without picking the model by hand.Not covered
huihui_ai/hy-mt1.5-abliterated:7b), and it is left as is.🤖 Generated with Claude Code