fix(pricing,profile): add 2026 models + revert cache values to code defaults#274
Merged
Destynova2 merged 1 commit intomainfrom Apr 25, 2026
Merged
fix(pricing,profile): add 2026 models + revert cache values to code defaults#274Destynova2 merged 1 commit intomainfrom
Destynova2 merged 1 commit intomainfrom
Conversation
…efaults Pricing additions (5 models silently fuzzy-matched to older versions or returned None — spend tracking was lying for half the full-opti-v5 profile): - MiniMax-M2.5 $0.30/M in, $1.20/M out (released 2026-02-12) - MiniMax-M2.5-Lightning $0.30/M in, $2.40/M out (2x throughput variant) - glm-4.7-flash free tier (Z.ai, released 2026-01-19) - llama-3.3-70b-versatile $0.59/M in, $0.79/M out (Groq endpoint) - mercury-coder-small $0.25/M in, $1.25/M out (Inception diffusion LLM) - gemini-2.5-pro $1.25/M in, $5.00/M out (Google) Profile cache revert: PR #273 bumped values without empirical data: - max_capacity 10000 → 2000 (default; 5x less RAM, no measured benefit) - ttl_secs 14400 → 3600 (default; avoids stale post provider update) - simhash_threshold 4 → 3 (default; better precision) - max_entry_bytes stays at 4 MiB The cache hits primarily on temperature=0 work (background tasks, summaries, MCP tools/list, tests). For normal user conversations it is ~0% because the key includes the full message history. The profile comment reflects this. 7 unit tests added in src/pricing.rs (one per new model + calculate).
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
Two unrelated cleanups (small enough to bundle):
1. Pricing — add 6 model entries actually in use today (April 2026)
Without these, the spend tracker either returned the wrong cost (fuzzy fallback to the older version) or
None(no cost recorded at all):Both
MiniMax-M2.5and lowercaseminimax-m2.5are listed (mirrors the existing M2 entry style).2. Profile cache values — revert to code defaults
PR #273 bumped these without empirical data. Reverting:
The profile comment now reflects reality: the cache hits primarily on
temperature=0work (background tasks, summaries, MCPtools/list, tests). For normal user conversations the hit rate is ~0% because the cache key includes the full message history. Operators should measuregrob_cache_hits_total / totalvia Prometheus before bumping.Test plan
cargo test --lib pricing::tests— 7 new tests passcargo clippy --lib --tests -- -D warningsclean