Repository navigation
Show model tiers only where a deployment bills by them - #381
LiminalDevving wants to merge 1 commit into
Conversation
A model's subscription tier matters only to a linked meter; the meter the open-source build falls back to ignores it. The app still showed a Tier tab in the model picker and a tier badge on every model, all reading T3 because the seed sets no tier, with a tooltip about plans that don't exist. GET /api/model now sends subscription_tier only when a meter is linked (metering.Linked), and the picker shows its Tier tab only when a listed model carries a tier. Badges already hid without one. A build that links a meter keeps its tiers, with nothing to bind. Comments on the tier values described one deployment's plans; they now say what a tier is. The frontend model's comment listed the wrong values.
Chat-App API Regression
Regression suite was not found in this branch, so this check was skipped. |
|
Reviewed commit: 🔧 Minor
🧹 Nitpick
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
E2E · mock LLM ✅166 passed, 7 skipped · 501s ·
HTML report · run · main baseline: |
Show model tiers only where a deployment bills by them
A model's subscription tier is a billing grade. Only a linked meter uses it; the
NoopMeterthe open-source build falls back to ignores it. The model picker still showed tiers everywhere: a Tier tab, and a tier badge on every model. Because the seed sets no tier, every model read T3, with a tooltip about plans the install doesn't have.What changes
GET /api/modelsendssubscription_tieronly when a meter is linked.metering.Linked()reportsmetering.New != nil; the model handler clears the tier otherwise, and the field isomitempty. Inopenapi.yamlthe field is no longer required, and its description says when it is present.Screenshots
Before: a Tier tab, and T3 on every model.

After: no Tier tab and no badges.

Testing
make pre-commitandcheck-package-summariesinternal/handlers/model/handler_test.go: the tier is absent without a linked meter and sent with onenpm run build:prod,npm run lint:e2eGET /api/modelreturned 41 models, none with a tier