-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
@AVtheking have you tested this end-to-end with an Azure setup? |
no actually I don't have subscription at azure 😞 , Let me see If I can make some arrangements |
Hi @lgrammel I have tested now with azure setup and it is working fine , also added an example for the responses api. PTAL |
@lgrammel could you please take a look and let me know any changes required whenever you are free. |
How would this integrate with the tools provided within the |
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 |
@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? |
@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)? |
@lgrammel I have updated the doc , PTAL, thanks. |
Seeing test & type check errors. |
Fixed those |
Fixes #5346 & #5454