Skip to content

fix: accept latest child Agent versions in Managed rosters - #43

Merged
moonyue-w merged 1 commit into
mainfrom
codex/contract-bug-fixes-20261120
Nov 21, 2026
Merged

moonyue-w merged 1 commit into
mainfrom
codex/contract-bug-fixes-20261120

Conversation

@moonyue-w

Copy link
Copy Markdown
Collaborator

Summary

  • Add MultiagentAgentParams for Managed Agent multiagent roster entries. A child Agent version now accepts a positive integer, "latest", or a positive integer string.
  • Type saved roster versions (MultiagentAgentUnion.version) as int | str, so Agent responses containing "latest" parse with _strict_response_validation=True.
  • Session and Deployment Agent references are unchanged and still take numeric versions.

Why

The official Agent schema saves and returns "latest" for child Agent references, and the Managed service has resolved "latest" roster entries since 2026-09-15. The SDK typed roster versions as integers, so strict response parsing rejected valid Agents and the request types could not express "latest".

Verification

  • uv run make lint
  • uv run make typecheck
  • uv run make test
  • uv run make docs-check
  • Example --help smoke checks
  • Account-backed integration tests run, or not required

Commands and results:

uv run make lint        # ruff check and format check passed
uv run make typecheck   # mypy: no issues found in 669 source files
uv run make test        # 4344 passed, 73 deselected
uv run make docs-check  # PASS: internal links OK, 19 README snippets compiled

Impact

  • Public API or behavior changed
  • User-facing changes added to CHANGELOG.md under Unreleased, or not applicable (explain below)
  • Synchronous and asynchronous clients remain aligned
  • Generated API documentation updated
  • Contract fixtures updated
  • Go and TypeScript parity considered
  • Migration notes added for a breaking change
  • No credentials, .env.live, logs, or generated test output committed

Additional context:

  • The new regression test covers synchronous and asynchronous clients in strict mode. With the previous Optional[int] type it fails with APIResponseValidationError.
  • Contract fixtures are unchanged because no route or request location changed. No migration note is needed: runtime behavior is compatible and only the roster version type widens.
  • Example smoke checks were not run because no example uses Agent rosters. Account-backed tests are not required for this type-only change.
  • Local tests were run with proxy variables unset, because a NO_PROXY entry of [::1] makes httpx reject client construction during collection.
  • Parity: the Go and TypeScript SDKs receive the same roster fix; Java already supports "latest".

Agent rosters may save a child version as "latest", but the SDK typed
roster versions as integers, so strict response parsing rejected valid
Agents. Add a roster-specific request type and accept int or string
versions in responses; Session and Deployment references stay numeric.
@moonyue-w
moonyue-w merged commit 9b1a2e6 into main Nov 21, 2026
5 checks passed
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.

1 participant