docs: add default provider resolution docs#3069
Conversation
|
|
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughReformats MDX content across four docs and adds a new documentation section "Default Provider Resolution" that describes catalog-driven resolution for bare model names. No code, exported API, or behavioral changes to runtime code are made. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client
participant Gateway as Gateway/Bifrost
participant Catalog as Model Catalog
participant Provider as Provider Service
Client->>Gateway: Request with bare model (e.g., "gpt-4o-mini")
Gateway->>Catalog: GetProvidersForModel(model)
Catalog-->>Gateway: List of providers (or NotFound / Error)
alt providers found
Gateway->>Gateway: Select provider (deterministic/fallback)
Gateway->>Provider: Forward request as "provider/model"
Provider-->>Gateway: Response
Gateway-->>Client: Response
else not found / catalog error
Gateway-->>Client: Error (ask for explicit provider/model)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Confidence Score: 5/5Documentation-only PR, safe to merge with one minor prose fix. All findings are P2 style suggestions; no logic, security, or runtime issues introduced. The only new finding is a comma splice and missing period in one sentence. No files require special attention beyond the minor prose fix in Important Files Changed
Reviews (7): Last reviewed commit: "docs: default provider selection doc upd..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/architecture/framework/model-catalog.mdx`:
- Around line 330-331: The bulleted behavior examples are merged into a single
malformed line; split them into two separate list items so each bullet is its
own line. Locate the merged bullet containing the text with "gpt-4o" and
"openai/gpt-4o" and rewrite it as two bullets: one for the Direct example
("gpt-4o" matches "gpt-4o") and one for the Prefixed example ("openai/gpt-4o"
matches request for "gpt-4o" (prefix stripped)); ensure proper markdown list
formatting with leading "- " for each item.
In `@docs/providers/provider-routing.mdx`:
- Around line 840-848: Update the docs to state that model catalog resolution
runs early in request preparation (before governance, routing rules, and load
balancing) and that the resolved provider/model is passed into those downstream
engines; also change the wording around selection to note that
GetProvidersForModel returns providers from an unsorted map (mc.modelPool) and
that taking providers[0] is non-deterministic unless the implementation sorts or
otherwise stabilizes the order—reference GetProvidersForModel, mc.modelPool, and
the providers[0] selection so readers know the exact code behaviors to consider.
In `@docs/quickstart/gateway/setting-up.mdx`:
- Line 125: Update the link anchor used in the sentence that references the
Model Catalog: change the fragment from
"#default-provider-resolution-model-catalog" to the actual heading slug
"#default-provider-resolution" in the link text "[Model Catalog]" so the URL
becomes /providers/provider-routing#default-provider-resolution; ensure the
visible text and surrounding sentence ("Bifrost will automatically resolve the
provider via the [Model Catalog]") remain unchanged.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5e755a48-b2d0-4f95-a151-1b74076d57f9
📒 Files selected for processing (4)
docs/architecture/framework/model-catalog.mdxdocs/features/telemetry.mdxdocs/providers/provider-routing.mdxdocs/quickstart/gateway/setting-up.mdx
6fb5f20 to
920eba0
Compare
9bebc25 to
3017ffe
Compare
3017ffe to
d058099
Compare
920eba0 to
62a5d4c
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
docs/providers/provider-routing.mdx (1)
839-847:⚠️ Potential issue | 🟡 MinorClarify the ordering statement vs. Step 4 behavior.
Line 839 says resolution happens after all other routing engines, but Line 846 says the resolved model is used for load balancing. Those two claims conflict and should be made consistent.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/providers/provider-routing.mdx` around lines 839 - 847, The doc currently conflicts: it says provider resolution happens "after all other routing engines" but also that the resolved provider/model is used for load balancing; update the wording to make ordering clear by stating that Bifrost runs other routing engines first, and if none resolve the provider it then calls GetProvidersForModel("gpt-4o") and selects a provider; explicitly state that this selection occurs before provider-specific load balancing and fallback handling so Step 4 should read that the resolved "provider/model" is then used for subsequent load-balancing and fallback logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/providers/provider-routing.mdx`:
- Around line 855-867: The new "Default Provider Resolution" example must be
wrapped in Mintlify tab structure: replace the bare bash block with a <Tabs>
containing three <Tab>s titled "Web UI", "API", and "config.json"; put a short
UI note (e.g., that either `gpt-4o` or `openai/gpt-4o` works) in the Web UI tab,
move the existing curl/bash example into the API tab, and add a config.json tab
with a brief note (or a validated config snippet) stating that no extra
config.json entry is required; ensure the config.json content, if present,
conforms to transports/config.schema.json.
---
Duplicate comments:
In `@docs/providers/provider-routing.mdx`:
- Around line 839-847: The doc currently conflicts: it says provider resolution
happens "after all other routing engines" but also that the resolved
provider/model is used for load balancing; update the wording to make ordering
clear by stating that Bifrost runs other routing engines first, and if none
resolve the provider it then calls GetProvidersForModel("gpt-4o") and selects a
provider; explicitly state that this selection occurs before provider-specific
load balancing and fallback handling so Step 4 should read that the resolved
"provider/model" is then used for subsequent load-balancing and fallback logic.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8b71dc62-c6e8-4693-88fc-3c7236458fd0
📒 Files selected for processing (4)
docs/architecture/framework/model-catalog.mdxdocs/features/telemetry.mdxdocs/providers/provider-routing.mdxdocs/quickstart/gateway/setting-up.mdx
✅ Files skipped from review due to trivial changes (2)
- docs/quickstart/gateway/setting-up.mdx
- docs/architecture/framework/model-catalog.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/features/telemetry.mdx
62a5d4c to
c8cc2e4
Compare
d058099 to
8847366
Compare
c8cc2e4 to
da8b364
Compare
8847366 to
63ac49f
Compare
Merge activity
|
da8b364 to
fe670d3
Compare
63ac49f to
f8cb0c4
Compare
The base branch was changed.

Summary
This PR documents the new default provider resolution feature introduced in Bifrost v1.5.0-prerelease7, which allows requests to be made with bare model names (e.g.,
"gpt-4o") instead of requiring the explicitprovider/modelformat. It also applies formatting improvements across several documentation pages for consistency with MDX rendering conventions.Changes
provider-routing.mdxexplaining how Bifrost uses the Model Catalog to automatically resolve a provider when noprovider/prefix is supplied in the model name. This resolution runs after all other routing engines and is surfaced in telemetry as themodel-catalogrouting engine.routing_engines_usedlabel description intelemetry.mdxto include"model-catalog"as a possible value.model-catalog.mdx,telemetry.mdx,provider-routing.mdx, andsetting-up.mdx— including blank lines after headings, reformatted callout blocks (<Info>,<Note>,<Tip>,<Warning>), and aligned markdown tables.Type of change
Affected areas
How to test
Review the rendered documentation pages for:
docs/providers/provider-routing.mdx— confirm the new Default Provider Resolution section appears correctly with the example and notes.docs/features/telemetry.mdx— confirm"model-catalog"appears in therouting_engines_usedlabel description.docs/quickstart/gateway/setting-up.mdx— confirm the note about bare model names and the link to Default Provider Resolution renders correctly.docs/architecture/framework/model-catalog.mdx— confirm formatting renders without layout issues.Breaking changes
Related issues
N/A
Security considerations
None. Documentation-only changes with no impact on auth, secrets, or data handling.
Checklist
docs/contributing/README.mdand followed the guidelines