Skip to content

feat: add pricing fields for >2048px and >4096px image output cost overrides - #5854

Merged
akshaydeo merged 3 commits into
devfrom
08-04-fix_add_missing_2048_4096px_image_pricing_fields_to_pricing_override_ui
Aug 5, 2026
Merged

akshaydeo merged 3 commits into
devfrom
08-04-fix_add_missing_2048_4096px_image_pricing_fields_to_pricing_override_ui

Conversation

@Pratham-Mishra04

Copy link
Copy Markdown
Collaborator

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
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • 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.

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
  • 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

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Pratham-Mishra04 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added pricing override fields for output images larger than 2048×2048 and 4096×4096 pixels.
    • Administrators can now configure separate per-image costs for these higher-resolution outputs.

Walkthrough

The pricing override type and sheet now support separate output image pricing fields for images above 2048×2048 and 4096×4096 pixels.

Changes

Image pricing overrides

Layer / File(s) Summary
High-resolution output image pricing fields
ui/lib/types/governance.ts, ui/app/workspace/custom-pricing/overrides/pricingOverrideSheet.tsx
Added optional pricing fields for output images above 2048×2048 and 4096×4096 pixels. The type and pricing sheet use these fields.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • maximhq/bifrost#4277: Adds related pricing override fields for image and per-query cost configuration.

Suggested reviewers: impoiler, roroghost17

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely summarizes the addition of image pricing override fields for outputs above 2048px and 4096px.
Description check ✅ Passed The description covers the purpose, changes, type, affected area, testing steps, breaking changes, and security considerations; optional evidence sections remain incomplete.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 08-04-fix_add_missing_2048_4096px_image_pricing_fields_to_pricing_override_ui

Comment @coderabbitai help to get the list of available commands.

@coderabbitai
coderabbitai Bot requested review from impoiler and roroghost17 August 5, 2026 02:49
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 5, 2026
@Pratham-Mishra04
Pratham-Mishra04 force-pushed the 08-04-fix_add_missing_2048_4096px_image_pricing_fields_to_pricing_override_ui branch from 2e48bc8 to f4635cf Compare August 5, 2026 04:07
@Pratham-Mishra04
Pratham-Mishra04 force-pushed the 08-04-fix_sync_custom-pricing_docs_with_backend branch from d30f090 to e2b1741 Compare August 5, 2026 04:07
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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.

akshaydeo commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • Aug 5, 4:41 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Aug 5, 4:44 AM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo
akshaydeo changed the base branch from 08-04-fix_sync_custom-pricing_docs_with_backend to graphite-base/5854 August 5, 2026 04:43
@akshaydeo
akshaydeo changed the base branch from graphite-base/5854 to dev August 5, 2026 04:44
@akshaydeo
akshaydeo dismissed coderabbitai[bot]’s stale review August 5, 2026 04:44

The base branch was changed.

@akshaydeo
akshaydeo merged commit b0713ae into dev Aug 5, 2026
10 of 11 checks passed
@akshaydeo
akshaydeo deleted the 08-04-fix_add_missing_2048_4096px_image_pricing_fields_to_pricing_override_ui branch August 5, 2026 04:44
akshaydeo pushed a commit that referenced this pull request Aug 5, 2026
…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
akshaydeo pushed a commit that referenced this pull request Aug 7, 2026
…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
atharvamhaske pushed a commit to atharvamhaske/bifrost that referenced this pull request Aug 13, 2026
…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
akhsaul pushed a commit to akhsaul/bifrost that referenced this pull request Aug 27, 2026
…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
occcat pushed a commit to occcat/bifrost that referenced this pull request Sep 2, 2026
…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
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.

3 participants