chore: adds docs for azure model router - #5175
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds documentation for Azure OpenAI model-router deployments, including Chat Completions support, Responses configuration through Azure AI Foundry, usage examples, limitations, related documentation, and navigation. ChangesAzure Model Router documentation
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)docs/docs.jsonTraceback (most recent call last): Comment |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
287dcab to
c0909f9
Compare
28377e4 to
2be6c55
Compare
2be6c55 to
b467169
Compare
10c6695 to
701b4a5
Compare
b467169 to
b8ed6b8
Compare
44564de to
493bff0
Compare
b8ed6b8 to
0fa6e8a
Compare
Confidence Score: 4/5The raw-response logging guidance needs correction before merging.
docs/providers/supported-providers/azure-model-router.mdx
|
| Filename | Overview |
|---|---|
| docs/docs.json | Adds the new page to the Supported Providers navigation with a matching route. |
| docs/providers/supported-providers/azure-model-router.mdx | Adds the provider guide, but reverses the meaning of the raw-data storage option. |
Reviews (1): Last reviewed commit: "chore: adds docs for azure model router" | Re-trigger Greptile
| ``` | ||
|
|
||
| <Note> | ||
| If you need to inspect provider-specific extra parameters, enable [Send Back Raw Response](/providers/request-options#send-back-raw-response). If you do not want those raw bytes persisted in logs, also set [Store Raw Request/Response](/providers/request-options#store-raw-request/response). |
There was a problem hiding this comment.
Raw Logging Advice Is Reversed
When a user wants to inspect raw responses without persisting them, this note tells them to set Store Raw Request/Response, which enables internal log persistence rather than preventing it. This can store sensitive provider data against the user's intent; the option should remain disabled, and the corrected link should use the generated section fragment.
| If you need to inspect provider-specific extra parameters, enable [Send Back Raw Response](/providers/request-options#send-back-raw-response). If you do not want those raw bytes persisted in logs, also set [Store Raw Request/Response](/providers/request-options#store-raw-request/response). | |
| If you need to inspect provider-specific extra parameters, enable [Send Back Raw Response](/providers/request-options#send-back-raw-response). If you do not want those raw bytes persisted in logs, leave [Store Raw Request/Response](/providers/request-options#store-raw-requestresponse) disabled. |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
docs/providers/supported-providers/azure-model-router.mdx (1)
113-115: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winClarify the independence of the raw-response controls.
Use a
<Warning>block to distinguish returning provider-specific data from persisting raw requests/responses, and state which setting must be disabled to prevent persistence. The current<Note>can imply that enabling one control governs the other.As per path instructions, config-flag independence should be called out explicitly with a Warning.
🤖 Prompt for 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. In `@docs/providers/supported-providers/azure-model-router.mdx` around lines 113 - 115, The raw-response guidance in the Note should explicitly distinguish returning provider-specific data from persisting raw requests/responses. Replace the Note with a Warning that explains these controls are independent and states that Store Raw Request/Response must be disabled to prevent persistence, while retaining the Send Back Raw Response setting for inspecting provider-specific parameters.Source: Path instructions
🤖 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/supported-providers/azure-model-router.mdx`:
- Around line 100-111: Add a Go SDK usage example alongside the existing curl
example in the Usage section, following the repository’s established SDK
conventions and using the same azure-foundry provider, model-router deployment,
Responses endpoint, and input prompt.
- Around line 84-89: Update the request_path_overrides entry in the field table
to mark it as required for the documented Azure Foundry Responses setup, and
clarify that both responses and responses_stream overrides must be provided to
route requests to the Responses endpoint. Leave the other field requirements
unchanged.
- Line 30: Update the Azure AI Foundry documentation to use the
*.services.ai.azure.com/api/projects/<project> hostname throughout the prose, UI
example, and JSON request_path_overrides. In the custom provider example, remove
base_url or explicitly state that the full-URL responses and responses_stream
overrides bypass it.
---
Nitpick comments:
In `@docs/providers/supported-providers/azure-model-router.mdx`:
- Around line 113-115: The raw-response guidance in the Note should explicitly
distinguish returning provider-specific data from persisting raw
requests/responses. Replace the Note with a Warning that explains these controls
are independent and states that Store Raw Request/Response must be disabled to
prevent persistence, while retaining the Send Back Raw Response setting for
inspecting provider-specific parameters.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b4f3473e-7b67-4b57-9543-85dc64c2992e
📒 Files selected for processing (2)
docs/docs.jsondocs/providers/supported-providers/azure-model-router.mdx
|
|
||
| ## Adding Azure Foundry as a custom provider | ||
|
|
||
| Azure AI Foundry projects expose an OpenAI-Responses-API-shaped endpoint (`*.ai.azure.com/api/projects/<project>/openai/v1/responses`) that is distinct from the classic Azure OpenAI resource endpoint (`*.openai.azure.com`) used by the native Azure provider. You can reach it by creating a [custom provider](../custom-providers) named e.g. `azure-foundry` with `base_provider_type: "openai"` and a full-URL [request path override](../custom-providers#request-path-overrides) for the `responses` and `responses_stream` request types. A full URL in `request_path_overrides` bypasses `base_url` entirely, so requests go straight to your Azure AI Foundry project's Responses endpoint. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/sh
set -eu
curl -fsSL 'https://learn.microsoft.com/en-us/rest/api/microsoft-foundry/aiproject' |
grep -F 'services.ai.azure.com/api/projects'Repository: maximhq/bifrost
Length of output: 35769
🏁 Script executed:
#!/bin/sh
set -eu
file='docs/providers/supported-providers/azure-model-router.mdx'
# Show the relevant sections with line numbers.
sed -n '1,180p' "$file" | cat -n
echo
echo '---'
echo 'Occurrences of ai.azure.com / services.ai.azure.com in this file:'
grep -nE 'ai\.azure\.com|services\.ai\.azure\.com|base_url|request_path_overrides|responses_stream|responses' "$file" || trueRepository: maximhq/bifrost
Length of output: 9228
Use the Foundry project hostname
The examples still point at *.ai.azure.com/api/projects/..., but the Foundry project endpoint uses *.services.ai.azure.com/api/projects/<project>. Update the prose, UI example, and JSON overrides, and either remove the base_url example or call out that the full-URL overrides ignore it.
🤖 Prompt for 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.
In `@docs/providers/supported-providers/azure-model-router.mdx` at line 30, Update
the Azure AI Foundry documentation to use the
*.services.ai.azure.com/api/projects/<project> hostname throughout the prose, UI
example, and JSON request_path_overrides. In the custom provider example, remove
base_url or explicitly state that the full-URL responses and responses_stream
overrides bypass it.
| | Field | Type | Required | Description | | ||
| |-------|------|----------|-------------| | ||
| | `custom_provider_config.base_provider_type` | string | Yes | Must be `openai` so requests are shaped as OpenAI-compatible calls | | ||
| | `custom_provider_config.allowed_requests` | object | No | Restricts this provider to only the request types you enable | | ||
| | `custom_provider_config.request_path_overrides` | object | No | Full URL per request type; bypasses `network_config.base_url` | | ||
| | `network_config.base_url` | string | No | Used for any request type without a full-URL override | |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Mark the Responses override as required for this setup.
request_path_overrides is documented as optional, but the page states that the full override is what routes requests to the Azure Foundry Responses endpoint. Without the responses and responses_stream overrides, this workaround has no documented path to that endpoint.
As per path instructions, the field table should make required fields explicit for the documented scenario.
🤖 Prompt for 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.
In `@docs/providers/supported-providers/azure-model-router.mdx` around lines 84 -
89, Update the request_path_overrides entry in the field table to mark it as
required for the documented Azure Foundry Responses setup, and clarify that both
responses and responses_stream overrides must be provided to route requests to
the Responses endpoint. Leave the other field requirements unchanged.
Source: Path instructions
| ## Usage | ||
|
|
||
| Call the Responses endpoint using the `azure-foundry` custom provider and your model-router deployment name: | ||
|
|
||
| ```bash | ||
| curl -X POST http://localhost:8080/v1/responses \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "model": "azure-foundry/model-router", | ||
| "input": "Write a short haiku about gateways." | ||
| }' | ||
| ``` |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add the promised Go SDK example.
The PR objectives call for REST and Go SDK usage examples, but this section only documents curl. Add a Go SDK example using the repository’s established SDK conventions.
🤖 Prompt for 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.
In `@docs/providers/supported-providers/azure-model-router.mdx` around lines 100 -
111, Add a Go SDK usage example alongside the existing curl example in the Usage
section, following the repository’s established SDK conventions and using the
same azure-foundry provider, model-router deployment, Responses endpoint, and
input prompt.
Merge activity
|
* chore: fix migration tests * framework test fixes (#5421) * chore: adds docs for azure model router (#5175) ## Summary Adds a dedicated documentation page for the Azure Model Router provider, explaining how Bifrost automatically falls back to Chat Completions when a model-router deployment is targeted via the Responses API. ## Changes - Added `docs/providers/supported-providers/azure-model-router.mdx` documenting the Azure model-router routing behavior, supported operations, a Mermaid flowchart illustrating the fallback logic, usage examples (REST and Go SDK), and known limitations. - Registered the new page in `docs/docs.json` so it appears in the navigation between the Azure and Bedrock entries. ## 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 Navigate to the Azure Model Router page in the rendered docs and verify: - The page appears in the sidebar between Azure and Bedrock. - The Mermaid flowchart renders correctly. - All code examples and notes display as expected. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. This is a documentation-only change with no impact on auth, secrets, or runtime behavior. ## 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 * fix: adds created timestamp for openai text completions (#5407) ## Summary Adds the missing `created` field to `BifrostTextCompletionResponse` to align with the OpenAI text completion response schema, and modernizes the `ExtraParams` type alias from `map[string]interface{}` to the equivalent `map[string]any`. ## Changes - Added `Created int` field with `omitempty` to `BifrostTextCompletionResponse`, representing the Unix timestamp (in seconds) of when the completion was created — this field was previously absent from the struct despite being part of the API response. - Replaced `map[string]interface{}` with `map[string]any` in `TextCompletionParameters.ExtraParams` to use the modern Go type alias. ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test ```sh go version go test ./... ``` Verify that text completion responses now include the `created` timestamp field when it is non-zero. ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations None. ## Checklist - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [x] I verified builds succeed (Go and UI) - [x] I verified the CI pipeline passes locally if applicable --------- Co-authored-by: Samyabrata Maji <116789799+sammaji@users.noreply.github.com> Co-authored-by: Samyabrata Maji <samyabratamaji334@gmail.com>
## Summary Adds a dedicated documentation page for the Azure Model Router provider, explaining how Bifrost automatically falls back to Chat Completions when a model-router deployment is targeted via the Responses API. ## Changes - Added `docs/providers/supported-providers/azure-model-router.mdx` documenting the Azure model-router routing behavior, supported operations, a Mermaid flowchart illustrating the fallback logic, usage examples (REST and Go SDK), and known limitations. - Registered the new page in `docs/docs.json` so it appears in the navigation between the Azure and Bedrock entries. ## 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 Navigate to the Azure Model Router page in the rendered docs and verify: - The page appears in the sidebar between Azure and Bedrock. - The Mermaid flowchart renders correctly. - All code examples and notes display as expected. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. This is a documentation-only change with no impact on auth, secrets, or runtime behavior. ## 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
* chore: fix migration tests * framework test fixes (maximhq#5421) * chore: adds docs for azure model router (maximhq#5175) ## Summary Adds a dedicated documentation page for the Azure Model Router provider, explaining how Bifrost automatically falls back to Chat Completions when a model-router deployment is targeted via the Responses API. ## Changes - Added `docs/providers/supported-providers/azure-model-router.mdx` documenting the Azure model-router routing behavior, supported operations, a Mermaid flowchart illustrating the fallback logic, usage examples (REST and Go SDK), and known limitations. - Registered the new page in `docs/docs.json` so it appears in the navigation between the Azure and Bedrock entries. ## 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 Navigate to the Azure Model Router page in the rendered docs and verify: - The page appears in the sidebar between Azure and Bedrock. - The Mermaid flowchart renders correctly. - All code examples and notes display as expected. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. This is a documentation-only change with no impact on auth, secrets, or runtime behavior. ## 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 * fix: adds created timestamp for openai text completions (maximhq#5407) ## Summary Adds the missing `created` field to `BifrostTextCompletionResponse` to align with the OpenAI text completion response schema, and modernizes the `ExtraParams` type alias from `map[string]interface{}` to the equivalent `map[string]any`. ## Changes - Added `Created int` field with `omitempty` to `BifrostTextCompletionResponse`, representing the Unix timestamp (in seconds) of when the completion was created — this field was previously absent from the struct despite being part of the API response. - Replaced `map[string]interface{}` with `map[string]any` in `TextCompletionParameters.ExtraParams` to use the modern Go type alias. ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test ```sh go version go test ./... ``` Verify that text completion responses now include the `created` timestamp field when it is non-zero. ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations None. ## Checklist - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [x] I verified builds succeed (Go and UI) - [x] I verified the CI pipeline passes locally if applicable --------- Co-authored-by: Samyabrata Maji <116789799+sammaji@users.noreply.github.com> Co-authored-by: Samyabrata Maji <samyabratamaji334@gmail.com>
## Summary Adds a dedicated documentation page for the Azure Model Router provider, explaining how Bifrost automatically falls back to Chat Completions when a model-router deployment is targeted via the Responses API. ## Changes - Added `docs/providers/supported-providers/azure-model-router.mdx` documenting the Azure model-router routing behavior, supported operations, a Mermaid flowchart illustrating the fallback logic, usage examples (REST and Go SDK), and known limitations. - Registered the new page in `docs/docs.json` so it appears in the navigation between the Azure and Bedrock entries. ## 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 Navigate to the Azure Model Router page in the rendered docs and verify: - The page appears in the sidebar between Azure and Bedrock. - The Mermaid flowchart renders correctly. - All code examples and notes display as expected. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. This is a documentation-only change with no impact on auth, secrets, or runtime behavior. ## 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
* chore: fix migration tests * framework test fixes (maximhq#5421) * chore: adds docs for azure model router (maximhq#5175) ## Summary Adds a dedicated documentation page for the Azure Model Router provider, explaining how Bifrost automatically falls back to Chat Completions when a model-router deployment is targeted via the Responses API. ## Changes - Added `docs/providers/supported-providers/azure-model-router.mdx` documenting the Azure model-router routing behavior, supported operations, a Mermaid flowchart illustrating the fallback logic, usage examples (REST and Go SDK), and known limitations. - Registered the new page in `docs/docs.json` so it appears in the navigation between the Azure and Bedrock entries. ## 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 Navigate to the Azure Model Router page in the rendered docs and verify: - The page appears in the sidebar between Azure and Bedrock. - The Mermaid flowchart renders correctly. - All code examples and notes display as expected. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. This is a documentation-only change with no impact on auth, secrets, or runtime behavior. ## 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 * fix: adds created timestamp for openai text completions (maximhq#5407) ## Summary Adds the missing `created` field to `BifrostTextCompletionResponse` to align with the OpenAI text completion response schema, and modernizes the `ExtraParams` type alias from `map[string]interface{}` to the equivalent `map[string]any`. ## Changes - Added `Created int` field with `omitempty` to `BifrostTextCompletionResponse`, representing the Unix timestamp (in seconds) of when the completion was created — this field was previously absent from the struct despite being part of the API response. - Replaced `map[string]interface{}` with `map[string]any` in `TextCompletionParameters.ExtraParams` to use the modern Go type alias. ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test ```sh go version go test ./... ``` Verify that text completion responses now include the `created` timestamp field when it is non-zero. ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations None. ## Checklist - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [x] I verified builds succeed (Go and UI) - [x] I verified the CI pipeline passes locally if applicable --------- Co-authored-by: Samyabrata Maji <116789799+sammaji@users.noreply.github.com> Co-authored-by: Samyabrata Maji <samyabratamaji334@gmail.com>

Summary
Adds a dedicated documentation page for the Azure Model Router provider, explaining how Bifrost automatically falls back to Chat Completions when a model-router deployment is targeted via the Responses API.
Changes
docs/providers/supported-providers/azure-model-router.mdxdocumenting the Azure model-router routing behavior, supported operations, a Mermaid flowchart illustrating the fallback logic, usage examples (REST and Go SDK), and known limitations.docs/docs.jsonso it appears in the navigation between the Azure and Bedrock entries.Type of change
Affected areas
How to test
Navigate to the Azure Model Router page in the rendered docs and verify:
Breaking changes
Related issues
Security considerations
None. This is a documentation-only change with no impact on auth, secrets, or runtime behavior.
Checklist
docs/contributing/README.mdand followed the guidelines