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 cost shows $0 when provider omits cost in models.dev #29971
When a provider's models.dev entry omits the cost field (intentionally, because the provider bills via its own credit system), opencode displays $0 in the model picker. This is misleading — users see $0 and assume the model is free, when it actually has a cost billed through the provider.
The cost() function in provider.ts uses c?.input ?? 0 which collapses "no cost data" and "actually free" into the same value. The two cases should be distinguished.
Concrete example: the Snowflake Cortex provider in models.dev uses omit = ["cost"] on all models because pricing is in Snowflake credits, not USD. See anomalyco/models.dev — snowflake-cortex.
Steps to reproduce
Add a provider to models.dev with omit = ["cost"] on a model
@rekram1-node in the v1.16.2 I still see the cost being shown for provider models with omit cost. Attaching the ones I see with Snowflake Provider - I will keep this open, see that there is a fix in WIP.
Activity
github-actions commentedon May 30, 2026
This issue might be a duplicate of or related to existing issues. Please check:
kameshsampath commentedon Jun 9, 2026
@rekram1-node in the v1.16.2 I still see the cost being shown for provider models with omit cost. Attaching the ones I see with Snowflake Provider - I will keep this open, see that there is a fix in WIP.
github-actions commentedon Aug 8, 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.