Skip to content
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

feat (provider/azure): add OpenAI responses API support #5461

Merged
merged 9 commits into from
Apr 6, 2025

Conversation

AVtheking
Copy link
Contributor

Fixes #5346 & #5454

@lgrammel
Copy link
Collaborator

@AVtheking have you tested this end-to-end with an Azure setup?

@AVtheking
Copy link
Contributor Author

AVtheking commented Mar 31, 2025

no actually I don't have subscription at azure 😞 , Let me see If I can make some arrangements

@AVtheking
Copy link
Contributor Author

Hi @lgrammel I have tested now with azure setup and it is working fine , also added an example for the responses api. PTAL

@AVtheking
Copy link
Contributor Author

@lgrammel could you please take a look and let me know any changes required whenever you are free.

@AlexHird
Copy link

AlexHird commented Apr 4, 2025

How would this integrate with the tools provided within the responsesAPI (web search, computer-vision etc)?

@AVtheking
Copy link
Contributor Author

Yeah I want to discuss that thing (but don't know how and where I could discuss this with maintainers) , one way could be directly importing the tools from the open ai module to this

@AlexHird
Copy link

AlexHird commented Apr 5, 2025

@lgrammel Is this already in the works, or planned, by maintainers?

Personally, I would rather be able to use the openai provider directly by configuring it for AzureOpenAI. Similarly as I'd do it when using the the OpenAI package directly. IE:

import { AzureOpenAI } from "openai";

const deployment = "deployment name";
const apiVersion = "2024-10-21";
const client = new AzureOpenAI({ azureADTokenProvider, deployment, apiVersion });

When using Azure OpenAI Services, it would be fantastic to simply create the OpenAI provider with some additional configurations:

import { createAzureOpenAI } from '@ai-sdk/openai';

const deployment = "deployment name";
const apiVersion = "2024-10-21";

const openai = createAzureOpenAI({
  azureADTokenProvider,
  deployment,
  apiVersion
});

Perhaps that would be easier to work with in the long run?

@lgrammel lgrammel changed the title Responses Api in azure provider feat (provider/azure): add OpenAI responses API support Apr 5, 2025
@lgrammel
Copy link
Collaborator

lgrammel commented Apr 5, 2025

@AVtheking looks pretty good, docs would need updating. Can you add the responses api section from the openai provider docs page to the azure provider docs page (and tweak if necessary)?

@AVtheking
Copy link
Contributor Author

@lgrammel I have updated the doc , PTAL, thanks.

@lgrammel
Copy link
Collaborator

lgrammel commented Apr 6, 2025

Seeing test & type check errors.

@AVtheking
Copy link
Contributor Author

Fixed those

@lgrammel lgrammel merged commit e82024e into vercel:main Apr 6, 2025
6 of 7 checks passed
lgrammel added a commit that referenced this pull request Apr 6, 2025
Co-authored-by: ANKIT VARSHNEY <132201033+AVtheking@users.noreply.github.com>
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.

Support in @ai-sdk/azure for Responses API
3 participants