Repository navigation
Reuse gateway model proxy HTTP clients per service - #4491
Open
nikitabhagat2307-prog wants to merge 2 commits into
Open
nikitabhagat2307-prog wants to merge 2 commits into
nikitabhagat2307-prog wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4489.
The gateway model proxy created a new HTTPX client for every request to a domain-backed service and never closed it. Cache a
ServiceClientper project/service inServiceConnectionPool, reuse it across requests, close it when the service is unregistered, and close all remaining clients during pool shutdown.Added focused lifecycle coverage for concurrent client reuse, client closure on service removal, and pool shutdown cleanup.
Validation:
git diff --checkpassed. The documented Ruff checks and focused pytest module could not run becauseuv,ruff, and pytest are not installed in this environment. This contribution was prepared with AI assistance.