refactor(BA-5961): introduce AppProxyClientRegistry for app-proxy domain clients#11491
Draft
jopemachine wants to merge 8 commits intomainfrom
Draft
refactor(BA-5961): introduce AppProxyClientRegistry for app-proxy domain clients#11491jopemachine wants to merge 8 commits intomainfrom
AppProxyClientRegistry for app-proxy domain clients#11491jopemachine wants to merge 8 commits intomainfrom
Conversation
…ain clients Apply the BackendAIClientRegistry / V2ClientRegistry pattern to app-proxy clients. DeploymentChatClient was previously a direct subclass of BackendAIAppProxyClient, instantiated by the CLI with a raw ClientConfig; this divergence from the manager-side SDK shape (where domain clients are lazy-loaded via a registry) does not scale once more app-proxy domain clients are added (custom containers, /generate, etc.). - Add BaseAppProxyDomainClient mirroring BaseDomainClient. - Compose DeploymentChatClient via BaseAppProxyDomainClient instead of subclassing BackendAIAppProxyClient. - Add AppProxyClientRegistry in client/v2/approxy_registry.py with the same lifecycle as BackendAIClientRegistry (create / close / @cached_property accessors). - Add create_appproxy_registry helper alongside create_v2_registry. - Switch ./bai deployment chat to consume the registry. - Update tests for the new DeploymentChatClient constructor. Resolves BA-5961. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirror the test_registry.py pattern used by BackendAIClientRegistry: factory creation, domain client type/inheritance, cached_property identity, and close() delegation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop the runtime list and the "domain clients add X / Y / Z" enumeration — that's downstream-specific filler that does not belong on the base class. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
App-proxy fronts more than deployment runtimes (e.g. health checks); drop the "deployment-specific" framing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
BaseAppProxyDomainClientmirroringBaseDomainClient, and refactorDeploymentChatClientfrom aBackendAIAppProxyClientsubclass to a domain client composed over one.AppProxyClientRegistry(client/v2/approxy_registry.py) with the same shape asBackendAIClientRegistry/V2ClientRegistry:create()/close()lifecycle and@cached_propertyaccessors (currentlydeployment_chat).create_appproxy_registryCLI helper alongsidecreate_v2_registry, and switch./bai deployment chatto consume the registry instead of instantiatingDeploymentChatClientdirectly.BackendAIAppProxyClientintoDeploymentChatClientvia the new constructor.Resolves BA-5961.