Upstream sync: add :agent-model to custom-agents (PR #1309)#106
Merged
Conversation
Add optional :agent-model to entries in :custom-agents. When set, the runtime tries to use that model for the agent, falling back to the parent session model if unavailable. Wire conversion goes through util/clj->wire automatically: :agent-model becomes :agentModel on the wire, sent on both session.create and session.resume custom-agents entries — consistent with the existing :agent-name / :agent-display-name / :agent-skills convention. Upstream parity: matches the new model?: string field added to CustomAgentConfig in nodejs/src/types.ts (upstream commit d0eb531e, PR #1309). No other upstream changes since v1.0.0-beta.4 require porting: - #1295 (remote_session) was already shipped in CLI 1.0.48 sync (PR #103) - E2E test stabilization commits affect upstream test fixtures only - CLI version bumps (1.0.49-*) are prerelease; we stay pinned to 1.0.48 Tests: 3 new integration tests (spec validation, wire payload on session.create/resume, omission when not set). Full suite: 257 tests, 1203 assertions, 0 failures. bb ci:full passes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR syncs a small upstream Node.js SDK API change by adding support for an optional per-custom-agent model override (model in upstream), exposed in this Clojure SDK as :agent-model within :custom-agents.
Changes:
- Added
::agent-modelspec and allowed it on::custom-agentconfigs. - Added integration tests verifying spec validation plus correct forwarding/omission on
session.createandsession.resume. - Updated API reference docs and added an Unreleased changelog entry.
Show a summary per file
| File | Description |
|---|---|
src/github/copilot_sdk/specs.clj |
Adds ::agent-model and includes it as an optional key in ::custom-agent. |
test/github/copilot_sdk/integration_test.clj |
Adds tests for spec validity and wire forwarding/omission for :agent-model. |
doc/reference/API.md |
Documents :agent-model in the :custom-agents session config row. |
CHANGELOG.md |
Adds an Unreleased entry describing the new :agent-model option and wire behavior. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 0
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.
Syncs the single Node.js SDK API change merged upstream after
v1.0.0-beta.4:d0eb531e— add optionalmodelfieldto
CustomAgentConfig. When set, the runtime tries that model forthe agent, falling back to the parent session model if unavailable.
What changed
src/github/copilot_sdk/specs.clj::agent-modelspec; include in::custom-agent:opt-un.test/github/copilot_sdk/integration_test.cljsession.create/session.resume, omission when absent.doc/reference/API.md:agent-modelin the:custom-agentsrow.CHANGELOG.mdAdded (post-v1.0.0-beta.4 sync)entry.No
client.cljchange needed:util/clj->wireconverts:agent-model→:agentModelautomatically, matching the existing:agent-name/:agent-display-name/:agent-skillsconvention.Other upstream commits since v1.0.0-beta.4
All other commits since
v1.0.0-beta.4are either already shipped, out of scope, or cosmetic:01597314Addremote_sessionfield to all SDK SessionConfig types (PR #1295):remote-sessionis wired inclient.clj(lines 1502, 1582) and exercised bytest-remote-session-config-forwarded-on-wire.38f38ff4/215676e8Update @github/copilot 1.0.49-1 / 1.0.49-0a623d072/fc11032cHarden E2E testse20f5bef/32e932c8/81bb92b6Codegen tweaksbb076dbb/9a198380/f4121e36CLI version bumps to 1.0.47 / 1.0.48-1 / 1.0.48bc0f1c46/31ea472c/59f0981dPython/.NET docs and tests62fabf67/43672757/f445b5c7/25b15be8.NET-specificValidation
bb test— 257 tests, 1203 assertions, 0 failures.bb ci:full— full pipeline (E2E + examples + docs + JAR build) passes.bb validate-docs— 13 files, 0 warnings.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com