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
Description
When using MiniMax M2.7 via the SambaNova provider, no cost is displayed in OpenCode. Token usage is shown but the
$ costis absent.Provider config
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.costin its response. OpenCode relies on the API response for cost data.Suggested fix
"cost": { "input": 0.60, "output": 2.40 }per million tokens)