Skip to content

[SambaNova] Cost not displayed for MiniMax M2.7 via SambaNova provider #26088

Closed as not planned

Description

@GerbenCdg

Description

When using MiniMax M2.7 via the SambaNova provider, no cost is displayed in OpenCode. Token usage is shown but the $ cost is absent.

Provider config

"sambanova": {
  "npm": "@ai-sdk/openai-compatible",
  "name": "SambaNova",
  "options": {
    "baseURL": "https://api.sambanova.ai/v1"
  },
  "models": {
    "MiniMax-M2.7": {
      "name": "MiniMax M2.7 SambaNova"
    }
  }
}

Expected behavior

Cost should appear based on MiniMax pricing (input: $0.60/M tokens, output: $2.40/M tokens).

Actual behavior

OpenCode shows token usage but no cost line.

Likely cause

SambaNova API does not return usage.cost in its response. OpenCode relies on the API response for cost data.

Suggested fix

  • Support manual cost configuration per model in opencode.json (e.g. "cost": { "input": 0.60, "output": 2.40 } per million tokens)
  • Or fallback: use models.dev pricing data when API doesn't return cost

Activity

  1. github-actions commented on May 6, 2026

    @github-actions
    Contributor

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

    If your issue is distinct from these, please add details explaining how it differs.

  2. hholst80 commented on May 6, 2026

    @hholst80

    @GerbenCdg Why not raise this with the provider? Or perhaps you have? I would much rather have the cost data be sourced from the provider data itself rather than a work-for-free project like OpenCode taking any kind of semi responsibility for the size of my eventual bills. ;-)

  3. github-actions commented on Jul 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