Summary
A configured limit.context override for the existing openai/gpt-5.6-sol catalog model is ignored. This prevents users from lowering the effective context limit to trigger automatic compaction earlier.
Environment
- opencode version:
opencode2 v0.0.0-next-15766 (also reproduced on 0.0.0-next-15760)
- OS:
Linux 7.0.9-ogc3.2.fc44.x86_64 x86_64
- Terminal:
TERM_PROGRAM=tmux, TERM=xterm-256color, COLORTERM=truecolor
- Shell:
/bin/bash
- Install/channel: globally installed
next channel
- Active plugins: No user-configured plugins or local plugin files found
Reproduction
-
Add the following to ~/.config/opencode/opencode.jsonc:
-
Restart the shared service:
opencode2 service restart
-
Inspect the resolved model:
opencode2 api get /api/model \
| jq '.data[] | select(.id == "gpt-5.6-sol") | {id, modelID, providerID, limit}'
-
Observe that the configured context limit is not present.
Expected Behavior
The existing catalog entry should be overlaid with the configured partial limit:
{
"limit": {
"context": 308000,
"input": 922000,
"output": 128000
}
}
Automatic compaction should therefore use approximately 308000 - 128000 = 180000 tokens as its preflight threshold with the default compaction buffer.
Actual Behavior
The resolved model retains the original catalog limits:
{
"id": "gpt-5.6-sol",
"modelID": "gpt-5.6-sol",
"providerID": "openai",
"limit": {
"context": 1050000,
"input": 922000,
"output": 128000
}
}
The behavior is consistent across service restarts. It reproduced on both 0.0.0-next-15760 and 0.0.0-next-15766.
Additional Context
- The configuration uses the documented V2
providers shape from https://v2.opencode.ai/models.
- Restarting the background service does not help.
- Changing the configured model into a custom alias also did not make the model appear in
/api/model.
- No user-configured plugins were found.
- The service remains healthy after restart.
Summary
A configured
limit.contextoverride for the existingopenai/gpt-5.6-solcatalog model is ignored. This prevents users from lowering the effective context limit to trigger automatic compaction earlier.Environment
opencode2 v0.0.0-next-15766(also reproduced on0.0.0-next-15760)Linux 7.0.9-ogc3.2.fc44.x86_64 x86_64TERM_PROGRAM=tmux,TERM=xterm-256color,COLORTERM=truecolor/bin/bashnextchannelReproduction
Add the following to
~/.config/opencode/opencode.jsonc:{ "$schema": "https://opencode.ai/config.json", "providers": { "openai": { "models": { "gpt-5.6-sol": { "limit": { "context": 308000 } } } } } }Restart the shared service:
Inspect the resolved model:
Observe that the configured context limit is not present.
Expected Behavior
The existing catalog entry should be overlaid with the configured partial limit:
{ "limit": { "context": 308000, "input": 922000, "output": 128000 } }Automatic compaction should therefore use approximately
308000 - 128000 = 180000tokens as its preflight threshold with the default compaction buffer.Actual Behavior
The resolved model retains the original catalog limits:
{ "id": "gpt-5.6-sol", "modelID": "gpt-5.6-sol", "providerID": "openai", "limit": { "context": 1050000, "input": 922000, "output": 128000 } }The behavior is consistent across service restarts. It reproduced on both
0.0.0-next-15760and0.0.0-next-15766.Additional Context
providersshape from https://v2.opencode.ai/models./api/model.