feat: add pricing fields for >2048px and >4096px image output cost overrides - #5854
Conversation
|
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe pricing override type and sheet now support separate output image pricing fields for images above 2048×2048 and 4096×4096 pixels. ChangesImage pricing overrides
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
2e48bc8 to
f4635cf
Compare
d30f090 to
e2b1741
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Merge activity
|
The base branch was changed.
…errides (#5854) ## Summary Adds support for two new image resolution-based pricing tiers — images above 2048×2048 pixels and images above 4096×4096 pixels — to the custom pricing override system. ## Changes - Added `output_cost_per_image_above_2048_and_2048_pixels` and `output_cost_per_image_above_4096_and_4096_pixels` fields to the `PricingOverridePatch` interface in `governance.ts` - Exposed these new fields in the pricing override sheet UI under the "image" group, positioned alongside the existing resolution-based pricing fields ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test Navigate to the custom pricing overrides sheet for an image-capable model and verify that the new "Output / image (>2048px)" and "Output / image (>4096px)" fields appear in the image pricing section and accept numeric cost values. ```sh cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Screenshots/Recordings Verify the two new fields appear between the existing `>1024px` and `low quality` image pricing fields in the override sheet. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations No security implications. These are additive pricing configuration fields with no impact on auth, secrets, or PII. ## 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
…errides (#5854) ## Summary Adds support for two new image resolution-based pricing tiers — images above 2048×2048 pixels and images above 4096×4096 pixels — to the custom pricing override system. ## Changes - Added `output_cost_per_image_above_2048_and_2048_pixels` and `output_cost_per_image_above_4096_and_4096_pixels` fields to the `PricingOverridePatch` interface in `governance.ts` - Exposed these new fields in the pricing override sheet UI under the "image" group, positioned alongside the existing resolution-based pricing fields ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test Navigate to the custom pricing overrides sheet for an image-capable model and verify that the new "Output / image (>2048px)" and "Output / image (>4096px)" fields appear in the image pricing section and accept numeric cost values. ```sh cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Screenshots/Recordings Verify the two new fields appear between the existing `>1024px` and `low quality` image pricing fields in the override sheet. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations No security implications. These are additive pricing configuration fields with no impact on auth, secrets, or PII. ## 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
…errides (maximhq#5854) ## Summary Adds support for two new image resolution-based pricing tiers — images above 2048×2048 pixels and images above 4096×4096 pixels — to the custom pricing override system. ## Changes - Added `output_cost_per_image_above_2048_and_2048_pixels` and `output_cost_per_image_above_4096_and_4096_pixels` fields to the `PricingOverridePatch` interface in `governance.ts` - Exposed these new fields in the pricing override sheet UI under the "image" group, positioned alongside the existing resolution-based pricing fields ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test Navigate to the custom pricing overrides sheet for an image-capable model and verify that the new "Output / image (>2048px)" and "Output / image (>4096px)" fields appear in the image pricing section and accept numeric cost values. ```sh cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Screenshots/Recordings Verify the two new fields appear between the existing `>1024px` and `low quality` image pricing fields in the override sheet. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations No security implications. These are additive pricing configuration fields with no impact on auth, secrets, or PII. ## 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
…errides (maximhq#5854) ## Summary Adds support for two new image resolution-based pricing tiers — images above 2048×2048 pixels and images above 4096×4096 pixels — to the custom pricing override system. ## Changes - Added `output_cost_per_image_above_2048_and_2048_pixels` and `output_cost_per_image_above_4096_and_4096_pixels` fields to the `PricingOverridePatch` interface in `governance.ts` - Exposed these new fields in the pricing override sheet UI under the "image" group, positioned alongside the existing resolution-based pricing fields ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test Navigate to the custom pricing overrides sheet for an image-capable model and verify that the new "Output / image (>2048px)" and "Output / image (>4096px)" fields appear in the image pricing section and accept numeric cost values. ```sh cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Screenshots/Recordings Verify the two new fields appear between the existing `>1024px` and `low quality` image pricing fields in the override sheet. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations No security implications. These are additive pricing configuration fields with no impact on auth, secrets, or PII. ## 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
…errides (maximhq#5854) ## Summary Adds support for two new image resolution-based pricing tiers — images above 2048×2048 pixels and images above 4096×4096 pixels — to the custom pricing override system. ## Changes - Added `output_cost_per_image_above_2048_and_2048_pixels` and `output_cost_per_image_above_4096_and_4096_pixels` fields to the `PricingOverridePatch` interface in `governance.ts` - Exposed these new fields in the pricing override sheet UI under the "image" group, positioned alongside the existing resolution-based pricing fields ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test Navigate to the custom pricing overrides sheet for an image-capable model and verify that the new "Output / image (>2048px)" and "Output / image (>4096px)" fields appear in the image pricing section and accept numeric cost values. ```sh cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Screenshots/Recordings Verify the two new fields appear between the existing `>1024px` and `low quality` image pricing fields in the override sheet. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations No security implications. These are additive pricing configuration fields with no impact on auth, secrets, or PII. ## 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

Summary
Adds support for two new image resolution-based pricing tiers — images above 2048×2048 pixels and images above 4096×4096 pixels — to the custom pricing override system.
Changes
output_cost_per_image_above_2048_and_2048_pixelsandoutput_cost_per_image_above_4096_and_4096_pixelsfields to thePricingOverridePatchinterface ingovernance.tsType of change
Affected areas
How to test
Navigate to the custom pricing overrides sheet for an image-capable model and verify that the new "Output / image (>2048px)" and "Output / image (>4096px)" fields appear in the image pricing section and accept numeric cost values.
Screenshots/Recordings
Verify the two new fields appear between the existing
>1024pxandlow qualityimage pricing fields in the override sheet.Breaking changes
Related issues
Security considerations
No security implications. These are additive pricing configuration fields with no impact on auth, secrets, or PII.
Checklist
docs/contributing/README.mdand followed the guidelines