refactor(ui): extract pricing field metadata into its own module - #6057
Merged
Merged
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe change moves pricing metadata and related types into ChangesPricing metadata centralization
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
18 tasks
Contributor
Author
This was referenced Aug 11, 2026
impoiler
force-pushed
the
pricing-catalog-3-fields-extract
branch
from
August 11, 2026 10:17
cc194be to
ac09297
Compare
impoiler
force-pushed
the
pricing-catalog-2-api
branch
2 times, most recently
from
August 12, 2026 06:13
0215cd5 to
c5663fc
Compare
impoiler
force-pushed
the
pricing-catalog-3-fields-extract
branch
from
August 12, 2026 06:13
ac09297 to
0ec4ea6
Compare
impoiler
force-pushed
the
pricing-catalog-2-api
branch
from
August 12, 2026 06:31
c5663fc to
466c197
Compare
impoiler
force-pushed
the
pricing-catalog-3-fields-extract
branch
from
August 12, 2026 06:31
0ec4ea6 to
634158c
Compare
This was referenced Aug 12, 2026
feat(logstore): fan out team/customer/BU dimension reads to JSON-array columns on all dialects
#6092
Merged
impoiler
marked this pull request as ready for review
August 12, 2026 09:59
Adds Store.CatalogPricingOverrides(model, provider, mode), which reports both the override that applies to a management-catalog row and every override matching that (model, provider) pair. The catalog has no virtual-key/user/selected-key context, so the applied patch is resolved with only the provider set. scopePriorityOrder then naturally yields [provider, global] - the two scopes that hold for every caller - so no new precedence logic is introduced and the displayed price comes from the same path that bills requests. resolve() is split into resolveEntry() so the winning override's identity is recoverable; behavior is unchanged. Overrides in the virtual-key, user and provider-key families are still returned for informational display, matched by the weaker matchesCatalogProvider predicate since they can never satisfy matchesScope without runtime identifiers.
listModelDetails returned only base governance_model_pricing values, so the model catalog showed datasheet prices even when a global or provider scoped override was in effect. Each model row now carries overridden_pricing (only the displayed cost fields the override actually changes), applied_override_id, and pricing_override_ids. Base pricing fields are left untouched so the UI can show both numbers. Override summaries are deduplicated into a response-level pricing_overrides map keyed by ID: a single global wildcard override would otherwise be serialized once per row. Overrides resolve against the mode of the base row being displayed, so a chat-only override never restates the price of an embedding or transcription row. Every new field is omitempty, so responses are byte-identical when no overrides exist.
PRICING_FIELDS, REQUEST_TYPE_GROUPS and their derived lookups lived in pricingOverrideSheet.tsx, a ~1300 line client component that pulls in RTK mutations, react-hook-form and the user picker registry. Read-only consumers could not reuse the field labels without dragging all of that into their bundle. Moves them verbatim to ./pricingFields. pricingOverrideSheet re-exports every moved binding, so existing importers are unchanged. Also points pricingFieldSelector at the new module, which removes the pre-existing pricingFieldSelector <-> pricingOverrideSheet import cycle that oxlint was reporting. No behavior change.
impoiler
force-pushed
the
pricing-catalog-3-fields-extract
branch
from
August 12, 2026 11:07
634158c to
3610fa0
Compare
impoiler
force-pushed
the
pricing-catalog-2-api
branch
from
August 12, 2026 11:07
466c197 to
204172b
Compare
18 tasks
Contributor
Merge activity
|
akshaydeo
changed the base branch from
pricing-catalog-2-api
to
graphite-base/6057
August 12, 2026 15:54
akshaydeo
dismissed
coderabbitai[bot]’s stale review
August 12, 2026 15:55
The base branch was changed.
akshaydeo
pushed a commit
that referenced
this pull request
Aug 13, 2026
## Summary Pricing field metadata (`PRICING_FIELDS`, `REQUEST_TYPE_GROUPS`, related types and helpers) was previously defined inside `pricingOverrideSheet.tsx`. This meant any read-only consumer (e.g. a model-catalog detail sheet) that needed field labels would have to pull in the full form/mutation dependencies of that component. This PR extracts that metadata into a dedicated `pricingFields.ts` module and re-exports everything from `pricingOverrideSheet.tsx` to preserve backward compatibility for existing importers. ## Changes - Extracted `PRICING_FIELDS`, `REQUEST_TYPE_GROUPS`, `REQUEST_TYPE_OPTIONS`, `getRequestTypeGroup`, `fieldLabelByKey`, `patchKeys`, `PricingFieldKey`, and `FieldErrors` from `pricingOverrideSheet.tsx` into a new `pricingFields.ts` file. - `pricingOverrideSheet.tsx` now re-exports all of the above from `pricingFields.ts`, so no existing import paths break. - `pricingFieldSelector.tsx` updated to import directly from `pricingFields.ts` instead of `pricingOverrideSheet.tsx`. - The motivation is to allow lightweight, read-only consumers to import field labels without incurring the bundle cost of the override sheet's form and mutation logic. ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test ```sh cd ui pnpm i || npm i pnpm build || npm run build ``` Verify that the custom pricing overrides sheet still renders correctly, that field selectors display the correct labels, and that no import errors appear in the build output. ## Breaking changes - [x] No ## Security considerations None. This is a pure code organization change with no behavioral differences. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
akshaydeo
pushed a commit
that referenced
this pull request
Aug 13, 2026
## Summary Pricing field metadata (`PRICING_FIELDS`, `REQUEST_TYPE_GROUPS`, related types and helpers) was previously defined inside `pricingOverrideSheet.tsx`. This meant any read-only consumer (e.g. a model-catalog detail sheet) that needed field labels would have to pull in the full form/mutation dependencies of that component. This PR extracts that metadata into a dedicated `pricingFields.ts` module and re-exports everything from `pricingOverrideSheet.tsx` to preserve backward compatibility for existing importers. ## Changes - Extracted `PRICING_FIELDS`, `REQUEST_TYPE_GROUPS`, `REQUEST_TYPE_OPTIONS`, `getRequestTypeGroup`, `fieldLabelByKey`, `patchKeys`, `PricingFieldKey`, and `FieldErrors` from `pricingOverrideSheet.tsx` into a new `pricingFields.ts` file. - `pricingOverrideSheet.tsx` now re-exports all of the above from `pricingFields.ts`, so no existing import paths break. - `pricingFieldSelector.tsx` updated to import directly from `pricingFields.ts` instead of `pricingOverrideSheet.tsx`. - The motivation is to allow lightweight, read-only consumers to import field labels without incurring the bundle cost of the override sheet's form and mutation logic. ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test ```sh cd ui pnpm i || npm i pnpm build || npm run build ``` Verify that the custom pricing overrides sheet still renders correctly, that field selectors display the correct labels, and that no import errors appear in the build output. ## Breaking changes - [x] No ## Security considerations None. This is a pure code organization change with no behavioral differences. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
This was referenced Aug 13, 2026
akshaydeo
pushed a commit
that referenced
this pull request
Aug 14, 2026
## Summary Pricing field metadata (`PRICING_FIELDS`, `REQUEST_TYPE_GROUPS`, related types and helpers) was previously defined inside `pricingOverrideSheet.tsx`. This meant any read-only consumer (e.g. a model-catalog detail sheet) that needed field labels would have to pull in the full form/mutation dependencies of that component. This PR extracts that metadata into a dedicated `pricingFields.ts` module and re-exports everything from `pricingOverrideSheet.tsx` to preserve backward compatibility for existing importers. ## Changes - Extracted `PRICING_FIELDS`, `REQUEST_TYPE_GROUPS`, `REQUEST_TYPE_OPTIONS`, `getRequestTypeGroup`, `fieldLabelByKey`, `patchKeys`, `PricingFieldKey`, and `FieldErrors` from `pricingOverrideSheet.tsx` into a new `pricingFields.ts` file. - `pricingOverrideSheet.tsx` now re-exports all of the above from `pricingFields.ts`, so no existing import paths break. - `pricingFieldSelector.tsx` updated to import directly from `pricingFields.ts` instead of `pricingOverrideSheet.tsx`. - The motivation is to allow lightweight, read-only consumers to import field labels without incurring the bundle cost of the override sheet's form and mutation logic. ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test ```sh cd ui pnpm i || npm i pnpm build || npm run build ``` Verify that the custom pricing overrides sheet still renders correctly, that field selectors display the correct labels, and that no import errors appear in the build output. ## Breaking changes - [x] No ## Security considerations None. This is a pure code organization change with no behavioral differences. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
akshaydeo
pushed a commit
that referenced
this pull request
Aug 19, 2026
## Summary Pricing field metadata (`PRICING_FIELDS`, `REQUEST_TYPE_GROUPS`, related types and helpers) was previously defined inside `pricingOverrideSheet.tsx`. This meant any read-only consumer (e.g. a model-catalog detail sheet) that needed field labels would have to pull in the full form/mutation dependencies of that component. This PR extracts that metadata into a dedicated `pricingFields.ts` module and re-exports everything from `pricingOverrideSheet.tsx` to preserve backward compatibility for existing importers. ## Changes - Extracted `PRICING_FIELDS`, `REQUEST_TYPE_GROUPS`, `REQUEST_TYPE_OPTIONS`, `getRequestTypeGroup`, `fieldLabelByKey`, `patchKeys`, `PricingFieldKey`, and `FieldErrors` from `pricingOverrideSheet.tsx` into a new `pricingFields.ts` file. - `pricingOverrideSheet.tsx` now re-exports all of the above from `pricingFields.ts`, so no existing import paths break. - `pricingFieldSelector.tsx` updated to import directly from `pricingFields.ts` instead of `pricingOverrideSheet.tsx`. - The motivation is to allow lightweight, read-only consumers to import field labels without incurring the bundle cost of the override sheet's form and mutation logic. ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test ```sh cd ui pnpm i || npm i pnpm build || npm run build ``` Verify that the custom pricing overrides sheet still renders correctly, that field selectors display the correct labels, and that no import errors appear in the build output. ## Breaking changes - [x] No ## Security considerations None. This is a pure code organization change with no behavioral differences. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
akhsaul
pushed a commit
to akhsaul/bifrost
that referenced
this pull request
Aug 27, 2026
…imhq#6057) ## Summary Pricing field metadata (`PRICING_FIELDS`, `REQUEST_TYPE_GROUPS`, related types and helpers) was previously defined inside `pricingOverrideSheet.tsx`. This meant any read-only consumer (e.g. a model-catalog detail sheet) that needed field labels would have to pull in the full form/mutation dependencies of that component. This PR extracts that metadata into a dedicated `pricingFields.ts` module and re-exports everything from `pricingOverrideSheet.tsx` to preserve backward compatibility for existing importers. ## Changes - Extracted `PRICING_FIELDS`, `REQUEST_TYPE_GROUPS`, `REQUEST_TYPE_OPTIONS`, `getRequestTypeGroup`, `fieldLabelByKey`, `patchKeys`, `PricingFieldKey`, and `FieldErrors` from `pricingOverrideSheet.tsx` into a new `pricingFields.ts` file. - `pricingOverrideSheet.tsx` now re-exports all of the above from `pricingFields.ts`, so no existing import paths break. - `pricingFieldSelector.tsx` updated to import directly from `pricingFields.ts` instead of `pricingOverrideSheet.tsx`. - The motivation is to allow lightweight, read-only consumers to import field labels without incurring the bundle cost of the override sheet's form and mutation logic. ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test ```sh cd ui pnpm i || npm i pnpm build || npm run build ``` Verify that the custom pricing overrides sheet still renders correctly, that field selectors display the correct labels, and that no import errors appear in the build output. ## Breaking changes - [x] No ## Security considerations None. This is a pure code organization change with no behavioral differences. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
occcat
pushed a commit
to occcat/bifrost
that referenced
this pull request
Sep 2, 2026
…imhq#6057) ## Summary Pricing field metadata (`PRICING_FIELDS`, `REQUEST_TYPE_GROUPS`, related types and helpers) was previously defined inside `pricingOverrideSheet.tsx`. This meant any read-only consumer (e.g. a model-catalog detail sheet) that needed field labels would have to pull in the full form/mutation dependencies of that component. This PR extracts that metadata into a dedicated `pricingFields.ts` module and re-exports everything from `pricingOverrideSheet.tsx` to preserve backward compatibility for existing importers. ## Changes - Extracted `PRICING_FIELDS`, `REQUEST_TYPE_GROUPS`, `REQUEST_TYPE_OPTIONS`, `getRequestTypeGroup`, `fieldLabelByKey`, `patchKeys`, `PricingFieldKey`, and `FieldErrors` from `pricingOverrideSheet.tsx` into a new `pricingFields.ts` file. - `pricingOverrideSheet.tsx` now re-exports all of the above from `pricingFields.ts`, so no existing import paths break. - `pricingFieldSelector.tsx` updated to import directly from `pricingFields.ts` instead of `pricingOverrideSheet.tsx`. - The motivation is to allow lightweight, read-only consumers to import field labels without incurring the bundle cost of the override sheet's form and mutation logic. ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test ```sh cd ui pnpm i || npm i pnpm build || npm run build ``` Verify that the custom pricing overrides sheet still renders correctly, that field selectors display the correct labels, and that no import errors appear in the build output. ## Breaking changes - [x] No ## Security considerations None. This is a pure code organization change with no behavioral differences. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
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
Pricing field metadata (
PRICING_FIELDS,REQUEST_TYPE_GROUPS, related types and helpers) was previously defined insidepricingOverrideSheet.tsx. This meant any read-only consumer (e.g. a model-catalog detail sheet) that needed field labels would have to pull in the full form/mutation dependencies of that component. This PR extracts that metadata into a dedicatedpricingFields.tsmodule and re-exports everything frompricingOverrideSheet.tsxto preserve backward compatibility for existing importers.Changes
PRICING_FIELDS,REQUEST_TYPE_GROUPS,REQUEST_TYPE_OPTIONS,getRequestTypeGroup,fieldLabelByKey,patchKeys,PricingFieldKey, andFieldErrorsfrompricingOverrideSheet.tsxinto a newpricingFields.tsfile.pricingOverrideSheet.tsxnow re-exports all of the above frompricingFields.ts, so no existing import paths break.pricingFieldSelector.tsxupdated to import directly frompricingFields.tsinstead ofpricingOverrideSheet.tsx.Type of change
Affected areas
How to test
Verify that the custom pricing overrides sheet still renders correctly, that field selectors display the correct labels, and that no import errors appear in the build output.
Breaking changes
Security considerations
None. This is a pure code organization change with no behavioral differences.
Checklist
docs/contributing/README.mdand followed the guidelines