Repository navigation
fix(k8s): enforce the window of each gateway deployment - #2843
Merged
Merged
Conversation
LiteLLM reads max_input_tokens only from the top-level model_info of a deployment. The config set it under litellm_params, so no window was enforced and a long prompt could reach a smaller tier, where Ollama cuts it without an error. Every ollama_chat deployment now sets the window of its tier, and the two useless context_window_fallbacks rules are gone.
A prompt longer than the window of devops-background moves on along the plain fallbacks to qwen3.8:27b. It fails only when no group of the chain holds it. The config, the gateway README and the archived change now say so.
Owner
Author
|
Test results and review notes. Fail-to-pass run ( Local checks: Review findings, both minor, both fixed in commit 07ae288:
No test came with this fix. The change is prose, and a test of comment text has no value. |
dan-petty
marked this pull request as ready for review
October 31, 2026 06:36
dan-petty
pushed a commit
that referenced
this pull request
Oct 31, 2026
🤖 I have created a release *beep* *boop* --- ## [0.26.0](v0.25.0...v0.26.0) (2026-10-31) ### Features * **k8s:** preview requests in dry run for cluster commands ([#2839](#2839)) ([b6de1a4](b6de1a4)), closes [#2238](#2238) * **pr:** preview requests in dry run for pr commands ([#2835](#2835)) ([2a9b746](2a9b746)), closes [#2234](#2234) ### Bug Fixes * **k8s:** enforce the window of each gateway deployment ([#2843](#2843)) ([2ff7d9f](2ff7d9f)), closes [#2825](#2825) * **roadmap:** measure a task group by the files its step reads ([#2847](#2847)) ([2f3986a](2f3986a)), closes [#2838](#2838) * **tests:** replace real test sleeps with clock ([#2169](#2169)) ([#2833](#2833)) ([506f769](506f769)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LiteLLM v1.103.0 reads the window of a deployment only from its top-level
model_info. The gateway config put the window underlitellm_params, so the pre-call check never ran. Ollama then cut long prompts without an error.This change:
model_info.max_input_tokenson eachollama_chatdeployment, equal to theOLLAMA_CONTEXT_LENGTHof its tier.context_window_fallbacksrules. No target group has a larger window.devops-backgroundmoves on along the plain fallbacks toqwen3.8:27b. It fails only when no group of the chain holds it.Closes #2825