Skip to content

Commit c3757ab

Browse files
Keep as-unknown-as-string cast with explanatory comment for Yutori image content
@ts-expect-error cannot suppress errors reported deep inside multi-line object literals. Restore the working cast and document the API extension. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 6d878f3 commit c3757ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • pkg/templates/typescript/yutori-computer-use

pkg/templates/typescript/yutori-computer-use/loop.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ export async function samplingLoop({
154154
conversationMessages.push({
155155
role: 'tool',
156156
tool_call_id: toolCall.id,
157-
// @ts-expect-error Yutori n1 accepts image content arrays in tool messages
157+
// Yutori n1 accepts image content arrays in tool messages (not yet in OpenAI SDK types)
158158
content: [
159159
{
160160
type: 'image_url',
161161
image_url: {
162162
url: `data:image/webp;base64,${result.base64Image}`,
163163
},
164164
},
165-
],
165+
] as unknown as string,
166166
});
167167
} else if (result.error) {
168168
conversationMessages.push({

0 commit comments

Comments
 (0)