Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(azure) add built-in tools tests for azure provider Responses API #9431

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
tsuzaki430 wants to merge 6 commits into vercel:main
base: main
Choose a base branch
Loading
from tsuzaki430:tsuz/add-azure-tests

Conversation

Copy link
Collaborator

@tsuzaki430 tsuzaki430 commented Oct 12, 2025
edited
Loading

Background

This pull request doesn't update any features to @ai-sdk/azure.
However, it adds tests that will help ensure the soundness of future updates.
I would like to add tests for when doStream and doGenerate are processed in the Responses API.
In the tests for the Responses API in @ai-sdk/openai, it is possible to obtain idempotent results for doGenerate and doStream by passing the result data chunks to the function in advance.
I would like to add similar tests for the Responses API in @ai-sdk/azure.

Summary

This pull request doesn't update any features to @ai-sdk/azure.
I created the Azure test code by referring to the OpenAI test code. I copied some parts.

  • add createModel function for idempotent results for doGenerate and doStream.
  • add tool using test
  • add code interpreter test
  • add file search test
  • add image generation test ( doGenerate only because not supported stream on azure platform )

Manual Verification

Since there were no functional changes, I confirmed that there was no change in the test results.

  • ai-core
    src/generate-text/azure-responses-code-interpreter.ts
    src/stream-text/azure-responses-code-interpreter.ts

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • Formatting issues have been fixed (run pnpm prettier-fix in the project root)
  • I have reviewed this pull request (self-review)

Future Work

Related Issues

@tsuzaki430 tsuzaki430 changed the title (削除) chore(azure) doStream tests for azure provider Responses API (削除ここまで) (追記) chore(azure) doGenerate and doStream tests for azure provider Responses API (追記ここまで) Oct 12, 2025
Copy link
Collaborator Author

tsuzaki430 commented Oct 13, 2025
edited
Loading

memo: how to make fixtures files

  • xxxxx/fixtures/xxxxxxxxxxxxxx.n.chunks.txt
 const result = streamText({
 model: azure.responses('gpt-5-mini'), // use your own deployment
 prompt:
 'Create a program that generates five random numbers between 1 and 100 with two decimal places, and show me the execution results.',
 tools: {
 code_interpreter: azure.tools.codeInterpreter(),
 },
 includeRawChunks:true,
 });
 for await (const part of result.fullStream) {
 if(part.type==="raw"){
 console.log(JSON.stringify(part.rawValue));
 }
 }
}
  • xxxxx/fixtures/xxxxxxxxxxxxxx.n.json
 const basicResult = await generateText({
 model: azure.responses('gpt-5-mini'),
 prompt:
 'Create a program that generates five random numbers between 1 and 100 with two decimal places, and show me the execution results.',
 tools: {
 code_interpreter: azure.tools.codeInterpreter(),
 },
 });
 console.log(JSON.stringify(basicResult.response.body,null,2));

@tsuzaki430 tsuzaki430 changed the title (削除) chore(azure) doGenerate and doStream tests for azure provider Responses API (削除ここまで) (追記) chore(azure) add built-in tools tests for azure provider Responses API (追記ここまで) Oct 13, 2025
@tsuzaki430 tsuzaki430 marked this pull request as ready for review October 13, 2025 12:27
Copy link
Collaborator Author

@vercel/ai-sdk-azure

Hello , my review is finished.

Copy link
Collaborator Author

Is @vercel/ai-sdk-azure enabled to notification between members?

Copy link
Collaborator Author

@gr2m

Hello , I want to send message to azure members for the review using @vercel/ai-sdk-azure.

@vercel/ai-sdk-azure
@vercel/ai-sdk-azure doesn't change clickable link.
The notification may not reach members.

Copy link
Collaborator

Hi @tsuzaki430 , I reviewed the code as well. Yes, I manually checked this in PR, so there is no way to know if anyone mentioned @vercel/ai-sdk-azure.

tsuzaki430 reacted with laugh emoji

Copy link
Collaborator Author

@rahulbhadja

Thank you for review this PR!
It was the message from gr2m about @vercel/ai-sdk-azure.
(Maybe I'm using it incorrectly.)

Thank you so much for coming here and leaving a message😊

rahulbhadja reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /