Remove on_list_models constructor option from Client; keep only usingListModels()#34
Merged
kawax merged 2 commits intosdk-sync/2026-03-09-98a9c4c1d5830df5from Mar 9, 2026
Merged
Conversation
Co-authored-by: kawax <1502086+kawax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] WIP address feedback on agent parameter and onListModels handler
Remove Mar 9, 2026
on_list_models constructor option from Client; keep only 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.
Client::__construct()accepted anon_list_modelsoption, but there is noforceClient()onCopilotManagerto inject a custom-constructed client, making this option unreachable via the public API. The only viable API is the fluentusingListModels()method.Changes
src/Client.php: Removeon_list_modelsextraction from$optionsin both the TCP and stdio constructor branches. UpdatelistModels()docblock accordingly.docs/jp/custom-providers.md: Remove theon_list_models/Copilot::forceClient()example entirely; retain only theusingListModels()usage.Only supported pattern
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.