You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(patch): refresh PATCH.md for upstream PR pingdotgg#2246 descriptor refactor
Replace the per-provider normalizer trap with the descriptor-driven pipeline.
Expand the conflict-zones table with every file rewritten during the sync.
Update verification checklist line 4 count (now 4 lists) and line 4a to
check for the `agent` descriptor wiring.
Copy file name to clipboardExpand all lines: PATCH.md
+34-21Lines changed: 34 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,20 +187,24 @@ Every shared-file edit is a _pure addition_ (new case in a union, new entry in a
187
187
188
188
## Hidden Traps — Read Before Adding Another Provider
189
189
190
-
### Per-provider normalizers silently drop unknown options
190
+
### Provider model options are now descriptor-driven (post upstream PR #2246)
191
191
192
-
`normalizeProviderModelOptionsWithCapabilities` in `packages/shared/src/model.ts`is a switch on `ProviderKind` — every provider needs an explicit `case`. The default (no match) returns `undefined`, which strips all model options on the dispatch path **before** they reach the server.
192
+
As of the 2026-04-24 sync, `modelSelection.options` is `ReadonlyArray<ProviderOptionSelection>` where each selection is `{ id, value }`. Providers expose their supported options via `ModelCapabilities.optionDescriptors` on each `ServerProviderModel`. The per-provider `normalizeXxxModelOptionsWithCapabilities` helpers that used to exist in `packages/shared/src/model.ts` have been deleted — the generic descriptor pipeline in `composerProviderState.tsx` handles dispatch uniformly for every provider.
193
193
194
-
The bite: the composer draft store happily stores `{ agent: "..." }` and the TraitsPicker shows the right selection, but `getProviderStateFromCapabilities` runs the dispatch payload through this normalizer. Missing case → `modelSelection.options` becomes `undefined` in the turn → server-side respawn logic never sees an agent change.
194
+
**Kiro agent picker wiring:**`KiroProvider.ts` injects a `buildSelectOptionDescriptor({ id: "agent", label: "Agent", options: ... })` into every model's capabilities when `kiro-cli agent list` returns agents. No per-provider normalizercase is needed.
195
195
196
-
Verify after adding a provider:
196
+
**KiroAdapter reads agent selection via the generic helper:**
**Ideal fix (not yet done):** same `PROVIDER_KINDS` tuple from contracts would let this switch exhaustiveness-check at compile time.
203
-
204
208
### The three-hardcoded-lists bug (composerDraftStore.ts)
205
209
206
210
`composerDraftStore.ts` is the per-thread composer draft store. It has **three hardcoded `ProviderKind` lists** that every new provider must be added to. If you miss any one of them, the symptom is silent:
0 commit comments