Skip to content

fix(delegation): keep credential pools endpoint-coherent - #2

Open
oferlaor wants to merge 10000 commits into
Waritboo:fix/delegation-runtime-pool-coherence-prfrom
oferlaor:fix/pr39862-endpoint-coherence
Open

fix(delegation): keep credential pools endpoint-coherent#2
oferlaor wants to merge 10000 commits into
Waritboo:fix/delegation-runtime-pool-coherence-prfrom
oferlaor:fix/pr39862-endpoint-coherence

Conversation

@oferlaor

Copy link
Copy Markdown

Summary

This current-main patch extends the provider-coherence fix from NousResearch#39862 to cover same-provider endpoint mismatches.

  • reuses credential_pool_matches_provider(..., base_url=...) so named custom pools remain supported;
  • requires production credential-pool entries to match the delegated child’s active endpoint before pool sharing or lease binding;
  • prevents an openai-api pool for https://api.openai.com/v1 from overwriting a child configured for an Azure OpenAI endpoint;
  • revalidates the pool immediately before lease binding as a defense-in-depth boundary;
  • preserves legacy unscoped pool adapters;
  • adds Azure/public-OpenAI mismatch and named-custom-pool regressions.

Once merged into fix/delegation-runtime-pool-coherence-pr, the existing upstream PR NousResearch#39862 will update automatically.

Validation

  • python -m pytest tests/tools/test_delegate.py -q -o 'addopts='161 passed
  • Ruff on changed files → passed
  • Python compilation → passed
  • git diff --check → passed
  • Production CredentialPool probe:
    • Azure child + public OpenAI pool → rejected
    • Azure child + matching Azure pool → shared

Loading
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.