fix: correct Ollama context metadata for GPT-5.5 and GPT-5.4 models#420
Merged
icebear0828 merged 1 commit intoicebear0828:devfrom Apr 29, 2026
Merged
Conversation
icebear0828
pushed a commit
that referenced
this pull request
May 5, 2026
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.
Summary
Fixes the Ollama bridge metadata for current GPT-5.5 / GPT-5.4 models so
/api/showreports a 400k effective context window instead of smaller stale fallback values.This updates the bridge context override table for:
gpt-5.5gpt-5.4gpt-5.4-progpt-5.4-minigpt-5.4-nanoIt also adds GPT-5.5 family detection so Ollama
model_infousesgpt-5.5.context_lengthinstead of falling back to the genericgpt.context_lengthkey.Fixes #419.
Why this is hardcoded for now
I checked the current Codex model info endpoint exposed by the proxy (
/v1/models/gpt-5.5/infoand/v1/models/gpt-5.4/info). The returned model metadata includes reasoning efforts and modalities, but does not include a context-window field such ascontext_window,contextLength, orcontext_length.Because the upstream model info does not currently provide context length, the Ollama bridge has no dynamic source to sync from. This PR therefore keeps the existing override-table approach and updates that table to the current 400k effective context size for the GPT-5.5 / GPT-5.4 family.
Root cause
gpt-5.5was not present inCONTEXT_WINDOW_OVERRIDES, so it fell back to131072. GPT-5.4-family entries were still set to272000.Validation
npx vitest run tests/unit/ollama/bridge.test.tsnpx vitest run tests/unit/models/model-store.test.ts tests/unit/ollama/bridge.test.tsnpx vitest run tests/unitnpm run build