Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the JS SDK Model.selectVariant API to take a ModelVariant object (aligning with the C# SDK style), and updates one model integration test to use the new call signature.
Changes:
- Changed
Model.selectVariantto accept aModelVariantinstead of a variant ID string. - Updated
sdk_v2/js/test/model.test.tsto pass aModelVariantobject toselectVariant.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| sdk_v2/js/src/model.ts | Updates selectVariant signature + docstring to accept ModelVariant. |
| sdk_v2/js/test/model.test.ts | Updates test to call selectVariant with a ModelVariant object. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Updates the JS SDK’s Model.selectVariant API to accept a ModelVariant object (matching the C# SDK style), and adjusts tests to use the new call pattern.
Changes:
- Changed
Model.selectVariantto take aModelVariantinstead of a variant id string. - Updated JS integration/unit tests to pass
cachedVariantobjects intoselectVariant.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk_v2/js/src/model.ts | Changes selectVariant signature and selection logic to accept ModelVariant. |
| sdk_v2/js/test/model.test.ts | Updates model selection in tests to pass ModelVariant. |
| sdk_v2/js/test/openai/chatClient.test.ts | Updates model selection in chat client tests. |
| sdk_v2/js/test/openai/audioClient.test.ts | Updates model selection in audio client tests. |
| sdk_v2/js/test/openai/responsesClient.test.ts | Updates model selection in responses client test setup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
….com/microsoft/Foundry-Local into prathikrao/select-variant-input-type
There was a problem hiding this comment.
Pull request overview
Adjusts the JS SDK Model.selectVariant API to accept a ModelVariant object (aligning with the C# SDK style) and updates usage sites accordingly.
Changes:
- Update
Model.selectVariantsignature from variant id (string) toModelVariant. - Update JS integration/unit tests to pass
ModelVariantobjects instead of ids. - Update the JS SDK README example to reflect the new call pattern.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk_v2/js/src/model.ts | Changes selectVariant to accept a ModelVariant and validates membership via id lookup. |
| sdk_v2/js/README.md | Updates example usage to pass variants[0] rather than variants[0].id. |
| sdk_v2/js/test/model.test.ts | Updates selectVariant usage to pass a ModelVariant. |
| sdk_v2/js/test/openai/chatClient.test.ts | Updates selectVariant usage to pass a ModelVariant across multiple tests. |
| sdk_v2/js/test/openai/audioClient.test.ts | Updates selectVariant usage to pass a ModelVariant across multiple tests. |
| sdk_v2/js/test/openai/responsesClient.test.ts | Updates selectVariant usage to pass a ModelVariant in integration setup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adjusts the JS SDK’s variant-selection API to take a ModelVariant object (aligning with the C# SDK approach) and updates tests/docs accordingly.
Changes:
- Update
Model.selectVariantto accept aModelVariantinstead of a variant ID string. - Update JS tests and README usage examples to pass a
ModelVariant. - Add/update generated API docs for
ResponsesClient, settings, and related types.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk_v2/js/src/model.ts | Changes selectVariant to accept ModelVariant and selects by matching ID. |
| sdk_v2/js/test/model.test.ts | Updates tests to pass a ModelVariant to selectVariant. |
| sdk_v2/js/test/openai/chatClient.test.ts | Updates tests to pass a ModelVariant to selectVariant. |
| sdk_v2/js/test/openai/audioClient.test.ts | Updates tests to pass a ModelVariant to selectVariant. |
| sdk_v2/js/test/openai/responsesClient.test.ts | Updates tests to pass a ModelVariant to selectVariant. |
| sdk_v2/js/README.md | Updates example usage to pass a ModelVariant. |
| sdk_v2/js/docs/README.md | Updates generated docs index and type listings (incl. Responses API types). |
| sdk_v2/js/docs/classes/Model.md | Updates generated docs for selectVariant signature + adds createResponsesClient. |
| sdk_v2/js/docs/classes/ModelVariant.md | Updates generated docs + adds createResponsesClient. |
| sdk_v2/js/docs/classes/FoundryLocalManager.md | Updates generated docs to include isWebServiceRunning and createResponsesClient. |
| sdk_v2/js/docs/classes/ResponsesClient.md | Adds generated docs for ResponsesClient. |
| sdk_v2/js/docs/classes/ResponsesClientSettings.md | Adds generated docs for ResponsesClientSettings. |
| sdk_v2/js/docs/classes/ChatClient.md | Updates generated docs formatting/signatures for chat methods. |
| sdk_v2/js/docs/classes/ChatClientSettings.md | Updates generated docs for additional settings properties. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the JS SDK Model.selectVariant API to accept a ModelVariant object (aligning with the C# SDK) and regenerates/updates the JS API reference docs accordingly.
Changes:
- Change
Model.selectVariantto accept aModelVariantinstead of a variant ID string. - Update tests and README usage to pass a
ModelVariantobject. - Add/regenerate TypeDoc markdown for
ResponsesClientand related types/settings.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| sdk_v2/js/src/model.ts | Changes selectVariant to accept ModelVariant and validates membership via ID lookup. |
| sdk_v2/js/test/openai/chatClient.test.ts | Updates test calls to pass a ModelVariant object. |
| sdk_v2/js/test/openai/audioClient.test.ts | Updates test calls to pass a ModelVariant object. |
| sdk_v2/js/test/openai/responsesClient.test.ts | Updates test calls to pass a ModelVariant object. |
| sdk_v2/js/test/model.test.ts | Updates test calls to pass a ModelVariant object. |
| sdk_v2/js/README.md | Updates sample usage to pass a ModelVariant object. |
| sdk_v2/js/docs/classes/Model.md | Updates generated docs for selectVariant(variant). |
| sdk_v2/js/docs/classes/ModelVariant.md | Adds generated docs for createResponsesClient and fixes anchors. |
| sdk_v2/js/docs/classes/ResponsesClient.md | Adds generated docs for ResponsesClient. |
| sdk_v2/js/docs/classes/ResponsesClientSettings.md | Adds generated docs for ResponsesClientSettings. |
| sdk_v2/js/docs/classes/FoundryLocalManager.md | Adds generated docs for isWebServiceRunning and createResponsesClient. |
| sdk_v2/js/docs/classes/ChatClientSettings.md | Adds generated docs for responseFormat/toolChoice. |
| sdk_v2/js/docs/classes/ChatClient.md | Updates generated docs formatting and overload descriptions. |
| sdk_v2/js/docs/README.md | Updates generated docs index/types to include Responses API shapes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Updates the JS SDK Model.selectVariant API to accept a ModelVariant object (instead of a variant ID string) to align with the C# SDK, and regenerates/updates the JS SDK documentation and tests accordingly.
Changes:
- Change
Model.selectVariantto take aModelVariantand validate membership in the model’s variant list. - Update JS tests and README snippet to pass
ModelVariantobjects toselectVariant. - Add/regenerate TypeDoc markdown for Responses API-related types/clients and other doc updates.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk_v2/js/src/model.ts | Changes selectVariant signature to accept ModelVariant and adds runtime validation helper. |
| sdk_v2/js/test/openai/responsesClient.test.ts | Updates selectVariant call sites to pass a ModelVariant. |
| sdk_v2/js/test/openai/chatClient.test.ts | Updates selectVariant call sites to pass a ModelVariant. |
| sdk_v2/js/test/openai/audioClient.test.ts | Updates selectVariant call sites to pass a ModelVariant. |
| sdk_v2/js/test/model.test.ts | Updates selectVariant call sites to pass a ModelVariant. |
| sdk_v2/js/README.md | Updates usage example to pass a ModelVariant to selectVariant. |
| sdk_v2/js/docs/classes/Model.md | Updates generated API docs for selectVariant parameter type/signature. |
| sdk_v2/js/docs/classes/ModelVariant.md | Updates generated docs (including Responses client method references/anchors). |
| sdk_v2/js/docs/classes/FoundryLocalManager.md | Updates generated docs to include Responses client/web service members. |
| sdk_v2/js/docs/classes/ChatClientSettings.md | Updates generated docs with additional settings fields. |
| sdk_v2/js/docs/classes/ChatClient.md | Updates generated docs formatting and overload documentation. |
| sdk_v2/js/docs/classes/ResponsesClient.md | Adds generated docs for the Responses client. |
| sdk_v2/js/docs/classes/ResponsesClientSettings.md | Adds generated docs for Responses client settings. |
| sdk_v2/js/docs/README.md | Regenerates/updates TypeDoc README index and type/interface listings (notably Responses API types). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
continued in #535 |
Now it accepts a modelVariant object similar to c# SDK. Also updates docs.