Skip to content

Conversation

@junya-takayama
Copy link
Collaborator

@junya-takayama junya-takayama commented Dec 25, 2025

  • Enable the use of the AzureOpenAI client from the OpenAIChatAPI class.
  • Fix a bug where an error occurred when using LiteLLMChatAPI if OPENAI_API_KEY was not set.
  • Make the AzureOpenAI backend available for use in tests.

Comment on lines +121 to +126
if backend == "OpenAI":
self.api_call_func = OpenAI(**api_headers).chat.completions.create
elif backend == "AzureOpenAI":
self.api_call_func = AzureOpenAI(**api_headers).chat.completions.create
else:
self.api_call_func = None
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Previously, the OpenAI client was invoked even when using LiteLLMChatAPI, requiring OPENAI_API_KEY to be set. This is avoided by not initializing the client in OpenAIChatAPI when backend == None.

@junya-takayama junya-takayama changed the title [WIP] Some fixes for azure OpenAI [WIP] Some fixes for AzureOpenAI Dec 25, 2025
@junya-takayama junya-takayama changed the title [WIP] Some fixes for AzureOpenAI Some fixes for AzureOpenAI Dec 25, 2025
@junya-takayama junya-takayama marked this pull request as ready for review December 25, 2025 08:55
@junya-takayama junya-takayama requested a review from a team December 25, 2025 09:24
@junya-takayama junya-takayama merged commit 2959f7d into main Dec 26, 2025
8 checks passed
@junya-takayama junya-takayama deleted the some_fixes_for_azure_openai branch December 26, 2025 03:15
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.

3 participants