docs: add user scopes, fast-mode costs, OCR fields, and pagination to custom pricing docs - #5853
Conversation
|
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe custom pricing documentation adds user-scoped override rules, updates pricing API behavior, expands list API parameters, and documents additional token, image, cache, inference-region, and OCR pricing fields. ChangesCustom pricing documentation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/providers/custom-pricing.mdx`:
- Around line 211-212: Update the custom pricing update semantics documentation
to explicitly state that supplying scope_kind resets all scope identifiers and
retains only identifiers included in that request, while preserving the existing
merge behavior for other omitted fields and full replacement behavior for patch.
- Line 403: Update the introductory pricing-field description near the
`inference_geo_us_multiplier` entry to distinguish USD-denominated cost fields
from dimensionless multiplier fields. Preserve the existing explanation of
`inference_geo_us_multiplier` as a factor applied to token and cache costs.
- Around line 375-379: Remove the premium-image pricing rows from the custom
pricing documentation until billing supports them. Keep only rate fields
currently consumed by computeImageOutputCost and represented by ImageUsage,
without documenting inactive premium fields.
- Around line 376-379: Update the image-size descriptions for the
output_cost_per_image_above_512_and_512_pixels,
output_cost_per_image_above_1024_and_1024_pixels, and corresponding premium
tiers to say “at or above” the stated dimensions, reflecting inclusive threshold
matching.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 368d4968-cb0c-4ef6-a207-bcabca1f00c4
📒 Files selected for processing (1)
docs/providers/custom-pricing.mdx
d30f090 to
e2b1741
Compare
3a549b0 to
4f19c15
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.
… custom pricing docs (#5853) ## Summary Expands the custom pricing documentation to cover new user-scoped overrides, additional pricing fields (fast-mode, OCR, premium images, extended cache creation/read tiers), and updated API behavior including paginated list responses and a corrected `PUT` verb for updates. ## Changes - Added three new scope kinds — `user`, `user_provider`, and `user_provider_key` — to the scope hierarchy, table, and field reference, positioned between the virtual-key family and the provider/global scopes - Clarified scope resolution order: virtual-key family is checked before user family, which is checked before provider/global scopes - Updated the `scope_kind` enum in the config field reference to include all `user*` variants and added the `user_id` conditional field - Corrected the update endpoint verb from `PATCH` to `PUT` and added a note that omitted fields are merged from the existing record - Added pagination support to the list endpoint (`limit`, `offset`, `search` query params) with documentation of the paginated response shape and all supported query filters - Added new pricing patch fields: `input_cost_per_token_fast`, `output_cost_per_token_fast`, and their cache counterparts (`cache_creation_input_token_cost_fast`, `cache_read_input_token_cost_fast`, `cache_creation_input_token_cost_above_1hr_fast`) - Added extended cache creation/read tier fields for flex and 272k+ context windows, 1hr+ TTL entries, and 200k+ context with 1hr+ TTL - Added premium image output cost fields and per-resolution premium image variants - Added `input_cost_per_image_above_128k_tokens` for image input above 128k context - Added `inference_geo_us_multiplier` for data-residency cost multipliers - Added a new OCR costs section covering `ocr_cost_per_page` and `annotation_cost_per_page` ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Review the rendered documentation to confirm: - The scope hierarchy diagram and table include all three `user*` scope kinds in the correct position - The update example uses `PUT` and includes the merge-patch note - The list example shows the paginated query and documents all supported filters - All new pricing fields appear in their respective sections with accurate descriptions ## Breaking changes - [ ] Yes - [x] No ## Security considerations None. This is a documentation-only change. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
… custom pricing docs (#5853) ## Summary Expands the custom pricing documentation to cover new user-scoped overrides, additional pricing fields (fast-mode, OCR, premium images, extended cache creation/read tiers), and updated API behavior including paginated list responses and a corrected `PUT` verb for updates. ## Changes - Added three new scope kinds — `user`, `user_provider`, and `user_provider_key` — to the scope hierarchy, table, and field reference, positioned between the virtual-key family and the provider/global scopes - Clarified scope resolution order: virtual-key family is checked before user family, which is checked before provider/global scopes - Updated the `scope_kind` enum in the config field reference to include all `user*` variants and added the `user_id` conditional field - Corrected the update endpoint verb from `PATCH` to `PUT` and added a note that omitted fields are merged from the existing record - Added pagination support to the list endpoint (`limit`, `offset`, `search` query params) with documentation of the paginated response shape and all supported query filters - Added new pricing patch fields: `input_cost_per_token_fast`, `output_cost_per_token_fast`, and their cache counterparts (`cache_creation_input_token_cost_fast`, `cache_read_input_token_cost_fast`, `cache_creation_input_token_cost_above_1hr_fast`) - Added extended cache creation/read tier fields for flex and 272k+ context windows, 1hr+ TTL entries, and 200k+ context with 1hr+ TTL - Added premium image output cost fields and per-resolution premium image variants - Added `input_cost_per_image_above_128k_tokens` for image input above 128k context - Added `inference_geo_us_multiplier` for data-residency cost multipliers - Added a new OCR costs section covering `ocr_cost_per_page` and `annotation_cost_per_page` ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Review the rendered documentation to confirm: - The scope hierarchy diagram and table include all three `user*` scope kinds in the correct position - The update example uses `PUT` and includes the merge-patch note - The list example shows the paginated query and documents all supported filters - All new pricing fields appear in their respective sections with accurate descriptions ## Breaking changes - [ ] Yes - [x] No ## Security considerations None. This is a documentation-only change. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
… custom pricing docs (maximhq#5853) ## Summary Expands the custom pricing documentation to cover new user-scoped overrides, additional pricing fields (fast-mode, OCR, premium images, extended cache creation/read tiers), and updated API behavior including paginated list responses and a corrected `PUT` verb for updates. ## Changes - Added three new scope kinds — `user`, `user_provider`, and `user_provider_key` — to the scope hierarchy, table, and field reference, positioned between the virtual-key family and the provider/global scopes - Clarified scope resolution order: virtual-key family is checked before user family, which is checked before provider/global scopes - Updated the `scope_kind` enum in the config field reference to include all `user*` variants and added the `user_id` conditional field - Corrected the update endpoint verb from `PATCH` to `PUT` and added a note that omitted fields are merged from the existing record - Added pagination support to the list endpoint (`limit`, `offset`, `search` query params) with documentation of the paginated response shape and all supported query filters - Added new pricing patch fields: `input_cost_per_token_fast`, `output_cost_per_token_fast`, and their cache counterparts (`cache_creation_input_token_cost_fast`, `cache_read_input_token_cost_fast`, `cache_creation_input_token_cost_above_1hr_fast`) - Added extended cache creation/read tier fields for flex and 272k+ context windows, 1hr+ TTL entries, and 200k+ context with 1hr+ TTL - Added premium image output cost fields and per-resolution premium image variants - Added `input_cost_per_image_above_128k_tokens` for image input above 128k context - Added `inference_geo_us_multiplier` for data-residency cost multipliers - Added a new OCR costs section covering `ocr_cost_per_page` and `annotation_cost_per_page` ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Review the rendered documentation to confirm: - The scope hierarchy diagram and table include all three `user*` scope kinds in the correct position - The update example uses `PUT` and includes the merge-patch note - The list example shows the paginated query and documents all supported filters - All new pricing fields appear in their respective sections with accurate descriptions ## Breaking changes - [ ] Yes - [x] No ## Security considerations None. This is a documentation-only change. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
… custom pricing docs (maximhq#5853) ## Summary Expands the custom pricing documentation to cover new user-scoped overrides, additional pricing fields (fast-mode, OCR, premium images, extended cache creation/read tiers), and updated API behavior including paginated list responses and a corrected `PUT` verb for updates. ## Changes - Added three new scope kinds — `user`, `user_provider`, and `user_provider_key` — to the scope hierarchy, table, and field reference, positioned between the virtual-key family and the provider/global scopes - Clarified scope resolution order: virtual-key family is checked before user family, which is checked before provider/global scopes - Updated the `scope_kind` enum in the config field reference to include all `user*` variants and added the `user_id` conditional field - Corrected the update endpoint verb from `PATCH` to `PUT` and added a note that omitted fields are merged from the existing record - Added pagination support to the list endpoint (`limit`, `offset`, `search` query params) with documentation of the paginated response shape and all supported query filters - Added new pricing patch fields: `input_cost_per_token_fast`, `output_cost_per_token_fast`, and their cache counterparts (`cache_creation_input_token_cost_fast`, `cache_read_input_token_cost_fast`, `cache_creation_input_token_cost_above_1hr_fast`) - Added extended cache creation/read tier fields for flex and 272k+ context windows, 1hr+ TTL entries, and 200k+ context with 1hr+ TTL - Added premium image output cost fields and per-resolution premium image variants - Added `input_cost_per_image_above_128k_tokens` for image input above 128k context - Added `inference_geo_us_multiplier` for data-residency cost multipliers - Added a new OCR costs section covering `ocr_cost_per_page` and `annotation_cost_per_page` ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Review the rendered documentation to confirm: - The scope hierarchy diagram and table include all three `user*` scope kinds in the correct position - The update example uses `PUT` and includes the merge-patch note - The list example shows the paginated query and documents all supported filters - All new pricing fields appear in their respective sections with accurate descriptions ## Breaking changes - [ ] Yes - [x] No ## Security considerations None. This is a documentation-only change. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
… custom pricing docs (maximhq#5853) ## Summary Expands the custom pricing documentation to cover new user-scoped overrides, additional pricing fields (fast-mode, OCR, premium images, extended cache creation/read tiers), and updated API behavior including paginated list responses and a corrected `PUT` verb for updates. ## Changes - Added three new scope kinds — `user`, `user_provider`, and `user_provider_key` — to the scope hierarchy, table, and field reference, positioned between the virtual-key family and the provider/global scopes - Clarified scope resolution order: virtual-key family is checked before user family, which is checked before provider/global scopes - Updated the `scope_kind` enum in the config field reference to include all `user*` variants and added the `user_id` conditional field - Corrected the update endpoint verb from `PATCH` to `PUT` and added a note that omitted fields are merged from the existing record - Added pagination support to the list endpoint (`limit`, `offset`, `search` query params) with documentation of the paginated response shape and all supported query filters - Added new pricing patch fields: `input_cost_per_token_fast`, `output_cost_per_token_fast`, and their cache counterparts (`cache_creation_input_token_cost_fast`, `cache_read_input_token_cost_fast`, `cache_creation_input_token_cost_above_1hr_fast`) - Added extended cache creation/read tier fields for flex and 272k+ context windows, 1hr+ TTL entries, and 200k+ context with 1hr+ TTL - Added premium image output cost fields and per-resolution premium image variants - Added `input_cost_per_image_above_128k_tokens` for image input above 128k context - Added `inference_geo_us_multiplier` for data-residency cost multipliers - Added a new OCR costs section covering `ocr_cost_per_page` and `annotation_cost_per_page` ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Review the rendered documentation to confirm: - The scope hierarchy diagram and table include all three `user*` scope kinds in the correct position - The update example uses `PUT` and includes the merge-patch note - The list example shows the paginated query and documents all supported filters - All new pricing fields appear in their respective sections with accurate descriptions ## Breaking changes - [ ] Yes - [x] No ## Security considerations None. This is a documentation-only change. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable

Summary
Expands the custom pricing documentation to cover new user-scoped overrides, additional pricing fields (fast-mode, OCR, premium images, extended cache creation/read tiers), and updated API behavior including paginated list responses and a corrected
PUTverb for updates.Changes
user,user_provider, anduser_provider_key— to the scope hierarchy, table, and field reference, positioned between the virtual-key family and the provider/global scopesscope_kindenum in the config field reference to include alluser*variants and added theuser_idconditional fieldPATCHtoPUTand added a note that omitted fields are merged from the existing recordlimit,offset,searchquery params) with documentation of the paginated response shape and all supported query filtersinput_cost_per_token_fast,output_cost_per_token_fast, and their cache counterparts (cache_creation_input_token_cost_fast,cache_read_input_token_cost_fast,cache_creation_input_token_cost_above_1hr_fast)input_cost_per_image_above_128k_tokensfor image input above 128k contextinference_geo_us_multiplierfor data-residency cost multipliersocr_cost_per_pageandannotation_cost_per_pageType of change
Affected areas
How to test
Review the rendered documentation to confirm:
user*scope kinds in the correct positionPUTand includes the merge-patch noteBreaking changes
Security considerations
None. This is a documentation-only change.
Checklist
docs/contributing/README.mdand followed the guidelines