Summary
The Ollama-compatible bridge can list the newer OpenAI models such as gpt-5.5, but /api/show reports an incorrect context length for them.
Expected effective context length for the current GPT-5.5 / GPT-5.4 family should be exposed as 400000 tokens to Ollama clients. The current bridge reports smaller values:
gpt-5.5: falls back to the default 131072
gpt-5.4, gpt-5.4-pro, gpt-5.4-mini, gpt-5.4-nano: currently use 272000
This causes clients that rely on Ollama model metadata to under-estimate the available context window.
Where it happens
In src/ollama/bridge.ts, inferContextWindow() returns values from CONTEXT_WINDOW_OVERRIDES, otherwise it falls back to 131072.
Current override table includes GPT-5.4-family entries at 272000, but does not include gpt-5.5, so GPT-5.5 receives the fallback value.
The value is then surfaced by /api/show in:
parameters: num_ctx <contextLength>
model_info["<architecture>.context_length"]
model_info.context_length
Reproduction
- Enable the Ollama bridge.
- Query model metadata, for example:
curl http://localhost:<ollama-port>/api/show \
-d "{\"model\":\"gpt-5.5\"}"
- Check
parameters / model_info.context_length.
Actual: 131072 for gpt-5.5.
Expected: 400000.
For gpt-5.4, actual is currently 272000; expected is also 400000.
Suggested fix
Update the Ollama bridge context override table so current GPT-5.5 / GPT-5.4 models expose 400000, e.g.:
gpt-5.5 -> 400000
gpt-5.4 -> 400000
gpt-5.4-pro -> 400000
gpt-5.4-mini -> 400000
gpt-5.4-nano -> 400000
It may also be worth adding a small unit test around /api/show or inferContextWindow() so newly added model IDs do not silently fall back to 131072.
Summary
The Ollama-compatible bridge can list the newer OpenAI models such as
gpt-5.5, but/api/showreports an incorrect context length for them.Expected effective context length for the current GPT-5.5 / GPT-5.4 family should be exposed as
400000tokens to Ollama clients. The current bridge reports smaller values:gpt-5.5: falls back to the default131072gpt-5.4,gpt-5.4-pro,gpt-5.4-mini,gpt-5.4-nano: currently use272000This causes clients that rely on Ollama model metadata to under-estimate the available context window.
Where it happens
In
src/ollama/bridge.ts,inferContextWindow()returns values fromCONTEXT_WINDOW_OVERRIDES, otherwise it falls back to131072.Current override table includes GPT-5.4-family entries at
272000, but does not includegpt-5.5, so GPT-5.5 receives the fallback value.The value is then surfaced by
/api/showin:parameters:num_ctx <contextLength>model_info["<architecture>.context_length"]model_info.context_lengthReproduction
parameters/model_info.context_length.Actual:
131072forgpt-5.5.Expected:
400000.For
gpt-5.4, actual is currently272000; expected is also400000.Suggested fix
Update the Ollama bridge context override table so current GPT-5.5 / GPT-5.4 models expose
400000, e.g.:gpt-5.5->400000gpt-5.4->400000gpt-5.4-pro->400000gpt-5.4-mini->400000gpt-5.4-nano->400000It may also be worth adding a small unit test around
/api/showorinferContextWindow()so newly added model IDs do not silently fall back to131072.