mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
feat: Set ollama model options such as context length based on API call #5091
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ErroneousBosch on GitHub (May 7, 2025).
Check Existing Issues
Problem Description
While Ollama defaults to a 2048 context length on many things, custom models can have higher, and some stock models ship with larger contexts such as qwen3 (which has a 40960 context window).
Desired Solution you'd like
Rather than having to set these manually, it would be better to have OpenWebUI configure this and other model-specific options options via an API call to
/api/show. This is described in their documentation: https://www.postman.com/postman-student-programs/ollama-api/documentation/suc47x8/ollama-rest-apiIt does have some idiosyncrasies in that these keys are prefixed with the model name, but that is surmountable.
Alternatives Considered
No response
Additional Context
No response