[Workers AI, AI Gateway] Document unified billing - #32561
Merged
Conversation
Contributor
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
Contributor
ethulia
reviewed
Aug 6, 2026
mchenco
marked this pull request as ready for review
August 6, 2026 01:38
mchenco
requested review from
a team,
aninibread,
hoan-pom,
kathayl,
kflansburg,
mattrothenberg,
palashgo,
rita3ko,
roerohan,
superhighfives and
zeke
as code owners
August 6, 2026 01:38
Contributor
Review
👉 Fix in your agent 👈Fix the following review findings in PR #32561 (https://github.com/cloudflare/cloudflare-docs/pull/32561).
Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order
After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.
The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.
---
## Code Review
### Warnings (2)
#### CR-2d960f7a39f4 · Content contradicts existing Unified Billing docs
- **File:** `src/content/partials/ai-gateway/create-gateway.mdx` line 16
- **Issue:** The added step says Workers AI requests can be billed via **Unified billing**, but `/ai-gateway/features/unified-billing/` currently states: "Workers AI models (models prefixed with `@cf/`) routed through AI Gateway are not charged via Unified Billing... Unified Billing only applies to third-party provider models."
- **Fix:** Reconcile the two pages. If Workers AI now supports Unified Billing, update `/ai-gateway/features/unified-billing/` to remove or qualify the statement that it only applies to third-party models. If Workers AI does not support Unified Billing, do not present it as an option for Workers AI billing here.
#### CR-f2c50ced7414 · REST API example omits required gateway header
- **File:** `src/content/docs/ai-gateway/features/unified-billing.mdx` line 77
- **Issue:** Line 77 instructs users to include the `cf-aig-gateway-id` header for REST API requests, but the curl example in the following REST API subsection does not include it. For Workers AI requests, this header is required to route through AI Gateway and use Unified Billing credits.
- **Fix:** Update the REST API curl example to include `--header "cf-aig-gateway-id: my-gateway"` (or use a `@cf/` Workers AI model in an example that demonstrates the Workers AI flow).
---
## Style Guide Review
### Warnings (1)
#### SG-a7bcf7a62d57 · Directional words
- **File:** `src/content/docs/ai-gateway/usage/rest-api.mdx` line 120
- **Issue:** Line uses `shown above` to refer to a previous example
- **Fix:** Replace `shown above` with a direct reference by name or link, such as `in the cURL example` or `in the example request`.
### Suggestions (1)
#### SG-232fa8063e50 · Serial comma
- **File:** `src/content/docs/ai-gateway/usage/providers/workersai.mdx` line 15
- **Issue:** List `analytics, logging, caching, security, and prepaid billing` is missing the comma before the final `and`.
- **Fix:** Add a comma before `and`: `analytics, logging, caching, security, and prepaid billing` → `analytics, logging, caching, security, and prepaid billing`.
Code ReviewThis code review is in beta and may not always be helpful — use your judgment. Warnings (2)
ConventionsNo convention issues found. Style Guide ReviewWarnings (1)
Suggestions (1)
CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
ethulia
approved these changes
Aug 6, 2026
aninibread
approved these changes
Aug 6, 2026
mchenco
marked this pull request as draft
August 6, 2026 03:44
Contributor
Author
|
DO NOT MERGE |
mchenco
marked this pull request as ready for review
August 6, 2026 21:23
mchenco
marked this pull request as draft
August 6, 2026 21:23
mchenco
force-pushed
the
mchen/wai-unified-rate-limits
branch
from
August 6, 2026 23:49
52e4670 to
117e0b9
Compare
mchenco
marked this pull request as ready for review
August 7, 2026 05:17
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
Documents Workers AI unified billing through AI Gateway, including gateway configuration, AI binding and REST API usage, paid model access, and elevated rate limits for frontier models. Adds a cross-product changelog entry for the update.
Screenshots (optional)
Documentation checklist