Skip to content

Model cost shows $0 when provider omits cost in models.dev #29971

Closed as not planned

Description

@kameshsampath

Description

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

  1. Add a provider to models.dev with omit = ["cost"] on a model
  2. Open the model picker in opencode
  3. Model shows $0 instead of no cost / unknown

Activity

  1. github-actions commented on May 30, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of or related to existing issues. Please check:

  2. kameshsampath commented on Jun 9, 2026

    @kameshsampath
    ContributorAuthor

    @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.

    Image
  3. github-actions commented on Aug 8, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions