Skip to content

fix: reuse reranking REST clients - #2574

Draft
erichare wants to merge 4 commits into
mainfrom
fix/reuse-reranking-rest-client
Draft

fix: reuse reranking REST clients#2574
erichare wants to merge 4 commits into
mainfrom
fix/reuse-reranking-rest-client

Conversation

@erichare

@erichare erichare commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

What this PR does:

  • Reuses one direct reranking provider and REST client per provider/model.
  • Removes synchronized per-request client construction and closes cached clients at shutdown.
  • Makes the shared HTTP/1 connection pool explicit and configurable per model; the default remains 50.
  • Keeps gateway providers request-scoped and preserves per-call bearer tokens and tenant headers.
  • Bounds client and connection growth; it does not claim increased NIM capacity.

Validation: 34 focused reranking and findAndRerank tests pass. End-to-end throughput still requires an A/B deployment because the direct NIM harness bypasses this client.

Which issue(s) this PR fixes:
Fixes #2573

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

📈 Unit Test Coverage Delta vs Main Branch

Metric Value
Main Branch 53.40%
This PR 53.58%
Delta 🟢 +0.18%
✅ Coverage improved!

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Unit Test Coverage Report

Overall Project 53.58% -0.01% 🍏
Files changed 90.15% 🍏

File Coverage
RerankingProvidersConfigImpl.java 80.85% 🍏
NvidiaRerankingProvider.java 58.64% -2.09% 🍏
RerankingProviderFactory.java 58.02% -3.44% 🍏
RerankingProvidersConfig.java 34.43% 🍏

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

📉 Integration Test Coverage Delta vs Main Branch (dse69-it)

Metric Value
Main Branch 71.45%
This PR 71.43%
Delta 🔴 -0.02%
⚠️ Coverage decreased

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 71.43% -0.04% 🍏
Files changed 66.67% 🍏

File Coverage
RerankingProvidersConfig.java 98.36% 🍏
RerankingProviderFactory.java 46.18% -11.45% 🍏
RerankingProvidersConfigImpl.java 25.53% -10.64%
NvidiaRerankingProvider.java 22.51% -2.09% 🍏

@github-actions

Copy link
Copy Markdown
Contributor

📉 Integration Test Coverage Delta vs Main Branch (hcd-it)

Metric Value
Main Branch 72.76%
This PR 72.75%
Delta 🔴 -0.02%
⚠️ Coverage decreased

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (hcd-it)

Overall Project 72.75% -0.04% 🍏
Files changed 66.67% 🍏

File Coverage
RerankingProvidersConfig.java 98.36% 🍏
RerankingProviderFactory.java 46.18% -11.45% 🍏
RerankingProvidersConfigImpl.java 25.53% -10.64%
NvidiaRerankingProvider.java 22.51% -2.09% 🍏

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.

Reuse reranking REST clients across findAndRerank requests

1 participant