feat: restore provider_data constructor kwarg#343
Merged
cdoern merged 1 commit intoogx-ai:mainfrom May 1, 2026
Merged
Conversation
Adds back the provider_data Mapping[str, Any] kwarg on OgxClient and AsyncOgxClient that was present in the previous llama-stack-client SDK but lost during the rename to ogx-client. When provided, it is serialized as JSON and merged into default_headers under X-OGX-Provider-Data, matching the header the OGX server reads. Without this, callers had to construct the header themselves on every client instantiation, which broke a large surface of OGX integration tests and downstream code on upgrade from llama-stack-client. Signed-off-by: Charlie Doern <cdoern@redhat.com>
29ffba9 to
56130fc
Compare
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
Adds back the
provider_data: Mapping[str, Any] | Nonekwarg onOgxClientandAsyncOgxClientthat was present in the previousllama-stack-clientSDK but lost during the rename toogx-client. When provided, it is JSON-serialized and merged intodefault_headersunderX-OGX-Provider-Data— the header the OGX server reads to thread per-request provider credentials through.Why
Without this kwarg, every caller upgrading from
llama-stack-clienthas to construct the header themselves on every client instantiation:That breaks a large surface of OGX integration tests and downstream code on upgrade. Restoring the affordance keeps the migration to
ogx-clientsource-compatible for the constructor signature.Behavior matches the old SDK
The previous implementation in
llama-stack-clientv0.7.2-alpha.3 was:This PR mirrors that, with the only intentional difference being the header name (
X-OGX-Provider-Data, matching the renamed server).Test plan
OgxClient(base_url=..., provider_data={"k": "v"})accepts the kwargclient.default_headers["X-OGX-Provider-Data"]contains{"k": "v"}JSON-encodedAsyncOgxClient