Clarify custom provider URL routing docs#28125
Merged
elithrar merged 1 commit intoproductionfrom Feb 17, 2026
Merged
Conversation
Co-authored-by: elithrar <elithrar@users.noreply.github.com>
Contributor
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
Contributor
|
Preview URL: https://c2a2f6ac.preview.developers.cloudflare.com Files with changes (up to 15) |
mchenco
approved these changes
Feb 17, 2026
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.
Here's a summary of the changes made to
src/content/docs/ai-gateway/configuration/custom-providers.mdx:What changed
The "Using custom providers with AI Gateway" section was significantly expanded to address the three gaps identified in the issue:
1. New "How URL routing works" subsection — Explains the core formula (
{base_url} + {provider-path} = upstream URL) and clarifies thatbase_urlshould contain only the root domain, not API path segments.2. New "Choosing between Unified API and provider-specific endpoint" subsection — Adds a comparison table and guidance on when to use each approach. The Unified API works for OpenAI-compatible providers; the provider-specific endpoint is needed when the provider uses non-standard paths or request formats.
3. Four concrete examples with URL mapping tables:
/v1/path (shows both Unified API and provider-specific approaches)/api/coding/paas/v4/) — directly addresses the Z.AI scenario from the issue/serving/models/my-model:predict)base_urlmaps through the gateway4. New "404 when making requests to a custom provider" troubleshooting entry — Addresses the most common mistakes: putting API paths in
base_url, missing path segments in the request URL, and accidentally duplicating path segments like/v1/v1/.Closes #27699
github run