fix(#170): MiniMax-M2.7/M2.5-highspeed pricing for nix-v1 cost tracking#171
Merged
fix(#170): MiniMax-M2.7/M2.5-highspeed pricing for nix-v1 cost tracking#171
Conversation
…able MiniMax calls from the nix-v1 OpenClaw agent were emitting cost.usd=-1.0 because these model names were absent from _DEFAULT_PRICING. Adds entries with the official pay-as-you-go rates from https://platform.minimax.io/docs/guides/pricing-paygo — $0.60/M input, $2.40/M output, plus cache_read/cache_write. M2.7 and M2.5 differ only in cache_read ($0.06/M vs $0.03/M). Tests cover base pricing, cache-aware path, and the M2.5/M2.7 cache-read differential. Closes #170 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
arniesaha
added a commit
that referenced
this pull request
Apr 17, 2026
…spans Two compounding bugs caused MiniMax calls to show 0 in the dashboard Total Cost / LLM Calls cards even after #171 added MiniMax to the Python pricing table: 1. openclaw-agentweave-bridge copied OpenClaw's model.usage.costUsd verbatim. OpenClaw doesn't know MiniMax pricing and reports 0, so spans landed in Tempo with cost.usd=0. The Python compute_cost() is never in the bridge's code path. 2. dashboard tempoSearchQuery filtered on prov.activity.type = "llm_call", but bridge-emitted spans have activity.type = "agent_turn". Those spans were excluded from traceRows even though the Prometheus chart (using span metrics, no activity filter) still showed them. Adds plugins/openclaw-agentweave-bridge/src/pricing.ts mirroring the Python table (MiniMax + Anthropic + OpenAI + Codex aliases). resolveCost() prefers a positive upstream value and falls back to the local table when upstream is 0 / negative / NaN. Widens the dashboard filter to also match agent_turn spans with a non-empty prov.llm.model. Closes #172 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
arniesaha
added a commit
that referenced
this pull request
Apr 17, 2026
…spans (#173) Two compounding bugs caused MiniMax calls to show 0 in the dashboard Total Cost / LLM Calls cards even after #171 added MiniMax to the Python pricing table: 1. openclaw-agentweave-bridge copied OpenClaw's model.usage.costUsd verbatim. OpenClaw doesn't know MiniMax pricing and reports 0, so spans landed in Tempo with cost.usd=0. The Python compute_cost() is never in the bridge's code path. 2. dashboard tempoSearchQuery filtered on prov.activity.type = "llm_call", but bridge-emitted spans have activity.type = "agent_turn". Those spans were excluded from traceRows even though the Prometheus chart (using span metrics, no activity filter) still showed them. Adds plugins/openclaw-agentweave-bridge/src/pricing.ts mirroring the Python table (MiniMax + Anthropic + OpenAI + Codex aliases). resolveCost() prefers a positive upstream value and falls back to the local table when upstream is 0 / negative / NaN. Widens the dashboard filter to also match agent_turn spans with a non-empty prov.llm.model. Closes #172 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
minimax-m2.7-highspeedandminimax-m2.5-highspeedto_DEFAULT_PRICINGso MiniMax calls from the nix-v1 OpenClaw agent produce a realcost.usdinstead of-1.0.Closes #170
Test plan
pytest sdk/python/tests/test_pricing.py— 38 passed locally (4 new tests).MiniMax-*-highspeedspans and confirmcost.usd > 0.🤖 Generated with Claude Code