Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/next-turn-models-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openrouter/agent': patch
---

Type `NextTurnParamsContext.models` as `NonNullable<models.ResponsesRequest['models']>` instead of a hand-written `string[]`. It now follows the SDK's generated request type: `string[]` today, and reason-gated fallback entries once the SDK spec regenerates. With the current SDK there is no type change.
8 changes: 6 additions & 2 deletions packages/agent/src/lib/tool-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,12 @@ export type NextTurnParamsContext = {
toolChoice: models.ResponsesRequest['toolChoice'];
/** Current model selection */
model: string;
/** Current models array */
models: string[];
/**
* Current models array (fallback model IDs, or reason-gated fallback
* entries once the SDK spec includes them). Derived from the SDK request
* type so it tracks the generated shape.
*/
models: NonNullable<models.ResponsesRequest['models']>;
/** Current temperature */
temperature: number | null;
/** Current maxOutputTokens */
Expand Down
Loading