Skip to content

Conversation

@FanYaning
Copy link
Contributor

Fix the issuses in #661 and #670

When modifying the API key or credentials via OpenAIClient by calling withOptions() on the client, the temporary client still uses the original client's authentication information.

OpenAIClient clientWithOptions = client.withOptions(opt -> {
        opt.apiKey("sk-test111111111111111111111111");
    });

    OpenAIClient clientWithOptions = client.withOptions(opt -> {
        opt.credential(BearerTokenCredential.create("sk-test111111111111111111111111"));
    });

@FanYaning FanYaning requested a review from a team as a code owner December 21, 2025 02:10
@TomerAberbach TomerAberbach self-requested a review January 4, 2026 20:59
Copy link
Collaborator

@TomerAberbach TomerAberbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can you run the formatter to fix CI?

@FanYaning
Copy link
Contributor Author

Sorry for that! I have fix the format in #674

@FanYaning FanYaning closed this Jan 5, 2026
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