Skip to content

chore(catalog): remove pricing-row model_id - #1960

Merged
Abhijeet Prasad (AbhiPrasad) merged 2 commits into
mainfrom
devin/1796156894-remove-pricing-model-id
Dec 1, 2026
Merged

Abhijeet Prasad (AbhiPrasad) merged 2 commits into
mainfrom
devin/1796156894-remove-pricing-model-id

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Removes model_id from all 469 pricing rows in model_list.json, from the pricing-rate Zod schema, and from the add-model workflow prompt and .github/model-pricing.md, so the workflow stops adding it.

  • 395 rows just repeated the catalog key.
  • In the other 74 rows, model_id pointed at a different upstream ID, such as a Fireworks router or a Bedrock inference profile. A follow-up PR adds those IDs as top-level catalog entries, since the catalog is indexed by model ID.
  • No reader uses the field. Lingua parses it as optional and never reads it. Brainstore treats unknown row keys as conditions and rejects model_id with UnsupportedCondition, so dropping it may let some rows bill. I found that by reading the code, not by running it.
  • Removing it left two identical amazon.nova-pro-v1:0 Bedrock flex rows (one was the apac profile row), so the duplicate is deleted.

Link to Devin session: https://braintrust.devinenterprise.com/sessions/f073cdbf3b9b4eb3a6a20a9019bbc7fe
Open in Devin Desktop: https://braintrust.devinenterprise.com/desktop/session/f073cdbf3b9b4eb3a6a20a9019bbc7fe?variant=devin

devin-ai-integration Bot and others added 2 commits December 1, 2026 20:29
> 🤖 **This text was AI-generated.**

Pricing rows carried a `model_id` field. In 395 of 469 rows it repeated the catalog key, and no reader uses it: Lingua parses it as an unused `Option`, app and api-ts ignore it, and Brainstore's `select_billing_rate` treats it as an unsupported condition, so rows carrying it fail billing selection.

Remove it from `model_list.json`, the `PricingRate` schema, tests, and the add-model pricing guidance so new entries don't add it back.

Co-authored-by: Abhijeet Prasad <abhijeet@braintrustdata.com>
> 🤖 **This text was AI-generated.**

Removing pricing-row model IDs made two Bedrock Flex rates for Amazon Nova Pro identical. Keep the first row and drop the duplicate.

Co-authored-by: Abhijeet Prasad <abhijeet@braintrustdata.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T20:34:03.547632Z 0493959 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0493959397

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".

Comment on lines 9219 to 9222
"endpoints": [
"api.fireworks.ai"
],
"model_id": "accounts/fireworks/routers/glm-5p3-fast"
]
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add alternate IDs before dropping their pricing condition

For alternate upstream IDs such as accounts/fireworks/routers/glm-5p3-fast, this removal leaves the rate under the base accounts/fireworks/models/glm-5p3 entry, but a repo-wide exact-key search confirms that the router has no top-level catalog entry. Because the catalog is indexed by model ID, requests using that documented router can no longer be associated with this rate, while base-model lookups may see a rate that was explicitly restricted to another ID. Add the alternate catalog entries in this change, or retain an equivalent mapping until they exist; the same gap affects other Fireworks routers and several Bedrock inference profiles.

Useful? React with 👍 / 👎.

5. Add the matching provider mapping in `packages/proxy/schema/index.ts`. Preserve the existing JSON formatting and field ordering; do not manually reorder entries, because the next workflow step applies the repository's canonical model ordering and regenerates the provider index.
6. For the target and every new or existing companion, add or refresh provider/tier `pricing` following `.github/model-pricing.md`, even when a priced endpoint handled the target or the model already exists.
Check batch, fast, ultrafast, flex, and priority independently on each provider. Batch uses a separate API on many providers; fast can use `service_tier`, `speed`, or a different upstream `model_id`. Record only verified rates and conditions, and report unsupported or unresolved checks. Use explicit same-model/provider aliases for verified tier synonyms; update the target array only.
Check batch, fast, ultrafast, flex, and priority independently on each provider. Batch uses a separate API on many providers; fast can use `service_tier` or `speed`. Record only verified rates and conditions, and report unsupported or unresolved checks. Use explicit same-model/provider aliases for verified tier synonyms; update the target array only.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Teach the workflow to catalog router-based fast modes

When adding a Fireworks model whose Fast or Ultra-fast mode uses a separate router ID, this revised instruction recognizes only service_tier and speed, while .github/model-pricing.md still states that those Fireworks modes use documented router IDs. Since model_id is also removed from the pricing schema and this step says to update only the target array, the automation now has no prescribed representation for those rates and will omit them or attach them to the wrong model; instruct it to create and map a top-level router entry instead.

Useful? React with 👍 / 👎.

@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Confidence Score: 4/5RetriggerView in Greptile

[High impact] The change reaches pricing data used across many catalog models and providers.

Resolve the conflicting Bedrock prices before merging.

FindingsFix All in Cursor

  1. P1 Two prices now match ▶
  2. P2 Missing prices pass the test ▶
Fix with agent prompt
### Issue 1
packages/proxy/schema/model_list.json:20661
Removing `model_id` leaves conflicting rates under `xai.grok-4.6` → `pricing.bedrock.flex`. The former US-profile row charges $1.10/$3.30 per million input/output tokens, while the former global-profile row charges $1/$3. Both now match `bedrock-runtime` in `us-west-2` and several other US regions. No remaining condition distinguishes them, so catalog readers cannot tell which price applies. Array order must not choose the price.

Move these rates to their matching catalog entries, or preserve their separate scopes another way, before removing the selector.

### Issue 2
packages/proxy/schema/models.test.ts:272
The remaining assertion passes when `pricing.fast` is missing, because `undefined` is not equal to the populated `pricing.priority`. The deleted assertions previously caught missing fast and ultrafast entries. Add explicit presence checks for both tiers so accidentally deleting their prices still fails the test.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Removes model_id from pricing rows, the shared schema, and model-maintenance instructions.

  • Pricing rows no longer carry a second model ID.

Acknowledged deferral: devin-ai-integration[bot] states that differing upstream IDs will become top-level catalog entries in a follow-up PR. Missing entries alone are not reported here.

Reviews (1) · Last reviewed commit: "fix(catalog): remove duplicate Nova Pro ..." · Reviewed by Greptile

@@ -20757,8 +20658,7 @@
"us-east-2",
"us-west-1",
"us-west-2"
],
"model_id": "global.xai.grok-4.6"
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Two prices now match

Removing model_id leaves conflicting rates under xai.grok-4.6 → pricing.bedrock.flex. The former US-profile row charges $1.10/$3.30 per million input/output tokens, while the former global-profile row charges $1/$3. Both now match bedrock-runtime in us-west-2 and several other US regions. No remaining condition distinguishes them, so catalog readers cannot tell which price applies. Array order must not choose the price.

Move these rates to their matching catalog entries, or preserve their separate scopes another way, before removing the selector.

Knowledge Base Used: Proxy schemas and model catalog

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/proxy/schema/model_list.json
Line: 20661

Comment:
**Two prices now match**

Removing `model_id` leaves conflicting rates under `xai.grok-4.6` → `pricing.bedrock.flex`. The former US-profile row charges $1.10/$3.30 per million input/output tokens, while the former global-profile row charges $1/$3. Both now match `bedrock-runtime` in `us-west-2` and several other US regions. No remaining condition distinguishes them, so catalog readers cannot tell which price applies. Array order must not choose the price.

Move these rates to their matching catalog entries, or preserve their separate scopes another way, before removing the selector.

**Knowledge Base Used:** [Proxy schemas and model catalog](https://app.greptile.com/-/switch-tenant?tenant=braintrust&next=%2Fcustom-context%2Fknowledge-base%2Fbraintrustdata%2Fbraintrust-proxy%2F-%2Fdocs%2Fproxy-schema-and-model-catalog.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Cursor Fix in Claude Code Fix in Codex Fix in Devin

expect(pricing.fast![0].model_id).toBe(
"accounts/fireworks/routers/glm-5p3-fast",
);
expect(pricing.fast).not.toEqual(pricing.priority);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing prices pass the test

The remaining assertion passes when pricing.fast is missing, because undefined is not equal to the populated pricing.priority. The deleted assertions previously caught missing fast and ultrafast entries. Add explicit presence checks for both tiers so accidentally deleting their prices still fails the test.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/proxy/schema/models.test.ts
Line: 272

Comment:
**Missing prices pass the test**

The remaining assertion passes when `pricing.fast` is missing, because `undefined` is not equal to the populated `pricing.priority`. The deleted assertions previously caught missing fast and ultrafast entries. Add explicit presence checks for both tiers so accidentally deleting their prices still fails the test.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Cursor Fix in Claude Code Fix in Codex Fix in Devin

@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) merged commit 96f0bc8 into main Dec 1, 2026
7 checks passed
Abhijeet Prasad (AbhiPrasad) added a commit that referenced this pull request Dec 1, 2026
…1961)

## Summary
Follow-up to #1960, which removed pricing-row `model_id`. Some of those
rows priced a different upstream ID than their catalog key. Since the
catalog is keyed by model ID, this PR adds three of those Bedrock
inference profiles as top-level entries, following the existing profile
entries (e.g. `us.moonshotai.kimi-k3`):

- `in.moonshotai.kimi-k3`: [model
card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-moonshot-ai-kimi-k3.html),
[ap-south-1 price
list](https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonBedrock/current/ap-south-1/index.json)
- `us.zai.glm-5.3`, `global.zai.glm-5.3`: [model
card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-zai-glm-5-3.html),
[Bedrock pricing](https://aws.amazon.com/bedrock/pricing/)

Parent entries are unchanged.

**Not added:**
- `eu.`/`apac.amazon.nova-pro-v1:0` and
`eu.`/`jp.amazon.nova-2-lite-v1:0`: AWS lists `$0` for the Flex
cache-write meter, which doesn't match the input-rate cache-write price
the old rows carried.
- 10 `accounts/fireworks/routers/*` IDs: as top-level entries they'd
resolve to `openai`/`azure` endpoints, not `fireworks`, unless the
endpoint index changes too.

Link to Devin session:
https://braintrust.devinenterprise.com/sessions/f073cdbf3b9b4eb3a6a20a9019bbc7fe
Open in Devin Desktop:
https://braintrust.devinenterprise.com/desktop/session/f073cdbf3b9b4eb3a6a20a9019bbc7fe?variant=devin

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Abhijeet Prasad <abhijeet@braintrustdata.com>
Abhijeet Prasad (AbhiPrasad) added a commit to braintrustdata/lingua that referenced this pull request Dec 1, 2026
## Summary
Removes `PricingRate::model_id` and drops it from the
`model_spec_parses_tier_pricing_and_ignores_unknown_tiers` fixture.
Nothing read it, and the proxy catalog no longer emits it
(braintrustdata/braintrust-proxy#1960). Rates for a different upstream
ID now live in their own top-level catalog entry.

`PricingRate` keeps serde's default unknown-field handling, so older
catalogs that still send `model_id` keep parsing.

This is source-breaking for any Rust caller that references the public
field. None exist in braintrust (the gateway's `service_tier.rs` doesn't
read it).

Link to Devin session:
https://braintrust.devinenterprise.com/sessions/f073cdbf3b9b4eb3a6a20a9019bbc7fe
Open in Devin Desktop:
https://braintrust.devinenterprise.com/desktop/session/f073cdbf3b9b4eb3a6a20a9019bbc7fe?variant=devin

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Abhijeet Prasad <abhijeet@braintrustdata.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant