Skip to content

fix: enhance AzureOpenAIResponsesAPIConfig to support different Azure… #11027

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 3 commits into
base: main
Choose a base branch
from

Conversation

ishaan-jaff
Copy link
Contributor

… auth method like we have for completions api. (#10871)

  • fix: enhance AzureOpenAIResponsesAPIConfig to support different Azure Auth method like we have for completions api.

  • extract duplicate code to common functoin as util for future reference

  • remove unused import

  • Add type annotation in order to fix this issue. llms/azure/common_utils.py:416: error: Incompatible types in assignment (expression has type "AsyncClient | None", target has type "str | Callable[[], str] | None") [assignment] llms/azure/common_utils.py:418: error: Incompatible types in assignment (expression has type "Client | None", target has type "str | Callable[[], str] | None") [assignment]

  • convert response to pydantic object and also provide unittest for it

  • remove unused type

Title

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test

Changes

… auth method like we have for completions api. (#10871)

* fix: enhance AzureOpenAIResponsesAPIConfig to support different Azure Auth method like we have for completions api.

* extract duplicate code to common functoin as util for future reference

* remove unused import

* Add type annotation in order to fix this issue.
llms/azure/common_utils.py:416: error: Incompatible types in assignment (expression has type "AsyncClient | None", target has type "str | Callable[[], str] | None")  [assignment]
llms/azure/common_utils.py:418: error: Incompatible types in assignment (expression has type "Client | None", target has type "str | Callable[[], str] | None")  [assignment]

* convert response to pydantic  object and also provide unittest for it

* remove unused type
Copy link

vercel bot commented May 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2025 7:16pm

@hsuyuming
Copy link

hsuyuming commented May 22, 2025

@ishaan-jaff I create a pull request to your litellm_staging_azure_responses_api branch.
I fetch the latest code from origin, then do the rebase. hope this step is correct. If not, feel free to let me know which command i should use. Thank you
#11036

@hsuyuming
Copy link

hsuyuming commented May 22, 2025

@ishaan-jaff i saw litellm_mapped_tests successfully pass within the pipeline, but there are other steps still fail, do you have any idea?

https://app.circleci.com/pipelines/github/BerriAI/litellm/32750/workflows/ac7ef503-4934-4b58-a55b-b6872e01838b

* fix testcase issue, the issue is because we have few enviroment variables setup within CI pipeline

* fix the typo within get_azure_api_key_or_token
@hsuyuming
Copy link

Hi @ishaan-jaff @krrishdholakia
Since @ishaan-jaff create this branch, can you help me update this branch? or you would like me to fix the conflict?

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