Add tests for agent parameter and usingListModels()#35
Merged
kawax merged 2 commits intosdk-sync/2026-03-09-98a9c4c1d5830df5from Mar 9, 2026
Merged
Add tests for agent parameter and usingListModels()#35kawax merged 2 commits intosdk-sync/2026-03-09-98a9c4c1d5830df5from
agent parameter and usingListModels()#35kawax merged 2 commits intosdk-sync/2026-03-09-98a9c4c1d5830df5from
Conversation
Co-authored-by: kawax <1502086+kawax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Sync with copilot-sdk: add agent parameter and onListModels handler
Add tests for Mar 9, 2026
agent parameter and usingListModels()
kawax
added a commit
that referenced
this pull request
Mar 9, 2026
…s handler (#32) * Sync with copilot-sdk: add agent param and onListModels handler - Add `agent` property to SessionConfig and ResumeSessionConfig for pre-selecting a custom agent when a session starts or resumes - Add `on_list_models` callable option to Client for BYOK mode; when set, listModels() calls the handler instead of querying CLI - Pass `agent` in session.create and session.resume RPC requests - Update submodule pointer to e478657 (396e8b3..e478657) - Update docs/jp/session-config.md and docs/jp/custom-providers.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add `usingListModels()` fluent method to Client (#33) * Initial plan * Add usingListModels() fluent method to Client and update docs Co-authored-by: kawax <1502086+kawax@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kawax <1502086+kawax@users.noreply.github.com> * Remove `on_list_models` constructor option from Client; keep only `usingListModels()` (#34) * Initial plan * Remove on_list_models constructor option, keep only usingListModels Co-authored-by: kawax <1502086+kawax@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kawax <1502086+kawax@users.noreply.github.com> * Add tests for `agent` parameter and `usingListModels()` (#35) * Initial plan * Add tests for agent parameter and usingListModels Co-authored-by: kawax <1502086+kawax@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kawax <1502086+kawax@users.noreply.github.com> --------- Co-authored-by: GitHub Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: kawax <1502086+kawax@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests were missing for two features added in the SDK sync: the
agentparameter on session config types and theusingListModels()fluent method onClient.SessionConfig/ResumeSessionConfig—agentfieldfromArray/toArraytests to includeagentagentisnulltoArrayserialisation,fromArrayparsing, null-exclusion fromtoArrayClient—usingListModels()$client(no CLI connection required)listModels()invokes the handler and returnsModelInfo[]usingListModels(null)accepted without error[]💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.