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] Model provider not restored correctly when switching projects, and missing provider display in UI #34562
When switching between different projects, there is an intermittent bug where the model provider is not restored correctly, leading to unintended token/credit consumption:
Reproduction scenario:
Project A is configured to use glm-5.2 model from Provider D
Switch to Project B, which uses glm-5.2 model from Provider F
Switch back to Project A: the UI still shows glm-5.2, but the actual provider has changed to Provider F
Impact: Users are unaware of the provider change, resulting in unexpected credit consumption and confusion.
Expected behavior
When switching back to a project, the full model + provider configuration should be restored completely, not just the model name.
The UI should clearly display the provider name of the current model, helping users identify the model's origin at a glance.
Plugins
No response
OpenCode version
v1.17.11
Steps to reproduce
Open OpenCode, go to Project A, select glm-5.2 from Provider D, and perform a request/call.
Switch to Project B, select glm-5.2 from Provider F, and perform a request/call.
Switch back to Project A.
Observation: The UI shows glm-5.2, but the actual request is sent to Provider F (verified via credit consumption logs or API requests).
Screenshot and/or share link
Suggested improvements
Fix the model state persistence logic: Bind "model + provider" as a single configuration item per project, and restore it fully when switching projects.
UI enhancement: Show the provider name explicitly in the model selector or current model display, e.g., glm-5.2 (Provider D).
Add attribution in logs: Show the provider name in request/usage logs to help users track consumption.
Activity
github-actions commentedon Jun 30, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is distinct, please clarify what makes it different from the above.
github-actions commentedon Aug 30, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.