Skip to content

Azure OpenAI Deployments Support #78

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

Closed
mputerity opened this issue Mar 12, 2025 · 2 comments
Closed

Azure OpenAI Deployments Support #78

mputerity opened this issue Mar 12, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@mputerity
Copy link

mputerity commented Mar 12, 2025

Can you add support for custom Azure Open AI deployments?

Just setting the env vars like:

OPENAI_API_TYPE=azure
OPENAI_API_VERSION=2024-09-01-preview
AZURE_OPENAI_API_KEY=...
AZURE_OPENAI_API_BASE=...

and using

agent = Agent(
model=<my_deployment_name>,
name="Assistant",
instructions="You are a helpful assistant.",
)

does not work.

@mputerity mputerity added the enhancement New feature or request label Mar 12, 2025
@alexprengere
Copy link

alexprengere commented Mar 12, 2025

I believe this has already been answered in #44
I agree that this could be more prominent in the docs. What worked for me was the solution in this comment. Perhaps there is a way to use directly the responses API, to avoid having to pass model=OpenAIChatCompletionsModel(...) for each agent.

@alexprengere
Copy link

For the record the openai Python library does not currently support Azure OpenAI deployments for the responses API, so it looks like model=OpenAIChatCompletionsModel(...) is mandatory for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants