Replace the legacy replica groups serializer with a client patch - #4248
Merged
Merged
Conversation
Bihan
marked this pull request as ready for review
September 2, 2026 09:10
This was referenced Sep 3, 2026
un-def
added a commit
that referenced
this pull request
Sep 3, 2026
`ServiceConfigurationParams.groups` was added in 0.21.3 (#4177) along with a model serializer that popped `groups` from every dump and re-emitted it as the legacy `replicas: [{count: ...}]` shape. Living on the model, it applied in both directions, so a 0.21.3 client never put `groups` on the wire. PR #4248 removed that serializer in favor of a server-side patch gated on `client_version < 0.21.3`. That covers server -> old client, but nothing replaced client -> old server, so 0.21.4 clients always send `configuration.groups` and servers before 0.21.3 reject it as an extra field. Exclude service `groups` when unset, as already done for `TaskConfiguration.groups`. This covers all three client paths that send a `run_spec`: `get_plan`, `apply`, and `gpus/list`. Fixes: #4255 Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.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.
Replica
groupsshipped in 0.21.3. Every earlier CLI — 0.20.7 through 0.21.2 — knows onlyreplicas: [{count: ...}]. Until now that was handled by_serialize_legacy_replica_groups, which rewrote groups into the old layout on every dump, because the model has no way to know who it is serializing for. The server does: every request carries X-API-VERSION. So the rewrite moves intopatch_run_spec, which converts groups back toreplicas/countonly for clients older than 0.21.3.