Skip to content

Bearer token provider addition to openaiclient #2470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

johanste
Copy link

@johanste johanste commented Jul 15, 2025

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Adding a way for the caller to provide (and refresh) bearer tokens. Similar to what is already supported for the Azure OpenAI client, but with a more generic name.

Additional context & links

The PR allows for callers to asynchronously fetch (and update) bearer tokens. This covers a broad spectrum of auth scenarios, including api key refresh and oauth assuming no service challenge information is needed to retrieve the token (rare).

It would not cover scenarios where the request body is needed (e.g. request signing) or where information from a challenge is needed.

johanste and others added 3 commits July 11, 2025 16:06
… Propagate bearer_token_provider in the `copy` method.
* add tests, fix copy, add token provider to module client

* fix lint

* ignore for azure copy

* revert change
@johanste johanste marked this pull request as ready for review July 29, 2025 02:33
@johanste johanste requested a review from a team as a code owner July 29, 2025 02:33
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.

2 participants