Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for extra_headers/extra_body in relay mode#5119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
virajmehta merged 8 commits intomainfromaaron/relay-extra-body-headers
Dec 16, 2025

Conversation

@Aaron1011
Copy link
Member

@Aaron1011Aaron1011 commentedDec 10, 2025
edited by ellipsis-devbot
Loading

The relay gateway now forwards these options to the downstream gateway (after performing variant-level filtering on the relay gateway).


Important

Add support for forwardingextra_headers andextra_body in relay mode to downstream gateway.

  • Behavior:
    • Relay gateway now forwardsextra_headers andextra_body to downstream gateway after variant-level filtering.
    • Skips model/provider filter validation on relay gateway; downstream gateway handles it.
  • Functions:
    • Addsprepare_relay_extra_body() andprepare_relay_extra_headers() inextra_body.rs to handle relay-specific logic.
    • Updatesvalidate_inference_filters() inextra_stuff.rs to skip validation in relay mode.
  • Tests:
    • Adds tests inrelay_extra_body.rs to verify forwarding ofextra_headers andextra_body.
    • Refactors existing tests to use new relay logic inrelay_basic.rs andcommon/relay.rs.

This description was created byEllipsis for1e39dd3. You cancustomize this summary. It will automatically update as commits are pushed.

ellipsis-dev[bot] reacted with rocket emoji
The relay gateway now forwards these options to the downstreamgateway (after performing variant-level filtering on the relaygateway).
CopilotAI review requested due to automatic review settingsDecember 10, 2025 20:47
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull request overview

This PR implements support for forwardingextra_body andextra_headers parameters in relay mode. Previously, these options were not forwarded to the downstream gateway. The implementation ensures that variant-level filtering is performed on the relay gateway before forwarding, while model/provider-level filtering is deferred to the downstream gateway where the actual model invocations occur.

Key Changes:

  • Relay gateway now forwards extra_body/extra_headers to downstream gateway with appropriate transformations
  • Validation logic updated to skip model/provider filter validation in relay mode
  • Comprehensive test suite added covering various forwarding scenarios

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
FileDescription
tensorzero-core/src/relay.rsIntegrates new preparation functions for extra_body and extra_headers forwarding
tensorzero-core/src/inference/types/extra_body.rsAddsprepare_relay_extra_body andprepare_relay_extra_headers functions to transform and forward options appropriately
tensorzero-core/src/inference/types/extra_stuff.rsUpdates validation to skip model/provider filter checks in relay mode
tensorzero-core/src/endpoints/inference.rsPasses relay configuration to validation functions
gateway/tests/relay_extra_body.rsComprehensive test suite covering config-level, inference-level, variant-level forwarding and edge cases
gateway/tests/relay_basic.rsRefactored to use shared relay test utilities from common module
gateway/tests/common/relay.rsNew shared module with relay test environment setup helpers
gateway/tests/common/mod.rsRegisters new relay submodule
Comments suppressed due to low confidence (1)

gateway/tests/relay_basic.rs:24

  • Malformed comment separator - contains extra spaces and equal signs in the wrong pattern

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settingsDecember 10, 2025 20:53
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

gateway/tests/relay_basic.rs:24

  • The comment separator line has irregular spacing with extra spaces between the equals signs. This should be corrected to match the consistent formatting used in the rest of the file.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settingsDecember 10, 2025 20:58
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

gateway/tests/relay_basic.rs:24

  • The comment separator line is malformed with extra equals signs in the middle. It should be a consistent line of equals signs.

Copy link
Member

@virajmehtavirajmehta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Generally LGTM, a few small requests for unit tests. Thanks!

CopilotAI review requested due to automatic review settingsDecember 11, 2025 15:49
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

gateway/tests/relay_basic.rs:24

  • The comment delimiter is malformed with extra spaces:// =========== =================================================================. This should be a single continuous line of equals signs.

Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

CopilotAI review requested due to automatic review settingsDecember 15, 2025 19:49
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@virajmehtavirajmehta added this pull request to themerge queueDec 15, 2025
@virajmehtavirajmehta removed this pull request from themerge queue due to the queue being clearedDec 16, 2025
@virajmehtavirajmehta added this pull request to themerge queueDec 16, 2025
Merged via the queue intomain with commit7e4ebacDec 16, 2025
54 checks passed
@virajmehtavirajmehta deleted the aaron/relay-extra-body-headers branchDecember 16, 2025 04:03
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@virajmehtavirajmehtavirajmehta approved these changes

Assignees

@virajmehtavirajmehta

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@Aaron1011@virajmehta

[8]ページ先頭

©2009-2025 Movatter.jp