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

Skip credential validation for disabled providers in relay mode#5283

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

Open
Aaron1011 wants to merge5 commits intomain
base:main
Choose a base branch
Loading
fromaaron/skip-relay-cred

Conversation

@Aaron1011
Copy link
Member

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

By default, all model providers have credential validation skipped when the gateway is running in relay mode (since they will not be used). We still run credential validation for providers that are children of a 'skip_relay' model

Fixes#5277


Important

Skip credential validation for model providers in relay mode, except for 'skip_relay' models, with tests added for validation behavior.

  • Behavior:
    • Skip credential validation for model providers in relay mode, except for 'skip_relay' models, inUninitializedModelConfig::load() inmodel.rs.
    • Addwith_skip_credential_validation() function inconfig/mod.rs to manage credential validation state.
  • Tests:
    • Addrelay_credential_validation.rs to test credential validation behavior in relay mode.
    • Addtest_nested_skip_credential_validation() inconfig/tests.rs to test nested credential validation skipping.
  • Misc:
    • Updateload_credential() inmodel_table.rs to usee2e_skip_credential_validation() for logging warnings during tests.
    • ModifyAzureProvider andGCPVertexAnthropicProvider to usewith_skip_credential_validation() for credential loading inazure.rs andgcp_vertex_anthropic.rs.

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

ellipsis-dev[bot] reacted with rocket emoji
By default, all model providers have credential validation skippedwhen the gateway is running in relay mode (since they will not be used).We still run credential validation for providers that are childrenof a 'skip_relay' model
CopilotAI review requested due to automatic review settingsDecember 18, 2025 21: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

This PR implements conditional credential validation for model providers based on relay mode configuration. When the gateway runs in relay mode, credential validation is skipped for model providers that won't be used (since requests are forwarded to the downstream gateway), but validation is still performed for providers used by models marked withskip_relay=true.

Key changes:

  • Introducedrelay_mode parameter to model loading logic to conditionally skip credential validation
  • Addedwith_skip_credential_validation helper function to wrap async futures with skipped validation
  • Separated e2e test credential validation behavior from general credential validation logic viae2e_skip_credential_validation

Reviewed changes

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

Show a summary per file
FileDescription
tensorzero-core/src/model.rsAdds relay_mode parameter to model loading and conditionally wraps provider config loading with skip credential validation for relay models
tensorzero-core/src/config/mod.rsIntroduceswith_skip_credential_validation async helper ande2e_skip_credential_validation function; changes SKIP_CREDENTIAL_VALIDATION to private; updates config loading to use new helpers
tensorzero-core/src/model_table.rsRefactors credential loading to usee2e_skip_credential_validation for conditional warning logs instead of cfg guards
tensorzero-core/src/providers/gcp_vertex_anthropic.rsUpdates GCP error handling to usee2e_skip_credential_validation for conditional warnings
tensorzero-core/src/providers/azure.rsRefactors tests to use newwith_skip_credential_validation helper instead of direct task_local scope
tensorzero-core/src/config/tests.rsAdds test for nestedwith_skip_credential_validation calls to verify proper scope handling
gateway/tests/relay_credential_validation.rsAdds comprehensive e2e tests for relay mode credential validation behavior including skip_relay models
tensorzero-optimizers/tests/common/mod.rsUpdates model config loading call to passrelay_mode=false parameter

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settingsDecember 18, 2025 22:00
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.

CopilotAI review requested due to automatic review settingsDecember 18, 2025 22:27
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 2 comments.

@virajmehtavirajmehta added this pull request to themerge queueDec 18, 2025
@github-merge-queuegithub-merge-queuebot removed this pull request from themerge queue due to failed status checksDec 18, 2025
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.

Gateway should not validate credentials for model providers unlessskip_relay = true

3 participants

@Aaron1011@virajmehta

[8]ページ先頭

©2009-2025 Movatter.jp