Skip to content

fix: map LiteLLM's ollama_chat provider to the registry's ollama - #292

Merged
PabloPardoGarcia merged 2 commits into
mainfrom
pablo/rius-1881-sdks-map-ollama-provider-ids-to
Nov 17, 2026
Merged

PabloPardoGarcia merged 2 commits into
mainfrom
pablo/rius-1881-sdks-map-ollama-provider-ids-to

Conversation

@PabloPardoGarcia

Copy link
Copy Markdown
Member

The GenAI registry now lists ollama as a well-known gen_ai.provider.name value (open-telemetry/semantic-conventions-genai#663). OpenInference already sends ollama, which passes through. LiteLLM routes Ollama's chat endpoint as ollama_chat, which didn't map.

  • PROVIDER_NAME_ALIASES gets ollama_chat → ollama.
  • A routed model such as ollama_chat/llama3.2 now drops its prefix when the provider is ollama_chat, the same as other providers.

The TypeScript SDK gets the same alias in a matching PR, plus the AI SDK ollama.* prefix, which only reaches TypeScript.

Tests: provider spelling and routed-model cases added. ruff check, ruff format --check, mypy and pytest pass (3127 passed).

Closes RIUS-1881

The GenAI registry now lists ollama as a well-known gen_ai.provider.name.
LiteLLM routes Ollama's chat endpoint as ollama_chat, so that value now
maps to ollama, and an ollama_chat/<model> route drops its prefix like
other providers.
@PabloPardoGarcia
PabloPardoGarcia merged commit 5741a2a into main Nov 17, 2026
12 checks passed
@PabloPardoGarcia
PabloPardoGarcia deleted the pablo/rius-1881-sdks-map-ollama-provider-ids-to branch November 17, 2026 09:00
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