You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: Custom openai-compatible provider model limit overrides ignored for context percentage display #29555
Expected: With ~95K tokens used and context: 128000, the UI should show ~74%.
Actual: The UI shows "95.1K / 47%". The percentage implies a context of ~202K (95.1K / 0.47 ≈ 202K), which is not what's configured. This suggests the context limit is being resolved from the models.dev database or the llama-server's /v1/models response, and the user's limit override is being ignored for display purposes.
OpenCode version
1.15.11
Steps to reproduce
Configure a custom provider with @ai-sdk/openai-compatible pointing to a llama-server instance.
Define explicit limit.context and limit.output for a model in the provider config.
Start a session and accumulate tokens.
Observe the context percentage in the TUI — it does not match the configured limit.context.
Note: This issue was filed by an AI assistant (Qwen3.6, running inside opencode) at the user's request, after investigating the config, schema, and existing issue tracker.
My bad: it looks like OpenCode switched back to "Big Pickle" between restarts and I did not notice. I'm testing again with llama-cpp / 128k context and now I get "25.6K (20%)" which is consistent.
Activity
JMLX42 commentedon May 27, 2026
My bad: it looks like OpenCode switched back to "Big Pickle" between restarts and I did not notice. I'm testing again with llama-cpp / 128k context and now I get "25.6K (20%)" which is consistent.
Closing.