Repository navigation
Conversation
marker ("none", "demo") and were priced at $0. Now only exact names
like "local-model" or "none" are free.
Contributor
|
@subidhkhanal is attempting to deploy a commit to the allan-feng's projects Team on Vercel. A member of the Team first needs to authorize it. |
Review follow-ups for the exact-match change: - List rule-based-demo (the example client's default --model-name) as free; it was free only via the substring rule, so the Discord bot would forward it as a model and its runs would show a $1/$5 estimate. - Price no model at all at $0, agreeing with is_free_model. An empty id cannot reach a reservation (PricingSnapshot.model_id min_length=1). - One _is_sentinel check behind is_free_model, price_for_model and listed_price_for_model. - RULE_BASED_MODEL_LABELS shared with provenance, as a subset of FREE_MODEL_NAMES (provenance behaviour unchanged). - Bump PRICING_SOURCE_VERSION; a test pins it to a fingerprint of the table, the free names and the default so it cannot lag a price change. Co-Authored-By: Claude Opus 5.5 <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.
Fixes #590
Problem.
_FREE_MODEL_MARKERSwas matched by substring in_table_priceandis_free_model, so any model id containingnone,local,demoorbaselinepriced at $0/$0. Examples areacme/nonexistent,*-localized-*and*-demo-*. On the platform lane that $0PricingSnapshotgave a reservation ceiling of 0.Change. Both functions now match whole names (
name in _FREE_MODEL_MARKERS), the rulelisted_price_for_modelhas used since #589.acme/nonexistentvendor/model-localized-v1acme/demo-7blocal-model,none,rule-based, …Impact. No configured name changes price. The leaderboard
model_ids are real catalog slugs, baselines passNone, and the defaults are the exact sentinels. Only free-text names containing a marker move from $0 to a real price: external-run cost estimates (external_run_service.py:856), research settlement from an agent-reported model (research.py:530, still capped by the reservation), and the Discord bot, which now forwards such a name instead of dropping it.discord_bot.py:40still drops the exactlocal-modelsentinel.Not done: the
:freesuffix from the issue sketch. It is left out on purpose:test_pricing.py:84pinsprice_for_model("openai/gpt-5.5:free") == (5.0, 30.0). Billing deliberately keeps the paid rate so a reservation never gets a zero ceiling.is_free_model, it would make the Discord bot drop real OpenRouter:freemodels instead of forwarding them.listed_price_for_modelkeeps its own:freerule. Happy to add it if you want it; it's a small follow-up.Tests. New cases in
test_pricing.pycover::freeid is still a real model tois_free_model.The pricing and token-cost tests pass (47). In a local full-suite run on Windows, every failure also fails on unmodified
main, so none come from this change.