Skip to content

Upstream sync: add :agent-model to custom-agents (PR #1309)#106

Merged
krukow merged 1 commit into
mainfrom
upstream-sync/post-beta.4
May 18, 2026
Merged

Upstream sync: add :agent-model to custom-agents (PR #1309)#106
krukow merged 1 commit into
mainfrom
upstream-sync/post-beta.4

Conversation

@krukow
Copy link
Copy Markdown
Collaborator

@krukow krukow commented May 18, 2026

Syncs the single Node.js SDK API change merged upstream after v1.0.0-beta.4:

  • upstream PR #1309 / commit d0eb531e — add optional model field
    to CustomAgentConfig. When set, the runtime tries that model for
    the agent, falling back to the parent session model if unavailable.

What changed

File Change
src/github/copilot_sdk/specs.clj Add ::agent-model spec; include in ::custom-agent :opt-un.
test/github/copilot_sdk/integration_test.clj 3 new tests: spec validation, wire payload on session.create/session.resume, omission when absent.
doc/reference/API.md Document :agent-model in the :custom-agents row.
CHANGELOG.md New Added (post-v1.0.0-beta.4 sync) entry.

No client.clj change needed: util/clj->wire converts :agent-model:agentModel automatically, matching the existing :agent-name / :agent-display-name / :agent-skills convention.

Other upstream commits since v1.0.0-beta.4

All other commits since v1.0.0-beta.4 are either already shipped, out of scope, or cosmetic:

Commit Decision
01597314 Add remote_session field to all SDK SessionConfig types (PR #1295) Already done in PR #103:remote-session is wired in client.clj (lines 1502, 1582) and exercised by test-remote-session-config-forwarded-on-wire.
38f38ff4 / 215676e8 Update @github/copilot 1.0.49-1 / 1.0.49-0 Prerelease; we stay pinned to 1.0.48 (current latest stable).
a623d072 / fc11032c Harden E2E tests Upstream test fixtures only.
e20f5bef / 32e932c8 / 81bb92b6 Codegen tweaks Upstream codegen pipeline only; doesn't affect us.
bb076dbb / 9a198380 / f4121e36 CLI version bumps to 1.0.47 / 1.0.48-1 / 1.0.48 Covered by current 1.0.48 pin.
bc0f1c46 / 31ea472c / 59f0981d Python/.NET docs and tests Out of scope (other SDKs).
62fabf67 / 43672757 / f445b5c7 / 25b15be8 .NET-specific Out of scope.

Validation

  • 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

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>
Copilot AI review requested due to automatic review settings May 18, 2026 06:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-model spec and allowed it on ::custom-agent configs.
  • Added integration tests verifying spec validation plus correct forwarding/omission on session.create and session.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

@krukow krukow marked this pull request as ready for review May 18, 2026 10:48
@krukow krukow merged commit 8574cf5 into main May 18, 2026
2 checks passed
@krukow krukow deleted the upstream-sync/post-beta.4 branch May 18, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants