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
Model selector shows no models when provider payload omits cost.cache #129
The model selector can show an empty list even though providers are connected and /api/opencode/provider returns models.
Root cause
In frontend/src/api/providers.ts (getProvidersFromOpenCodeServer), model mapping assumes openCodeModel.cost.cache.read/write always exists.
Some models (e.g. Google models like gemini-embedding-001) return cost without cache, which throws at runtime.
The outer try/catch then returns an empty provider list.
Reproduce
Connect providers (e.g. Google/OpenAI) via WebUI or mounted auth (both reproduce).
Open model selection dialog.
Ensure /api/opencode/provider includes a model with cost but no cost.cache.
Result: no models are shown in UI.
Expected
Missing optional fields in one model should not break the full provider/model list.
Actual
A single malformed/partial model entry causes the whole list to fail and the UI shows no models.
Activity