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
When using Ollama as a provider, the context percentage in the status bar doesn't display because opencode doesn't know the model's context limit. Users have to manually configure limit.context for each model in their config.
Proposed Solution
Query Ollama's native API to automatically detect context limits:
Detect Ollama servers by checking if GET / returns "Ollama is running"
Fetch model info via POST /api/show to get num_ctx from model parameters
Fall back to 4096 (Ollama's default) if not specified in the Modelfile
User config limit.context takes priority if set
This enables the context percentage display without manual configuration.
Activity
github-actions commentedon Mar 29, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.