Skip to content

feat: add Azure passthrough support#2135

Draft
Pratham-Mishra04 wants to merge 1 commit into
v1.5.0from
03-17-feat_add_azure_passthrough
Draft

feat: add Azure passthrough support#2135
Pratham-Mishra04 wants to merge 1 commit into
v1.5.0from
03-17-feat_add_azure_passthrough

Conversation

@Pratham-Mishra04
Copy link
Copy Markdown
Collaborator

Summary

Adds Azure passthrough functionality to enable direct API forwarding to Azure endpoints without transformation, and improves error messaging by removing redundant model information from key selection errors.

Changes

  • Implemented Passthrough and PassthroughStream methods for Azure provider to forward requests directly to Azure's API
  • Added Azure passthrough router with /azure_passthrough endpoint integration
  • Simplified error messages in key selection and routing rule validation by removing model-specific details
  • Added proper authentication, header handling, and streaming support for Azure passthrough requests

Type of change

  • Feature
  • Bug fix

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations

How to test

Test the Azure passthrough functionality:

# Test core functionality
go test ./core/providers/azure/...
go test ./core/...

# Test HTTP transport integration
go test ./transports/bifrost-http/...

# Test passthrough endpoint
curl -X POST http://localhost:8080/azure_passthrough/your-endpoint \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-token" \
  -d '{"your": "request"}'

Verify error message improvements by triggering key selection errors and routing rule conflicts.

Screenshots/Recordings

N/A

Breaking changes

  • Yes
  • No

Related issues

N/A

Security considerations

  • Azure passthrough properly handles authentication headers using existing getAzureAuthHeaders method
  • Safe header filtering prevents sensitive headers from being exposed
  • Request validation ensures proper Azure key configuration before processing

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 17, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 38e74f8c-2e84-4519-ae33-9b46e489a33c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 03-17-feat_add_azure_passthrough
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 03-17-feat_add_azure_passthrough branch from 9218935 to 4005e6b Compare March 17, 2026 17:52
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 03-17-fix_add_support_for_x-bf-mcp-include-clients_and_x-bf-mcp-include-tools_headers_when_using_bifrost_as_mcp_gateway branch 2 times, most recently from 4bce011 to a564d95 Compare March 18, 2026 06:56
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 03-17-feat_add_azure_passthrough branch from 4005e6b to 3535e7c Compare March 18, 2026 06:56
@Pratham-Mishra04 Pratham-Mishra04 changed the base branch from 03-17-fix_add_support_for_x-bf-mcp-include-clients_and_x-bf-mcp-include-tools_headers_when_using_bifrost_as_mcp_gateway to graphite-base/2135 March 18, 2026 07:23
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 03-17-feat_add_azure_passthrough branch from 3535e7c to 1ccc0da Compare March 18, 2026 07:39
@Pratham-Mishra04 Pratham-Mishra04 changed the base branch from graphite-base/2135 to 03-17-fix_add_support_for_x-bf-mcp-include-clients_and_x-bf-mcp-include-tools_headers_when_using_bifrost_as_mcp_gateway March 18, 2026 07:44
@Pratham-Mishra04 Pratham-Mishra04 changed the base branch from 03-17-fix_add_support_for_x-bf-mcp-include-clients_and_x-bf-mcp-include-tools_headers_when_using_bifrost_as_mcp_gateway to graphite-base/2135 March 18, 2026 08:19
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 03-17-feat_add_azure_passthrough branch from 1ccc0da to b9a7e22 Compare March 18, 2026 09:26
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 03-17-feat_add_azure_passthrough branch from b9a7e22 to 1e6ae49 Compare March 18, 2026 11:55
@Pratham-Mishra04 Pratham-Mishra04 changed the base branch from graphite-base/2135 to 03-17-fix_add_support_for_x-bf-mcp-include-clients_and_x-bf-mcp-include-tools_headers_when_using_bifrost_as_mcp_gateway March 18, 2026 11:56
@Pratham-Mishra04 Pratham-Mishra04 changed the base branch from 03-17-fix_add_support_for_x-bf-mcp-include-clients_and_x-bf-mcp-include-tools_headers_when_using_bifrost_as_mcp_gateway to graphite-base/2135 March 18, 2026 12:21
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 03-17-feat_add_azure_passthrough branch from 1e6ae49 to 063666d Compare March 18, 2026 12:30
@graphite-app graphite-app Bot changed the base branch from graphite-base/2135 to v1.5.0 March 18, 2026 12:30
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 03-17-feat_add_azure_passthrough branch from 063666d to 05f721b Compare March 18, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants