@opencode/ai 2.0.32 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-client.d.ts +2 -2
- package/dist/experimental/evaluation-client.d.ts +1 -1
- package/dist/experimental/evaluation.d.ts +20 -20
- package/dist/experimental/realtime.d.ts +6 -14
- package/dist/experimental/realtime.js +28 -3
- package/dist/experimental/system-one.d.ts +1 -1
- package/dist/image-client.d.ts +8 -8
- package/dist/image.d.ts +593 -437
- package/dist/llm.d.ts +51 -51
- package/dist/media-client.d.ts +1 -1
- package/dist/media.d.ts +4 -4
- package/dist/promise.d.ts +199 -198
- package/dist/protocols/alibaba-chat.d.ts +81 -82
- package/dist/protocols/alibaba-chat.js +0 -1
- package/dist/protocols/alibaba-messages.d.ts +99 -99
- package/dist/protocols/alibaba-responses.d.ts +120 -120
- package/dist/protocols/anthropic-messages.d.ts +187 -187
- package/dist/protocols/anthropic-messages.js +3 -2
- package/dist/protocols/assemblyai-transcription.d.ts +1 -1
- package/dist/protocols/bedrock-converse.d.ts +75 -79
- package/dist/protocols/bfl-images.d.ts +1 -1
- package/dist/protocols/cartesia-speech.d.ts +17 -17
- package/dist/protocols/cohere-chat.d.ts +26 -23
- package/dist/protocols/cohere-chat.js +22 -1
- package/dist/protocols/deepgram-speech.d.ts +17 -17
- package/dist/protocols/deepgram-transcription.d.ts +1 -1
- package/dist/protocols/elevenlabs-speech.d.ts +17 -17
- package/dist/protocols/elevenlabs-transcription.d.ts +1 -1
- package/dist/protocols/fal-images.d.ts +1 -1
- package/dist/protocols/fal-video.d.ts +1 -1
- package/dist/protocols/gemini.d.ts +55 -55
- package/dist/protocols/google-images.d.ts +1 -1
- package/dist/protocols/google-interactions.d.ts +64 -62
- package/dist/protocols/google-interactions.js +19 -1
- package/dist/protocols/google-speech.d.ts +17 -17
- package/dist/protocols/google-transcription.d.ts +47 -47
- package/dist/protocols/google-video.d.ts +1 -1
- package/dist/protocols/meta-messages.d.ts +121 -121
- package/dist/protocols/meta-responses.d.ts +201 -201
- package/dist/protocols/mistral-chat.d.ts +45 -45
- package/dist/protocols/open-responses-channel.d.ts +1 -1
- package/dist/protocols/open-responses.d.ts +584 -450
- package/dist/protocols/open-responses.js +27 -35
- package/dist/protocols/openai-chat.d.ts +248 -248
- package/dist/protocols/openai-chat.js +11 -42
- package/dist/protocols/openai-compatible-chat.d.ts +32 -32
- package/dist/protocols/openai-compatible-responses.d.ts +88 -88
- package/dist/protocols/openai-images.d.ts +17 -17
- package/dist/protocols/openai-responses.d.ts +567 -567
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/protocols/openai-speech.d.ts +17 -17
- package/dist/protocols/openai-transcription.d.ts +47 -47
- package/dist/protocols/replicate-images.d.ts +1 -1
- package/dist/protocols/runway-video.d.ts +1 -1
- package/dist/protocols/shared.d.ts +12 -1
- package/dist/protocols/shared.js +17 -1
- package/dist/protocols/stability-images.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-media.d.ts +4 -4
- package/dist/protocols/utils/openai-options.d.ts +1 -1
- package/dist/protocols/utils/speech-stream.d.ts +1 -1
- package/dist/protocols/utils/tool-schema.d.ts +10 -5
- package/dist/protocols/utils/tool-stream.d.ts +152 -152
- package/dist/protocols/venice-chat.d.ts +109 -110
- package/dist/protocols/venice-chat.js +0 -1
- package/dist/protocols/xai-images.d.ts +1 -1
- package/dist/protocols/xai-responses.d.ts +79 -79
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/zai-chat.d.ts +77 -78
- package/dist/protocols/zai-chat.js +0 -1
- package/dist/protocols/zai-images.d.ts +1 -1
- package/dist/protocols/zai-messages.d.ts +97 -97
- package/dist/providers/alibaba.d.ts +222 -283
- package/dist/providers/amazon-bedrock-mantle.d.ts +291 -298
- package/dist/providers/amazon-bedrock.d.ts +22 -28
- package/dist/providers/anthropic-compatible.d.ts +86 -90
- package/dist/providers/anthropic.d.ts +86 -90
- package/dist/providers/assemblyai.d.ts +2 -6
- package/dist/providers/azure.d.ts +228 -238
- package/dist/providers/baseten.d.ts +66 -70
- package/dist/providers/black-forest-labs.d.ts +2 -6
- package/dist/providers/cartesia.d.ts +2 -6
- package/dist/providers/cerebras.d.ts +66 -70
- package/dist/providers/cerebras.js +0 -1
- package/dist/providers/cloudflare-ai-gateway.d.ts +352 -356
- package/dist/providers/cloudflare-workers-ai.d.ts +66 -70
- package/dist/providers/cohere.d.ts +122 -132
- package/dist/providers/cohere.js +0 -2
- package/dist/providers/deepgram.d.ts +2 -7
- package/dist/providers/deepinfra.d.ts +66 -70
- package/dist/providers/deepinfra.js +0 -1
- package/dist/providers/deepseek.d.ts +66 -70
- package/dist/providers/deepseek.js +1 -1
- package/dist/providers/digitalocean.d.ts +137 -141
- package/dist/providers/elevenlabs.d.ts +2 -7
- package/dist/providers/fal.d.ts +2 -7
- package/dist/providers/fireworks.d.ts +66 -70
- package/dist/providers/google-vertex-chat.d.ts +34 -38
- package/dist/providers/google-vertex-interactions.d.ts +31 -41
- package/dist/providers/google-vertex-messages.d.ts +81 -85
- package/dist/providers/google-vertex-mistral.d.ts +23 -27
- package/dist/providers/google-vertex-responses.d.ts +90 -94
- package/dist/providers/google-vertex.d.ts +26 -30
- package/dist/providers/google.d.ts +94 -109
- package/dist/providers/groq.d.ts +111 -115
- package/dist/providers/groq.js +0 -1
- package/dist/providers/meta.d.ts +309 -317
- package/dist/providers/meta.js +1 -1
- package/dist/providers/minimax.d.ts +296 -303
- package/dist/providers/minimax.js +1 -1
- package/dist/providers/mistral.d.ts +22 -26
- package/dist/providers/moonshot.d.ts +296 -303
- package/dist/providers/moonshot.js +0 -1
- package/dist/providers/openai-compatible-responses.d.ts +90 -94
- package/dist/providers/openai-compatible.d.ts +34 -38
- package/dist/providers/openai.d.ts +93 -108
- package/dist/providers/opencode.d.ts +2 -8
- package/dist/providers/openrouter.d.ts +137 -144
- package/dist/providers/replicate.d.ts +2 -6
- package/dist/providers/runway.d.ts +2 -6
- package/dist/providers/stability.d.ts +2 -7
- package/dist/providers/togetherai.d.ts +66 -70
- package/dist/providers/togetherai.js +1 -1
- package/dist/providers/typesafe-ai.d.ts +2 -8
- package/dist/providers/venice.d.ts +58 -63
- package/dist/providers/vercel-ai-gateway.d.ts +2 -12
- package/dist/providers/xai.d.ts +38 -50
- package/dist/providers/zai-coding-plan.d.ts +206 -213
- package/dist/providers/zai.d.ts +40 -46
- package/dist/route/client.d.ts +51 -51
- package/dist/route/media-protocol.d.ts +1 -1
- package/dist/route/transport/http.d.ts +1 -1
- package/dist/route/transport/websocket.d.ts +8 -8
- package/dist/schema/errors.d.ts +19 -19
- package/dist/schema/events.d.ts +3090 -3288
- package/dist/schema/messages.d.ts +8 -7
- package/dist/schema/options.d.ts +2 -1
- package/dist/schema/options.js +2 -1
- package/dist/speech-client.d.ts +8 -8
- package/dist/speech.d.ts +434 -398
- package/dist/testing.d.ts +338 -338
- package/dist/tool-runtime.d.ts +1 -1
- package/dist/transcription-client.d.ts +23 -23
- package/dist/transcription.d.ts +562 -646
- package/dist/utils/sanitize.d.ts +4 -0
- package/dist/utils/sanitize.js +23 -6
- package/dist/video-client.d.ts +8 -8
- package/dist/video.d.ts +416 -372
- package/package.json +6 -6
|
@@ -252,8 +252,20 @@ export declare const protocol: Protocol<{
|
|
|
252
252
|
readonly file_data: string;
|
|
253
253
|
};
|
|
254
254
|
})[];
|
|
255
|
+
} | {
|
|
256
|
+
readonly role: "tool";
|
|
257
|
+
readonly tool_call_id: string;
|
|
258
|
+
readonly content: string | readonly {
|
|
259
|
+
readonly type: "text";
|
|
260
|
+
readonly text: string;
|
|
261
|
+
readonly cache_control?: {
|
|
262
|
+
readonly type: "ephemeral";
|
|
263
|
+
readonly ttl?: string | undefined;
|
|
264
|
+
} | undefined;
|
|
265
|
+
}[];
|
|
255
266
|
} | {
|
|
256
267
|
readonly [x: string]: unknown;
|
|
268
|
+
readonly role: "assistant";
|
|
257
269
|
readonly content: string | readonly {
|
|
258
270
|
readonly type: "text";
|
|
259
271
|
readonly text: string;
|
|
@@ -262,135 +274,99 @@ export declare const protocol: Protocol<{
|
|
|
262
274
|
readonly ttl?: string | undefined;
|
|
263
275
|
} | undefined;
|
|
264
276
|
}[] | null;
|
|
265
|
-
readonly role: "assistant";
|
|
266
|
-
readonly reasoning?: string | undefined;
|
|
267
|
-
readonly reasoning_content?: string | undefined;
|
|
268
|
-
readonly reasoning_text?: string | undefined;
|
|
269
277
|
readonly tool_calls?: readonly {
|
|
278
|
+
readonly id: string;
|
|
279
|
+
readonly type: "function";
|
|
270
280
|
readonly function: {
|
|
271
281
|
readonly name: string;
|
|
272
282
|
readonly arguments: string;
|
|
273
283
|
};
|
|
274
|
-
readonly id: string;
|
|
275
|
-
readonly type: "function";
|
|
276
284
|
readonly extra_content?: {
|
|
277
285
|
readonly google: {
|
|
278
286
|
readonly thought_signature: string;
|
|
279
287
|
};
|
|
280
288
|
} | undefined;
|
|
281
289
|
}[] | undefined;
|
|
290
|
+
readonly reasoning_content?: string | undefined;
|
|
291
|
+
readonly reasoning?: string | undefined;
|
|
292
|
+
readonly reasoning_text?: string | undefined;
|
|
282
293
|
readonly reasoning_details?: unknown;
|
|
283
|
-
} | {
|
|
284
|
-
readonly role: "tool";
|
|
285
|
-
readonly tool_call_id: string;
|
|
286
|
-
readonly content: string | readonly {
|
|
287
|
-
readonly type: "text";
|
|
288
|
-
readonly text: string;
|
|
289
|
-
readonly cache_control?: {
|
|
290
|
-
readonly type: "ephemeral";
|
|
291
|
-
readonly ttl?: string | undefined;
|
|
292
|
-
} | undefined;
|
|
293
|
-
}[];
|
|
294
294
|
})[];
|
|
295
|
-
readonly stream: true;
|
|
296
|
-
readonly max_completion_tokens?: number | undefined;
|
|
297
|
-
readonly max_tokens?: number | undefined;
|
|
298
|
-
readonly temperature?: number | undefined;
|
|
299
295
|
readonly tools?: readonly {
|
|
296
|
+
readonly type: "function";
|
|
300
297
|
readonly function: {
|
|
301
|
-
readonly description: string;
|
|
302
298
|
readonly name: string;
|
|
299
|
+
readonly description: string;
|
|
303
300
|
readonly parameters: {
|
|
304
301
|
readonly [x: string]: unknown;
|
|
305
302
|
};
|
|
306
303
|
readonly strict?: boolean | undefined;
|
|
307
304
|
};
|
|
308
|
-
readonly type: "function";
|
|
309
305
|
readonly cache_control?: {
|
|
310
306
|
readonly type: "ephemeral";
|
|
311
307
|
readonly ttl?: string | undefined;
|
|
312
308
|
} | undefined;
|
|
313
309
|
}[] | undefined;
|
|
314
|
-
readonly
|
|
315
|
-
readonly seed?: number | undefined;
|
|
316
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
310
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
317
311
|
readonly type: "function";
|
|
318
312
|
readonly function: {
|
|
319
313
|
readonly name: string;
|
|
320
314
|
};
|
|
321
315
|
} | undefined;
|
|
322
|
-
readonly
|
|
323
|
-
readonly frequency_penalty?: number | undefined;
|
|
324
|
-
readonly presence_penalty?: number | undefined;
|
|
325
|
-
readonly store?: boolean | undefined;
|
|
326
|
-
readonly prompt_cache_key?: string | undefined;
|
|
327
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
316
|
+
readonly stream: true;
|
|
328
317
|
readonly stream_options?: {
|
|
329
318
|
readonly include_usage: boolean;
|
|
330
319
|
} | undefined;
|
|
320
|
+
readonly store?: boolean | undefined;
|
|
321
|
+
readonly prompt_cache_key?: string | undefined;
|
|
322
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
331
323
|
readonly tool_stream?: boolean | undefined;
|
|
324
|
+
readonly max_completion_tokens?: number | undefined;
|
|
325
|
+
readonly max_tokens?: number | undefined;
|
|
326
|
+
readonly temperature?: number | undefined;
|
|
327
|
+
readonly top_p?: number | undefined;
|
|
328
|
+
readonly frequency_penalty?: number | undefined;
|
|
329
|
+
readonly presence_penalty?: number | undefined;
|
|
330
|
+
readonly seed?: number | undefined;
|
|
331
|
+
readonly stop?: readonly string[] | undefined;
|
|
332
332
|
}, string, "[DONE]" | {
|
|
333
333
|
readonly [x: string]: unknown;
|
|
334
|
-
readonly error?: {
|
|
335
|
-
readonly [x: string]: unknown;
|
|
336
|
-
readonly message: string;
|
|
337
|
-
readonly code?: string | number | null | undefined;
|
|
338
|
-
} | null | undefined;
|
|
339
|
-
readonly usage?: {
|
|
340
|
-
readonly [x: string]: unknown;
|
|
341
|
-
readonly cache_read_input_tokens?: number | null | undefined;
|
|
342
|
-
readonly cached_tokens?: number | null | undefined;
|
|
343
|
-
readonly total_tokens?: number | null | undefined;
|
|
344
|
-
readonly prompt_tokens?: number | null | undefined;
|
|
345
|
-
readonly completion_tokens?: number | null | undefined;
|
|
346
|
-
readonly prompt_tokens_details?: {
|
|
347
|
-
readonly [x: string]: unknown;
|
|
348
|
-
readonly cached_tokens?: number | null | undefined;
|
|
349
|
-
readonly cache_write_tokens?: number | null | undefined;
|
|
350
|
-
} | null | undefined;
|
|
351
|
-
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
352
|
-
readonly cache_created_input_tokens?: number | null | undefined;
|
|
353
|
-
readonly completion_tokens_details?: {
|
|
354
|
-
readonly [x: string]: unknown;
|
|
355
|
-
readonly reasoning_tokens?: number | null | undefined;
|
|
356
|
-
readonly accepted_prediction_tokens?: number | null | undefined;
|
|
357
|
-
readonly rejected_prediction_tokens?: number | null | undefined;
|
|
358
|
-
} | null | undefined;
|
|
359
|
-
} | null | undefined;
|
|
360
334
|
readonly choices?: readonly {
|
|
361
335
|
readonly [x: string]: unknown;
|
|
362
336
|
readonly delta?: {
|
|
363
337
|
readonly [x: string]: unknown;
|
|
364
|
-
readonly reasoning?: string | null | undefined;
|
|
365
|
-
readonly reasoning_content?: string | null | undefined;
|
|
366
|
-
readonly reasoning_text?: string | null | undefined;
|
|
367
338
|
readonly content?: string | null | undefined;
|
|
368
339
|
readonly refusal?: string | null | undefined;
|
|
340
|
+
readonly reasoning_content?: string | null | undefined;
|
|
341
|
+
readonly reasoning?: string | null | undefined;
|
|
342
|
+
readonly reasoning_text?: string | null | undefined;
|
|
343
|
+
readonly reasoning_details?: unknown;
|
|
369
344
|
readonly tool_calls?: readonly {
|
|
345
|
+
readonly index?: number | null | undefined;
|
|
346
|
+
readonly id?: string | null | undefined;
|
|
370
347
|
readonly function?: {
|
|
371
348
|
readonly name?: string | null | undefined;
|
|
372
349
|
readonly arguments?: string | null | undefined;
|
|
373
350
|
} | null | undefined;
|
|
374
|
-
readonly id?: string | null | undefined;
|
|
375
|
-
readonly index?: number | null | undefined;
|
|
376
351
|
readonly extra_content?: unknown;
|
|
377
352
|
}[] | null | undefined;
|
|
378
|
-
readonly reasoning_details?: unknown;
|
|
379
353
|
} | null | undefined;
|
|
354
|
+
readonly finish_reason?: string | null | undefined;
|
|
355
|
+
readonly native_finish_reason?: string | null | undefined;
|
|
380
356
|
readonly usage?: {
|
|
381
357
|
readonly [x: string]: unknown;
|
|
382
|
-
readonly cache_read_input_tokens?: number | null | undefined;
|
|
383
|
-
readonly cached_tokens?: number | null | undefined;
|
|
384
|
-
readonly total_tokens?: number | null | undefined;
|
|
385
358
|
readonly prompt_tokens?: number | null | undefined;
|
|
386
359
|
readonly completion_tokens?: number | null | undefined;
|
|
360
|
+
readonly total_tokens?: number | null | undefined;
|
|
361
|
+
readonly cached_tokens?: number | null | undefined;
|
|
362
|
+
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
363
|
+
readonly cache_read_input_tokens?: number | null | undefined;
|
|
364
|
+
readonly cache_created_input_tokens?: number | null | undefined;
|
|
387
365
|
readonly prompt_tokens_details?: {
|
|
388
366
|
readonly [x: string]: unknown;
|
|
389
367
|
readonly cached_tokens?: number | null | undefined;
|
|
390
368
|
readonly cache_write_tokens?: number | null | undefined;
|
|
391
369
|
} | null | undefined;
|
|
392
|
-
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
393
|
-
readonly cache_created_input_tokens?: number | null | undefined;
|
|
394
370
|
readonly completion_tokens_details?: {
|
|
395
371
|
readonly [x: string]: unknown;
|
|
396
372
|
readonly reasoning_tokens?: number | null | undefined;
|
|
@@ -398,9 +374,33 @@ export declare const protocol: Protocol<{
|
|
|
398
374
|
readonly rejected_prediction_tokens?: number | null | undefined;
|
|
399
375
|
} | null | undefined;
|
|
400
376
|
} | null | undefined;
|
|
401
|
-
readonly finish_reason?: string | null | undefined;
|
|
402
|
-
readonly native_finish_reason?: string | null | undefined;
|
|
403
377
|
}[] | null | undefined;
|
|
378
|
+
readonly usage?: {
|
|
379
|
+
readonly [x: string]: unknown;
|
|
380
|
+
readonly prompt_tokens?: number | null | undefined;
|
|
381
|
+
readonly completion_tokens?: number | null | undefined;
|
|
382
|
+
readonly total_tokens?: number | null | undefined;
|
|
383
|
+
readonly cached_tokens?: number | null | undefined;
|
|
384
|
+
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
385
|
+
readonly cache_read_input_tokens?: number | null | undefined;
|
|
386
|
+
readonly cache_created_input_tokens?: number | null | undefined;
|
|
387
|
+
readonly prompt_tokens_details?: {
|
|
388
|
+
readonly [x: string]: unknown;
|
|
389
|
+
readonly cached_tokens?: number | null | undefined;
|
|
390
|
+
readonly cache_write_tokens?: number | null | undefined;
|
|
391
|
+
} | null | undefined;
|
|
392
|
+
readonly completion_tokens_details?: {
|
|
393
|
+
readonly [x: string]: unknown;
|
|
394
|
+
readonly reasoning_tokens?: number | null | undefined;
|
|
395
|
+
readonly accepted_prediction_tokens?: number | null | undefined;
|
|
396
|
+
readonly rejected_prediction_tokens?: number | null | undefined;
|
|
397
|
+
} | null | undefined;
|
|
398
|
+
} | null | undefined;
|
|
399
|
+
readonly error?: {
|
|
400
|
+
readonly [x: string]: unknown;
|
|
401
|
+
readonly code?: string | number | null | undefined;
|
|
402
|
+
readonly message: string;
|
|
403
|
+
} | null | undefined;
|
|
404
404
|
}, OpenAIChat.ParserState>;
|
|
405
405
|
export declare const route: Route<{
|
|
406
406
|
readonly [x: string]: any;
|
|
@@ -447,8 +447,20 @@ export declare const route: Route<{
|
|
|
447
447
|
readonly file_data: string;
|
|
448
448
|
};
|
|
449
449
|
})[];
|
|
450
|
+
} | {
|
|
451
|
+
readonly role: "tool";
|
|
452
|
+
readonly tool_call_id: string;
|
|
453
|
+
readonly content: string | readonly {
|
|
454
|
+
readonly type: "text";
|
|
455
|
+
readonly text: string;
|
|
456
|
+
readonly cache_control?: {
|
|
457
|
+
readonly type: "ephemeral";
|
|
458
|
+
readonly ttl?: string | undefined;
|
|
459
|
+
} | undefined;
|
|
460
|
+
}[];
|
|
450
461
|
} | {
|
|
451
462
|
readonly [x: string]: unknown;
|
|
463
|
+
readonly role: "assistant";
|
|
452
464
|
readonly content: string | readonly {
|
|
453
465
|
readonly type: "text";
|
|
454
466
|
readonly text: string;
|
|
@@ -457,73 +469,61 @@ export declare const route: Route<{
|
|
|
457
469
|
readonly ttl?: string | undefined;
|
|
458
470
|
} | undefined;
|
|
459
471
|
}[] | null;
|
|
460
|
-
readonly role: "assistant";
|
|
461
|
-
readonly reasoning?: string | undefined;
|
|
462
|
-
readonly reasoning_content?: string | undefined;
|
|
463
|
-
readonly reasoning_text?: string | undefined;
|
|
464
472
|
readonly tool_calls?: readonly {
|
|
473
|
+
readonly id: string;
|
|
474
|
+
readonly type: "function";
|
|
465
475
|
readonly function: {
|
|
466
476
|
readonly name: string;
|
|
467
477
|
readonly arguments: string;
|
|
468
478
|
};
|
|
469
|
-
readonly id: string;
|
|
470
|
-
readonly type: "function";
|
|
471
479
|
readonly extra_content?: {
|
|
472
480
|
readonly google: {
|
|
473
481
|
readonly thought_signature: string;
|
|
474
482
|
};
|
|
475
483
|
} | undefined;
|
|
476
484
|
}[] | undefined;
|
|
485
|
+
readonly reasoning_content?: string | undefined;
|
|
486
|
+
readonly reasoning?: string | undefined;
|
|
487
|
+
readonly reasoning_text?: string | undefined;
|
|
477
488
|
readonly reasoning_details?: unknown;
|
|
478
|
-
} | {
|
|
479
|
-
readonly role: "tool";
|
|
480
|
-
readonly tool_call_id: string;
|
|
481
|
-
readonly content: string | readonly {
|
|
482
|
-
readonly type: "text";
|
|
483
|
-
readonly text: string;
|
|
484
|
-
readonly cache_control?: {
|
|
485
|
-
readonly type: "ephemeral";
|
|
486
|
-
readonly ttl?: string | undefined;
|
|
487
|
-
} | undefined;
|
|
488
|
-
}[];
|
|
489
489
|
})[];
|
|
490
|
-
readonly stream: true;
|
|
491
|
-
readonly max_completion_tokens?: number | undefined;
|
|
492
|
-
readonly max_tokens?: number | undefined;
|
|
493
|
-
readonly temperature?: number | undefined;
|
|
494
490
|
readonly tools?: readonly {
|
|
491
|
+
readonly type: "function";
|
|
495
492
|
readonly function: {
|
|
496
|
-
readonly description: string;
|
|
497
493
|
readonly name: string;
|
|
494
|
+
readonly description: string;
|
|
498
495
|
readonly parameters: {
|
|
499
496
|
readonly [x: string]: unknown;
|
|
500
497
|
};
|
|
501
498
|
readonly strict?: boolean | undefined;
|
|
502
499
|
};
|
|
503
|
-
readonly type: "function";
|
|
504
500
|
readonly cache_control?: {
|
|
505
501
|
readonly type: "ephemeral";
|
|
506
502
|
readonly ttl?: string | undefined;
|
|
507
503
|
} | undefined;
|
|
508
504
|
}[] | undefined;
|
|
509
|
-
readonly
|
|
510
|
-
readonly seed?: number | undefined;
|
|
511
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
505
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
512
506
|
readonly type: "function";
|
|
513
507
|
readonly function: {
|
|
514
508
|
readonly name: string;
|
|
515
509
|
};
|
|
516
510
|
} | undefined;
|
|
517
|
-
readonly
|
|
518
|
-
readonly frequency_penalty?: number | undefined;
|
|
519
|
-
readonly presence_penalty?: number | undefined;
|
|
520
|
-
readonly store?: boolean | undefined;
|
|
521
|
-
readonly prompt_cache_key?: string | undefined;
|
|
522
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
511
|
+
readonly stream: true;
|
|
523
512
|
readonly stream_options?: {
|
|
524
513
|
readonly include_usage: boolean;
|
|
525
514
|
} | undefined;
|
|
515
|
+
readonly store?: boolean | undefined;
|
|
516
|
+
readonly prompt_cache_key?: string | undefined;
|
|
517
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
526
518
|
readonly tool_stream?: boolean | undefined;
|
|
519
|
+
readonly max_completion_tokens?: number | undefined;
|
|
520
|
+
readonly max_tokens?: number | undefined;
|
|
521
|
+
readonly temperature?: number | undefined;
|
|
522
|
+
readonly top_p?: number | undefined;
|
|
523
|
+
readonly frequency_penalty?: number | undefined;
|
|
524
|
+
readonly presence_penalty?: number | undefined;
|
|
525
|
+
readonly seed?: number | undefined;
|
|
526
|
+
readonly stop?: readonly string[] | undefined;
|
|
527
527
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
|
|
528
528
|
export declare const routes: Route<{
|
|
529
529
|
readonly [x: string]: any;
|
|
@@ -570,8 +570,20 @@ export declare const routes: Route<{
|
|
|
570
570
|
readonly file_data: string;
|
|
571
571
|
};
|
|
572
572
|
})[];
|
|
573
|
+
} | {
|
|
574
|
+
readonly role: "tool";
|
|
575
|
+
readonly tool_call_id: string;
|
|
576
|
+
readonly content: string | readonly {
|
|
577
|
+
readonly type: "text";
|
|
578
|
+
readonly text: string;
|
|
579
|
+
readonly cache_control?: {
|
|
580
|
+
readonly type: "ephemeral";
|
|
581
|
+
readonly ttl?: string | undefined;
|
|
582
|
+
} | undefined;
|
|
583
|
+
}[];
|
|
573
584
|
} | {
|
|
574
585
|
readonly [x: string]: unknown;
|
|
586
|
+
readonly role: "assistant";
|
|
575
587
|
readonly content: string | readonly {
|
|
576
588
|
readonly type: "text";
|
|
577
589
|
readonly text: string;
|
|
@@ -580,73 +592,61 @@ export declare const routes: Route<{
|
|
|
580
592
|
readonly ttl?: string | undefined;
|
|
581
593
|
} | undefined;
|
|
582
594
|
}[] | null;
|
|
583
|
-
readonly role: "assistant";
|
|
584
|
-
readonly reasoning?: string | undefined;
|
|
585
|
-
readonly reasoning_content?: string | undefined;
|
|
586
|
-
readonly reasoning_text?: string | undefined;
|
|
587
595
|
readonly tool_calls?: readonly {
|
|
596
|
+
readonly id: string;
|
|
597
|
+
readonly type: "function";
|
|
588
598
|
readonly function: {
|
|
589
599
|
readonly name: string;
|
|
590
600
|
readonly arguments: string;
|
|
591
601
|
};
|
|
592
|
-
readonly id: string;
|
|
593
|
-
readonly type: "function";
|
|
594
602
|
readonly extra_content?: {
|
|
595
603
|
readonly google: {
|
|
596
604
|
readonly thought_signature: string;
|
|
597
605
|
};
|
|
598
606
|
} | undefined;
|
|
599
607
|
}[] | undefined;
|
|
608
|
+
readonly reasoning_content?: string | undefined;
|
|
609
|
+
readonly reasoning?: string | undefined;
|
|
610
|
+
readonly reasoning_text?: string | undefined;
|
|
600
611
|
readonly reasoning_details?: unknown;
|
|
601
|
-
} | {
|
|
602
|
-
readonly role: "tool";
|
|
603
|
-
readonly tool_call_id: string;
|
|
604
|
-
readonly content: string | readonly {
|
|
605
|
-
readonly type: "text";
|
|
606
|
-
readonly text: string;
|
|
607
|
-
readonly cache_control?: {
|
|
608
|
-
readonly type: "ephemeral";
|
|
609
|
-
readonly ttl?: string | undefined;
|
|
610
|
-
} | undefined;
|
|
611
|
-
}[];
|
|
612
612
|
})[];
|
|
613
|
-
readonly stream: true;
|
|
614
|
-
readonly max_completion_tokens?: number | undefined;
|
|
615
|
-
readonly max_tokens?: number | undefined;
|
|
616
|
-
readonly temperature?: number | undefined;
|
|
617
613
|
readonly tools?: readonly {
|
|
614
|
+
readonly type: "function";
|
|
618
615
|
readonly function: {
|
|
619
|
-
readonly description: string;
|
|
620
616
|
readonly name: string;
|
|
617
|
+
readonly description: string;
|
|
621
618
|
readonly parameters: {
|
|
622
619
|
readonly [x: string]: unknown;
|
|
623
620
|
};
|
|
624
621
|
readonly strict?: boolean | undefined;
|
|
625
622
|
};
|
|
626
|
-
readonly type: "function";
|
|
627
623
|
readonly cache_control?: {
|
|
628
624
|
readonly type: "ephemeral";
|
|
629
625
|
readonly ttl?: string | undefined;
|
|
630
626
|
} | undefined;
|
|
631
627
|
}[] | undefined;
|
|
632
|
-
readonly
|
|
633
|
-
readonly seed?: number | undefined;
|
|
634
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
628
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
635
629
|
readonly type: "function";
|
|
636
630
|
readonly function: {
|
|
637
631
|
readonly name: string;
|
|
638
632
|
};
|
|
639
633
|
} | undefined;
|
|
640
|
-
readonly
|
|
641
|
-
readonly frequency_penalty?: number | undefined;
|
|
642
|
-
readonly presence_penalty?: number | undefined;
|
|
643
|
-
readonly store?: boolean | undefined;
|
|
644
|
-
readonly prompt_cache_key?: string | undefined;
|
|
645
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
634
|
+
readonly stream: true;
|
|
646
635
|
readonly stream_options?: {
|
|
647
636
|
readonly include_usage: boolean;
|
|
648
637
|
} | undefined;
|
|
638
|
+
readonly store?: boolean | undefined;
|
|
639
|
+
readonly prompt_cache_key?: string | undefined;
|
|
640
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
649
641
|
readonly tool_stream?: boolean | undefined;
|
|
642
|
+
readonly max_completion_tokens?: number | undefined;
|
|
643
|
+
readonly max_tokens?: number | undefined;
|
|
644
|
+
readonly temperature?: number | undefined;
|
|
645
|
+
readonly top_p?: number | undefined;
|
|
646
|
+
readonly frequency_penalty?: number | undefined;
|
|
647
|
+
readonly presence_penalty?: number | undefined;
|
|
648
|
+
readonly seed?: number | undefined;
|
|
649
|
+
readonly stop?: readonly string[] | undefined;
|
|
650
650
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
|
|
651
651
|
export declare const configure: (input?: LanguageModelOptions) => {
|
|
652
652
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
@@ -654,7 +654,7 @@ export declare const configure: (input?: LanguageModelOptions) => {
|
|
|
654
654
|
experimental: {
|
|
655
655
|
evaluation: (modelID: string | ModelID) => import("../experimental.js").EvaluationModel<OpenRouterEvaluationOptions>;
|
|
656
656
|
};
|
|
657
|
-
configure:
|
|
657
|
+
configure: typeof configure;
|
|
658
658
|
};
|
|
659
659
|
export declare const provider: {
|
|
660
660
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
@@ -662,14 +662,7 @@ export declare const provider: {
|
|
|
662
662
|
experimental: {
|
|
663
663
|
evaluation: (modelID: string | ModelID) => import("../experimental.js").EvaluationModel<OpenRouterEvaluationOptions>;
|
|
664
664
|
};
|
|
665
|
-
configure:
|
|
666
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
667
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterOptions, import("../route/client.js").CompactionOperations | undefined>;
|
|
668
|
-
experimental: {
|
|
669
|
-
evaluation: (modelID: string | ModelID) => import("../experimental.js").EvaluationModel<OpenRouterEvaluationOptions>;
|
|
670
|
-
};
|
|
671
|
-
configure: /*elided*/ any;
|
|
672
|
-
};
|
|
665
|
+
configure: typeof configure;
|
|
673
666
|
};
|
|
674
667
|
export declare const experimental: {
|
|
675
668
|
evaluation: (modelID: string | ModelID) => import("../experimental.js").EvaluationModel<OpenRouterEvaluationOptions>;
|
|
@@ -11,15 +11,11 @@ export type Config = ProviderAuthOption<"optional"> & {
|
|
|
11
11
|
export declare const configure: (input?: Config) => {
|
|
12
12
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
13
13
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/replicate-images.js").ReplicateImageOptions>;
|
|
14
|
-
configure:
|
|
14
|
+
configure: typeof configure;
|
|
15
15
|
};
|
|
16
16
|
export declare const provider: {
|
|
17
17
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
18
18
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/replicate-images.js").ReplicateImageOptions>;
|
|
19
|
-
configure:
|
|
20
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
21
|
-
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/replicate-images.js").ReplicateImageOptions>;
|
|
22
|
-
configure: /*elided*/ any;
|
|
23
|
-
};
|
|
19
|
+
configure: typeof configure;
|
|
24
20
|
};
|
|
25
21
|
export declare const image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/replicate-images.js").ReplicateImageOptions>;
|
|
@@ -10,15 +10,11 @@ export type Config = ProviderAuthOption<"optional"> & {
|
|
|
10
10
|
export declare const configure: (input?: Config) => {
|
|
11
11
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
12
12
|
video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/runway-video.js").RunwayVideoOptions>;
|
|
13
|
-
configure:
|
|
13
|
+
configure: typeof configure;
|
|
14
14
|
};
|
|
15
15
|
export declare const provider: {
|
|
16
16
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
17
17
|
video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/runway-video.js").RunwayVideoOptions>;
|
|
18
|
-
configure:
|
|
19
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
20
|
-
video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/runway-video.js").RunwayVideoOptions>;
|
|
21
|
-
configure: /*elided*/ any;
|
|
22
|
-
};
|
|
18
|
+
configure: typeof configure;
|
|
23
19
|
};
|
|
24
20
|
export declare const video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/runway-video.js").RunwayVideoOptions>;
|
|
@@ -11,18 +11,13 @@ export declare const configure: (input?: Config) => {
|
|
|
11
11
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
12
12
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/stability-images.js").StabilityImageOptions>;
|
|
13
13
|
upscale: () => import("../image.js").ImageModel<import("../protocols/stability-images.js").StabilityUpscaleOptions>;
|
|
14
|
-
configure:
|
|
14
|
+
configure: typeof configure;
|
|
15
15
|
};
|
|
16
16
|
export declare const provider: {
|
|
17
17
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
18
18
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/stability-images.js").StabilityImageOptions>;
|
|
19
19
|
upscale: () => import("../image.js").ImageModel<import("../protocols/stability-images.js").StabilityUpscaleOptions>;
|
|
20
|
-
configure:
|
|
21
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
22
|
-
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/stability-images.js").StabilityImageOptions>;
|
|
23
|
-
upscale: () => import("../image.js").ImageModel<import("../protocols/stability-images.js").StabilityUpscaleOptions>;
|
|
24
|
-
configure: /*elided*/ any;
|
|
25
|
-
};
|
|
20
|
+
configure: typeof configure;
|
|
26
21
|
};
|
|
27
22
|
export declare const image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/stability-images.js").StabilityImageOptions>;
|
|
28
23
|
export declare const upscale: () => import("../image.js").ImageModel<import("../protocols/stability-images.js").StabilityUpscaleOptions>;
|