Skip to content

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

@GerbenCdg

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions