Files
oh-my-pi/packages
can1357 8429f4700e fix(ai/ollama): discover native context length from /api/show
Previously, Ollama model discovery hardcoded contextWindow=128000 and
maxTokens=8192 regardless of the model's actual capacity. That caused
OMP's planner and overflow detector to disagree with Ollama — e.g. a
4k-context model would be planned against 128k, and a 32k-context model
would be silently clamped by OMP.

For each entry returned by /api/tags, POST /api/show and read the
first '<arch>.context_length' field from 'model_info' to pick up the
model's native context window. Fall back to Ollama's default 4096
when the endpoint or field is missing so discovery still works against
older builds. maxTokens is left at 8192 to match the existing default.

Fixes #760
2026-04-24 06:33:20 +02:00
..
2026-04-24 05:55:59 +02:00
2026-04-24 05:55:59 +02:00
2026-04-24 05:55:59 +02:00
2026-04-24 05:55:59 +02:00
2026-04-24 05:55:59 +02:00