Repository navigation
fix(estimate): chat is free by MCP's FREE_CHAT_MODELS, not by an nvidia/ prefix - #3
Merged
Merged
Conversation
added 2 commits
October 19, 2026 23:37
…ia/ prefix Mirror @blockrun/mcp FREE_CHAT_MODELS (32 ids, incl. cohere/north-mini-code, poolside/laguna-xs-2.1, nvidia/muse-glimmer-30b and the account-sheet $0 NVIDIA ids). Bare spellings count, except bare deepseek-v4-pro, which is the paid DeepSeek model. An explicit model wins over mode, as in the MCP.
The gateways retired both (unknown-model 400), mirroring blockrun-mcp#181. Bare deepseek-v4-pro still estimates as the paid DeepSeek model.
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.
What changes
In
lib/estimate.js, the chat estimate used to treat anynvidia/*model as free. It now checks the actual $0 set, copied from @blockrun/mcpFREE_CHAT_MODELS(as of BlockRunAI/blockrun-mcp#181). The set has 32 ids, includingcohere/north-mini-code,poolside/laguna-xs-2.1,nvidia/muse-glimmer-30band the hidden NVIDIA ids that the account sheet prices at $0.cohere/north-mini-codeandpoolside/laguna-xs-2.1no longer show a ~$0.005 charge. Annvidia/*id that is not on the list now estimates as paid, which is the safe direction.gpt-oss-20b) are recognised. The one exception is baredeepseek-v4-pro: that name belongs to the paiddeepseek/deepseek-v4-pro, so it estimates as paid. This matches MCP'sFREE_SHADOWED_BY_PAID.mode, as in the MCP.model:"openai/gpt-5.6-terra", mode:"free"is no longer estimated at $0.Sources
src/utils/constants.tsFREE_CHAT_MODELS/FREE_SHADOWED_BY_PAID(fix(chat): reserve $0 for the hidden NVIDIA ids the account sheet bills at $0 blockrun-mcp#181).billing_mode:"free"and the account price sheet (blockrun.ai/api/pricing) at $0. On 2026-10-20 every id answered HTTP 200 with no payment header on both chains.Checks
node --checkpasses onlib/estimate.jsandhooks/*.js.estimate()gave the expected result for each case: mode free, cohere/poolside/muse-glimmer, a hidden nvidia id, baregpt-oss-20b,nvidia/deepseek-v4-provs baredeepseek-v4-pro, an unknownnvidia/*id, and a paid model with mode free.hooks/spend-gate.jsend-to-end withcohere/north-mini-coderaised no prompt.The Claude and Codex copies of
lib/estimate.jsare byte-identical. There is no package.json in this repo.Update (2026-10-20)
nvidia/deepseek-v4-proandnvidia/deepseek-v4-flashare removed from the free list, mirroring BlockRunAI/blockrun-mcp#181. The gateway retired -flash in blockrun#848 and is retiring -pro, and both then return an unknown-model 400. The list now has 30 ids.Bare
deepseek-v4-prostill estimates as the paid DeepSeek model. Smoke test: both nvidia ids and both bare spellings now estimate at $0.005, the paid fallback, while the other free ids still estimate at $0.