-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Description
Problem
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/showto getnum_ctxfrom model parameters - Fall back to 4096 (Ollama's default) if not specified in the Modelfile
- User config
limit.contexttakes priority if set
This enables the context percentage display without manual configuration.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels