Skip to content

fix: zero out cost for local providers (ollama, local)#9219

Open
DOsinga wants to merge 1 commit into
mainfrom
fix/8192-ollama-zero-cost
Open

fix: zero out cost for local providers (ollama, local)#9219
DOsinga wants to merge 1 commit into
mainfrom
fix/8192-ollama-zero-cost

Conversation

@DOsinga
Copy link
Copy Markdown
Collaborator

@DOsinga DOsinga commented May 14, 2026

When the provider is a local inference engine (ollama, local/llamacpp), maybe_get_canonical_model now zeros out the pricing from the canonical registry. This prevents the model-name inference logic from mapping local models to cloud provider pricing (e.g. ollama/mistral-nemomistralai/mistral-nemo at $0.15/M tokens).

Context limits, max tokens, and other metadata are preserved so with_canonical_limits continues to work correctly.

Fixes #8192

When the provider is a local inference engine (ollama, llamacpp/local),
maybe_get_canonical_model now zeros out the pricing from the canonical
registry. This prevents the model-name inference logic from mapping
local models to cloud provider pricing (e.g. ollama/mistral-nemo
→ mistralai/mistral-nemo at $0.15/M tokens).

Context limits, max tokens, and other metadata are preserved.

Fixes #8192

Signed-off-by: Douwe Osinga <douwe@squareup.com>
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.

feat: show $0.00 (or hide) cost line for local Ollama provider sessions

2 participants