From 63fd95c068b1e07c942c5fec4fd12cae2f922a19 Mon Sep 17 00:00:00 2001 From: Luke Parke <5702154+LukasParke@users.noreply.github.com> Date: Fri, 14 Aug 2026 21:34:53 -0500 Subject: [PATCH] fix(lib): derive NextTurnParamsContext.models from the generated request type openrouter-web#34136 widens the models fallback array to (string | ReasonGatedFallbackModel)[] for reason-gated fallback entries. The hand-written NextTurnParamsContext hard-coded string[], which breaks SDK compilation the moment the spec regenerates. Deriving the field from ResponsesRequest['models'] keeps it in lockstep with the generated type: string[] today, the union after regen, no further edits needed. --- src/lib/tool-types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/tool-types.ts b/src/lib/tool-types.ts index a6272f310..81c9b2a6d 100644 --- a/src/lib/tool-types.ts +++ b/src/lib/tool-types.ts @@ -99,8 +99,8 @@ export type NextTurnParamsContext = { input: models.InputsUnion; /** Current model selection */ model: string; - /** Current models array */ - models: string[]; + /** Current models array (fallback model IDs or reason-gated entries) */ + models: NonNullable; /** Current temperature */ temperature: number | null; /** Current maxOutputTokens */