Skip to content

Add Ollama model name mapping for gpt-oss:20b#134

Open
kndtran wants to merge 1 commit intomainfrom
fix/ollama-gpt-oss-model-name
Open

Add Ollama model name mapping for gpt-oss:20b#134
kndtran wants to merge 1 commit intomainfrom
fix/ollama-gpt-oss-model-name

Conversation

@kndtran
Copy link
Collaborator

@kndtran kndtran commented Mar 3, 2026

Summary

  • Add gpt-oss:20b -> gpt-oss_20b to BASE_MODEL_TO_CANONICAL_NAME in constants.py
  • Ollama uses colons in model names (e.g. gpt-oss:20b), but HF repo paths use underscores (gpt-oss_20b)
  • The mapping for granite4:micro -> granite4_micro already existed, but the equivalent for gpt-oss:20b was missing
  • Without this fix, obtain_io_yaml fails with "not found" when using the Ollama model name

Test plan

  • Verify obtain_io_yaml("answerability", "gpt-oss:20b", "ibm-granite/granite-lib-rag-gpt-oss-r1.0") resolves correctly

🤖 Generated with Claude Code

The BASE_MODEL_TO_CANONICAL_NAME mapping handles granite4:micro ->
granite4_micro but was missing the equivalent for gpt-oss:20b ->
gpt-oss_20b. This caused obtain_io_yaml to look for a path with
a colon (gpt-oss:20b) instead of an underscore (gpt-oss_20b) when
using Ollama model names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kndtran
Copy link
Collaborator Author

kndtran commented Mar 3, 2026

Ok, turns out Ollama has a new engine that is required by but not yet supporting gpt-oss LoRAs. Claude found the issue in the Ollama code:

Ollama has two inference runners — the older llamarunner (C++ based, supports LoRA) and the newer ollamarunner (Go based, LoRA is a TODO). Models like gpt-oss, deepseek2, gemma3, qwen3, llama4, etc. are hardcoded to require the
ollamarunner via OllamaEngineRequired(). So LoRA adapters cannot be used with any of these models. The code has TODO(jessegross): LoRA loading but no issue or PR tracking it.

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