@opencode/ai 0.0.0-dev-172 → 0.0.0-dev-176
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/README.md +48 -3
- package/dist/effect.d.ts +1 -1
- package/dist/effect.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/protocols/alibaba-chat.d.ts +39 -4
- package/dist/protocols/alibaba-responses.d.ts +20 -3
- package/dist/protocols/fal-images.d.ts +2 -0
- package/dist/protocols/fal-images.js +1 -0
- package/dist/protocols/meta-responses.d.ts +40 -6
- package/dist/protocols/meta-responses.js +1 -1
- package/dist/protocols/minimax-images.d.ts +25 -0
- package/dist/protocols/minimax-images.js +150 -0
- package/dist/protocols/open-responses.d.ts +182 -27
- package/dist/protocols/open-responses.js +108 -36
- package/dist/protocols/openai-chat.d.ts +438 -46
- package/dist/protocols/openai-chat.js +121 -39
- package/dist/protocols/openai-compatible-chat.d.ts +35 -4
- package/dist/protocols/openai-compatible-responses.d.ts +20 -3
- package/dist/protocols/openai-freeform.d.ts +47 -0
- package/dist/protocols/openai-freeform.js +54 -0
- package/dist/protocols/openai-images.js +8 -2
- package/dist/protocols/openai-responses.d.ts +120 -18
- package/dist/protocols/openai-responses.js +17 -8
- package/dist/protocols/venice-chat.d.ts +39 -4
- package/dist/protocols/venice-chat.js +1 -1
- package/dist/protocols/xai-images.d.ts +1 -0
- package/dist/protocols/xai-images.js +2 -4
- package/dist/protocols/xai-responses.d.ts +20 -3
- package/dist/protocols/xai-responses.js +2 -1
- package/dist/protocols/zai-chat.d.ts +39 -4
- package/dist/providers/alibaba.d.ts +55 -7
- package/dist/providers/amazon-bedrock-mantle.d.ts +55 -7
- package/dist/providers/azure.d.ts +75 -10
- package/dist/providers/baseten.d.ts +70 -8
- package/dist/providers/cerebras.d.ts +70 -8
- package/dist/providers/cloudflare-ai-gateway.d.ts +110 -14
- package/dist/providers/cloudflare-workers-ai.d.ts +70 -8
- package/dist/providers/cohere.d.ts +70 -8
- package/dist/providers/deepinfra.d.ts +70 -8
- package/dist/providers/deepseek.d.ts +70 -8
- package/dist/providers/digitalocean.d.ts +109 -12
- package/dist/providers/fireworks.d.ts +70 -8
- package/dist/providers/google-vertex-chat.d.ts +35 -4
- package/dist/providers/google-vertex-responses.d.ts +20 -3
- package/dist/providers/groq.d.ts +74 -8
- package/dist/providers/meta.d.ts +55 -7
- package/dist/providers/minimax/images.d.ts +3 -0
- package/dist/providers/minimax/images.js +1 -0
- package/dist/providers/minimax.d.ts +62 -8
- package/dist/providers/minimax.js +22 -9
- package/dist/providers/moonshot.d.ts +55 -7
- package/dist/providers/openai-compatible-responses.d.ts +20 -3
- package/dist/providers/openai-compatible.d.ts +35 -4
- package/dist/providers/openai-compatible.js +9 -2
- package/dist/providers/openai.d.ts +55 -7
- package/dist/providers/openrouter.d.ts +144 -16
- package/dist/providers/togetherai.d.ts +70 -8
- package/dist/providers/venice.d.ts +35 -4
- package/dist/providers/xai.d.ts +35 -4
- package/dist/providers/zai-coding-plan.d.ts +55 -7
- package/dist/providers/zai.d.ts +35 -4
- package/dist/schema/messages.d.ts +35 -1
- package/dist/schema/messages.js +20 -0
- package/dist/tool.d.ts +12 -1
- package/dist/tool.js +10 -2
- package/package.json +7 -3
|
@@ -354,7 +354,7 @@ export declare const routes: (Route<{
|
|
|
354
354
|
readonly role: "developer";
|
|
355
355
|
readonly content: string;
|
|
356
356
|
} | {
|
|
357
|
-
readonly type: "function_call_output";
|
|
357
|
+
readonly type: "custom_tool_call_output" | "function_call_output";
|
|
358
358
|
readonly call_id: string;
|
|
359
359
|
readonly output: string | readonly ({
|
|
360
360
|
readonly type: "input_text";
|
|
@@ -424,6 +424,12 @@ export declare const routes: (Route<{
|
|
|
424
424
|
readonly name: string;
|
|
425
425
|
readonly namespace?: string | undefined;
|
|
426
426
|
readonly arguments: string;
|
|
427
|
+
} | {
|
|
428
|
+
readonly type: "custom_tool_call";
|
|
429
|
+
readonly id?: string | undefined;
|
|
430
|
+
readonly call_id: string;
|
|
431
|
+
readonly name: string;
|
|
432
|
+
readonly input: string;
|
|
427
433
|
} | {
|
|
428
434
|
readonly [x: string]: unknown;
|
|
429
435
|
readonly type: "web_search_call";
|
|
@@ -468,6 +474,17 @@ export declare const routes: (Route<{
|
|
|
468
474
|
})[];
|
|
469
475
|
readonly instructions?: string | undefined;
|
|
470
476
|
readonly tools?: readonly ({
|
|
477
|
+
readonly type: "custom";
|
|
478
|
+
readonly name: string;
|
|
479
|
+
readonly description: string;
|
|
480
|
+
readonly format: {
|
|
481
|
+
readonly type: "text";
|
|
482
|
+
} | {
|
|
483
|
+
readonly type: "grammar";
|
|
484
|
+
readonly syntax: "lark" | "regex";
|
|
485
|
+
readonly definition: string;
|
|
486
|
+
};
|
|
487
|
+
} | {
|
|
471
488
|
readonly type: "function";
|
|
472
489
|
readonly name: string;
|
|
473
490
|
readonly description: string;
|
|
@@ -480,13 +497,13 @@ export declare const routes: (Route<{
|
|
|
480
497
|
readonly type: string;
|
|
481
498
|
})[] | undefined;
|
|
482
499
|
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
483
|
-
readonly type: "function";
|
|
500
|
+
readonly type: "custom" | "function";
|
|
484
501
|
readonly name: string;
|
|
485
502
|
} | {
|
|
486
503
|
readonly type: "allowed_tools";
|
|
487
504
|
readonly mode: "auto" | "none" | "required";
|
|
488
505
|
readonly tools: readonly {
|
|
489
|
-
readonly type: "function";
|
|
506
|
+
readonly type: "custom" | "function";
|
|
490
507
|
readonly name: string;
|
|
491
508
|
}[];
|
|
492
509
|
} | undefined;
|
|
@@ -594,7 +611,14 @@ export declare const routes: (Route<{
|
|
|
594
611
|
readonly ttl?: string | undefined;
|
|
595
612
|
} | undefined;
|
|
596
613
|
}[] | null;
|
|
597
|
-
readonly tool_calls?: readonly {
|
|
614
|
+
readonly tool_calls?: readonly ({
|
|
615
|
+
readonly id: string;
|
|
616
|
+
readonly type: "custom";
|
|
617
|
+
readonly custom: {
|
|
618
|
+
readonly name: string;
|
|
619
|
+
readonly input: string;
|
|
620
|
+
};
|
|
621
|
+
} | {
|
|
598
622
|
readonly id: string;
|
|
599
623
|
readonly type: "function";
|
|
600
624
|
readonly function: {
|
|
@@ -606,13 +630,13 @@ export declare const routes: (Route<{
|
|
|
606
630
|
readonly thought_signature: string;
|
|
607
631
|
};
|
|
608
632
|
} | undefined;
|
|
609
|
-
}[] | undefined;
|
|
633
|
+
})[] | undefined;
|
|
610
634
|
readonly reasoning_content?: string | undefined;
|
|
611
635
|
readonly reasoning?: string | undefined;
|
|
612
636
|
readonly reasoning_text?: string | undefined;
|
|
613
637
|
readonly reasoning_details?: unknown;
|
|
614
638
|
})[];
|
|
615
|
-
readonly tools?: readonly {
|
|
639
|
+
readonly tools?: readonly ({
|
|
616
640
|
readonly type: "function";
|
|
617
641
|
readonly function: {
|
|
618
642
|
readonly name: string;
|
|
@@ -626,12 +650,36 @@ export declare const routes: (Route<{
|
|
|
626
650
|
readonly type: "ephemeral";
|
|
627
651
|
readonly ttl?: string | undefined;
|
|
628
652
|
} | undefined;
|
|
629
|
-
}
|
|
653
|
+
} | {
|
|
654
|
+
readonly type: "custom";
|
|
655
|
+
readonly custom: {
|
|
656
|
+
readonly name: string;
|
|
657
|
+
readonly description: string;
|
|
658
|
+
readonly format: {
|
|
659
|
+
readonly type: "text";
|
|
660
|
+
} | {
|
|
661
|
+
readonly type: "grammar";
|
|
662
|
+
readonly grammar: {
|
|
663
|
+
readonly syntax: "lark" | "regex";
|
|
664
|
+
readonly definition: string;
|
|
665
|
+
};
|
|
666
|
+
};
|
|
667
|
+
};
|
|
668
|
+
readonly cache_control?: {
|
|
669
|
+
readonly type: "ephemeral";
|
|
670
|
+
readonly ttl?: string | undefined;
|
|
671
|
+
} | undefined;
|
|
672
|
+
})[] | undefined;
|
|
630
673
|
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
631
674
|
readonly type: "function";
|
|
632
675
|
readonly function: {
|
|
633
676
|
readonly name: string;
|
|
634
677
|
};
|
|
678
|
+
} | {
|
|
679
|
+
readonly type: "custom";
|
|
680
|
+
readonly custom: {
|
|
681
|
+
readonly name: string;
|
|
682
|
+
};
|
|
635
683
|
} | undefined;
|
|
636
684
|
readonly stream: true;
|
|
637
685
|
readonly stream_options?: {
|
|
@@ -31,7 +31,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
31
31
|
readonly role: "developer";
|
|
32
32
|
readonly content: string;
|
|
33
33
|
} | {
|
|
34
|
-
readonly type: "function_call_output";
|
|
34
|
+
readonly type: "custom_tool_call_output" | "function_call_output";
|
|
35
35
|
readonly call_id: string;
|
|
36
36
|
readonly output: string | readonly ({
|
|
37
37
|
readonly type: "input_text";
|
|
@@ -101,6 +101,12 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
101
101
|
readonly name: string;
|
|
102
102
|
readonly namespace?: string | undefined;
|
|
103
103
|
readonly arguments: string;
|
|
104
|
+
} | {
|
|
105
|
+
readonly type: "custom_tool_call";
|
|
106
|
+
readonly id?: string | undefined;
|
|
107
|
+
readonly call_id: string;
|
|
108
|
+
readonly name: string;
|
|
109
|
+
readonly input: string;
|
|
104
110
|
} | {
|
|
105
111
|
readonly [x: string]: unknown;
|
|
106
112
|
readonly type: "web_search_call";
|
|
@@ -145,6 +151,17 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
145
151
|
})[];
|
|
146
152
|
readonly instructions?: string | undefined;
|
|
147
153
|
readonly tools?: readonly ({
|
|
154
|
+
readonly type: "custom";
|
|
155
|
+
readonly name: string;
|
|
156
|
+
readonly description: string;
|
|
157
|
+
readonly format: {
|
|
158
|
+
readonly type: "text";
|
|
159
|
+
} | {
|
|
160
|
+
readonly type: "grammar";
|
|
161
|
+
readonly syntax: "lark" | "regex";
|
|
162
|
+
readonly definition: string;
|
|
163
|
+
};
|
|
164
|
+
} | {
|
|
148
165
|
readonly type: "function";
|
|
149
166
|
readonly name: string;
|
|
150
167
|
readonly description: string;
|
|
@@ -157,13 +174,13 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
157
174
|
readonly type: string;
|
|
158
175
|
})[] | undefined;
|
|
159
176
|
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
160
|
-
readonly type: "function";
|
|
177
|
+
readonly type: "custom" | "function";
|
|
161
178
|
readonly name: string;
|
|
162
179
|
} | {
|
|
163
180
|
readonly type: "allowed_tools";
|
|
164
181
|
readonly mode: "auto" | "none" | "required";
|
|
165
182
|
readonly tools: readonly {
|
|
166
|
-
readonly type: "function";
|
|
183
|
+
readonly type: "custom" | "function";
|
|
167
184
|
readonly name: string;
|
|
168
185
|
}[];
|
|
169
186
|
} | undefined;
|
|
@@ -90,7 +90,14 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
90
90
|
readonly ttl?: string | undefined;
|
|
91
91
|
} | undefined;
|
|
92
92
|
}[] | null;
|
|
93
|
-
readonly tool_calls?: readonly {
|
|
93
|
+
readonly tool_calls?: readonly ({
|
|
94
|
+
readonly id: string;
|
|
95
|
+
readonly type: "custom";
|
|
96
|
+
readonly custom: {
|
|
97
|
+
readonly name: string;
|
|
98
|
+
readonly input: string;
|
|
99
|
+
};
|
|
100
|
+
} | {
|
|
94
101
|
readonly id: string;
|
|
95
102
|
readonly type: "function";
|
|
96
103
|
readonly function: {
|
|
@@ -102,13 +109,13 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
102
109
|
readonly thought_signature: string;
|
|
103
110
|
};
|
|
104
111
|
} | undefined;
|
|
105
|
-
}[] | undefined;
|
|
112
|
+
})[] | undefined;
|
|
106
113
|
readonly reasoning_content?: string | undefined;
|
|
107
114
|
readonly reasoning?: string | undefined;
|
|
108
115
|
readonly reasoning_text?: string | undefined;
|
|
109
116
|
readonly reasoning_details?: unknown;
|
|
110
117
|
})[];
|
|
111
|
-
readonly tools?: readonly {
|
|
118
|
+
readonly tools?: readonly ({
|
|
112
119
|
readonly type: "function";
|
|
113
120
|
readonly function: {
|
|
114
121
|
readonly name: string;
|
|
@@ -122,12 +129,36 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
122
129
|
readonly type: "ephemeral";
|
|
123
130
|
readonly ttl?: string | undefined;
|
|
124
131
|
} | undefined;
|
|
125
|
-
}
|
|
132
|
+
} | {
|
|
133
|
+
readonly type: "custom";
|
|
134
|
+
readonly custom: {
|
|
135
|
+
readonly name: string;
|
|
136
|
+
readonly description: string;
|
|
137
|
+
readonly format: {
|
|
138
|
+
readonly type: "text";
|
|
139
|
+
} | {
|
|
140
|
+
readonly type: "grammar";
|
|
141
|
+
readonly grammar: {
|
|
142
|
+
readonly syntax: "lark" | "regex";
|
|
143
|
+
readonly definition: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
readonly cache_control?: {
|
|
148
|
+
readonly type: "ephemeral";
|
|
149
|
+
readonly ttl?: string | undefined;
|
|
150
|
+
} | undefined;
|
|
151
|
+
})[] | undefined;
|
|
126
152
|
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
127
153
|
readonly type: "function";
|
|
128
154
|
readonly function: {
|
|
129
155
|
readonly name: string;
|
|
130
156
|
};
|
|
157
|
+
} | {
|
|
158
|
+
readonly type: "custom";
|
|
159
|
+
readonly custom: {
|
|
160
|
+
readonly name: string;
|
|
161
|
+
};
|
|
131
162
|
} | undefined;
|
|
132
163
|
readonly stream: true;
|
|
133
164
|
readonly stream_options?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProviderID } from "../schema/index.js";
|
|
1
|
+
import { mergeProviderOptions, ProviderID } from "../schema/index.js";
|
|
2
2
|
import { OpenAICompatibleChat } from "../protocols/openai-compatible-chat.js";
|
|
3
3
|
import { OpenAIImages } from "../protocols/openai-images.js";
|
|
4
4
|
import { MediaRoute } from "../route/media.js";
|
|
@@ -19,7 +19,14 @@ export const configure = (input) => {
|
|
|
19
19
|
return {
|
|
20
20
|
id: ProviderID.make(provider),
|
|
21
21
|
model: (modelID) => route.model({ id: modelID }),
|
|
22
|
-
|
|
22
|
+
// Many compatible hosts default to hosted URLs. GPT Image models always return bytes and reject the field; a
|
|
23
|
+
// proxy serving one under another name can drop the default with `response_format: null`.
|
|
24
|
+
image: (modelID, providerOptions) => OpenAIImages.model({
|
|
25
|
+
...media,
|
|
26
|
+
id: modelID,
|
|
27
|
+
provider,
|
|
28
|
+
providerOptions: mergeProviderOptions(/gpt-image|chatgpt-image/.test(modelID) ? undefined : { response_format: "b64_json" }, providerOptions),
|
|
29
|
+
}),
|
|
23
30
|
configure,
|
|
24
31
|
};
|
|
25
32
|
};
|
|
@@ -87,7 +87,14 @@ export declare const routes: (Route<{
|
|
|
87
87
|
readonly ttl?: string | undefined;
|
|
88
88
|
} | undefined;
|
|
89
89
|
}[] | null;
|
|
90
|
-
readonly tool_calls?: readonly {
|
|
90
|
+
readonly tool_calls?: readonly ({
|
|
91
|
+
readonly id: string;
|
|
92
|
+
readonly type: "custom";
|
|
93
|
+
readonly custom: {
|
|
94
|
+
readonly name: string;
|
|
95
|
+
readonly input: string;
|
|
96
|
+
};
|
|
97
|
+
} | {
|
|
91
98
|
readonly id: string;
|
|
92
99
|
readonly type: "function";
|
|
93
100
|
readonly function: {
|
|
@@ -99,13 +106,13 @@ export declare const routes: (Route<{
|
|
|
99
106
|
readonly thought_signature: string;
|
|
100
107
|
};
|
|
101
108
|
} | undefined;
|
|
102
|
-
}[] | undefined;
|
|
109
|
+
})[] | undefined;
|
|
103
110
|
readonly reasoning_content?: string | undefined;
|
|
104
111
|
readonly reasoning?: string | undefined;
|
|
105
112
|
readonly reasoning_text?: string | undefined;
|
|
106
113
|
readonly reasoning_details?: unknown;
|
|
107
114
|
})[];
|
|
108
|
-
readonly tools?: readonly {
|
|
115
|
+
readonly tools?: readonly ({
|
|
109
116
|
readonly type: "function";
|
|
110
117
|
readonly function: {
|
|
111
118
|
readonly name: string;
|
|
@@ -119,12 +126,36 @@ export declare const routes: (Route<{
|
|
|
119
126
|
readonly type: "ephemeral";
|
|
120
127
|
readonly ttl?: string | undefined;
|
|
121
128
|
} | undefined;
|
|
122
|
-
}
|
|
129
|
+
} | {
|
|
130
|
+
readonly type: "custom";
|
|
131
|
+
readonly custom: {
|
|
132
|
+
readonly name: string;
|
|
133
|
+
readonly description: string;
|
|
134
|
+
readonly format: {
|
|
135
|
+
readonly type: "text";
|
|
136
|
+
} | {
|
|
137
|
+
readonly type: "grammar";
|
|
138
|
+
readonly grammar: {
|
|
139
|
+
readonly syntax: "lark" | "regex";
|
|
140
|
+
readonly definition: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
readonly cache_control?: {
|
|
145
|
+
readonly type: "ephemeral";
|
|
146
|
+
readonly ttl?: string | undefined;
|
|
147
|
+
} | undefined;
|
|
148
|
+
})[] | undefined;
|
|
123
149
|
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
124
150
|
readonly type: "function";
|
|
125
151
|
readonly function: {
|
|
126
152
|
readonly name: string;
|
|
127
153
|
};
|
|
154
|
+
} | {
|
|
155
|
+
readonly type: "custom";
|
|
156
|
+
readonly custom: {
|
|
157
|
+
readonly name: string;
|
|
158
|
+
};
|
|
128
159
|
} | undefined;
|
|
129
160
|
readonly stream: true;
|
|
130
161
|
readonly stream_options?: {
|
|
@@ -169,7 +200,7 @@ export declare const routes: (Route<{
|
|
|
169
200
|
readonly role: "developer";
|
|
170
201
|
readonly content: string;
|
|
171
202
|
} | {
|
|
172
|
-
readonly type: "function_call_output";
|
|
203
|
+
readonly type: "custom_tool_call_output" | "function_call_output";
|
|
173
204
|
readonly call_id: string;
|
|
174
205
|
readonly output: string | readonly ({
|
|
175
206
|
readonly type: "input_text";
|
|
@@ -239,6 +270,12 @@ export declare const routes: (Route<{
|
|
|
239
270
|
readonly name: string;
|
|
240
271
|
readonly namespace?: string | undefined;
|
|
241
272
|
readonly arguments: string;
|
|
273
|
+
} | {
|
|
274
|
+
readonly type: "custom_tool_call";
|
|
275
|
+
readonly id?: string | undefined;
|
|
276
|
+
readonly call_id: string;
|
|
277
|
+
readonly name: string;
|
|
278
|
+
readonly input: string;
|
|
242
279
|
} | {
|
|
243
280
|
readonly [x: string]: unknown;
|
|
244
281
|
readonly type: "web_search_call";
|
|
@@ -310,6 +347,17 @@ export declare const routes: (Route<{
|
|
|
310
347
|
readonly ttl?: string | undefined;
|
|
311
348
|
} | undefined;
|
|
312
349
|
readonly tools?: readonly ({
|
|
350
|
+
readonly type: "custom";
|
|
351
|
+
readonly name: string;
|
|
352
|
+
readonly description: string;
|
|
353
|
+
readonly format: {
|
|
354
|
+
readonly type: "text";
|
|
355
|
+
} | {
|
|
356
|
+
readonly type: "grammar";
|
|
357
|
+
readonly syntax: "lark" | "regex";
|
|
358
|
+
readonly definition: string;
|
|
359
|
+
};
|
|
360
|
+
} | {
|
|
313
361
|
readonly type: "namespace";
|
|
314
362
|
readonly name: string;
|
|
315
363
|
readonly description: string;
|
|
@@ -342,13 +390,13 @@ export declare const routes: (Route<{
|
|
|
342
390
|
readonly size?: string | undefined;
|
|
343
391
|
})[] | undefined;
|
|
344
392
|
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
345
|
-
readonly type: "function";
|
|
393
|
+
readonly type: "custom" | "function";
|
|
346
394
|
readonly name: string;
|
|
347
395
|
} | {
|
|
348
396
|
readonly type: "allowed_tools";
|
|
349
397
|
readonly mode: "auto" | "none" | "required";
|
|
350
398
|
readonly tools: readonly {
|
|
351
|
-
readonly type: "function";
|
|
399
|
+
readonly type: "custom" | "function";
|
|
352
400
|
readonly name: string;
|
|
353
401
|
}[];
|
|
354
402
|
} | {
|
|
@@ -151,7 +151,7 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
|
|
|
151
151
|
readonly ttl: Schema.optional<Schema.String>;
|
|
152
152
|
}>>;
|
|
153
153
|
}>>]>>;
|
|
154
|
-
readonly tool_calls: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
154
|
+
readonly tool_calls: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
155
155
|
readonly id: Schema.String;
|
|
156
156
|
readonly type: Schema.tag<"function">;
|
|
157
157
|
readonly function: Schema.Struct<{
|
|
@@ -163,7 +163,14 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
|
|
|
163
163
|
readonly thought_signature: Schema.String;
|
|
164
164
|
}>;
|
|
165
165
|
}>>;
|
|
166
|
-
}
|
|
166
|
+
}>, Schema.Struct<{
|
|
167
|
+
readonly id: Schema.String;
|
|
168
|
+
readonly type: Schema.tag<"custom">;
|
|
169
|
+
readonly custom: Schema.Struct<{
|
|
170
|
+
readonly name: Schema.String;
|
|
171
|
+
readonly input: Schema.String;
|
|
172
|
+
}>;
|
|
173
|
+
}>]>>>;
|
|
167
174
|
readonly reasoning_content: Schema.optional<Schema.String>;
|
|
168
175
|
readonly reasoning: Schema.optional<Schema.String>;
|
|
169
176
|
readonly reasoning_text: Schema.optional<Schema.String>;
|
|
@@ -180,7 +187,7 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
|
|
|
180
187
|
}>>;
|
|
181
188
|
}>>]>;
|
|
182
189
|
}>]>>;
|
|
183
|
-
readonly tools: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
190
|
+
readonly tools: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
184
191
|
readonly type: Schema.tag<"function">;
|
|
185
192
|
readonly function: Schema.Struct<{
|
|
186
193
|
readonly name: Schema.String;
|
|
@@ -192,12 +199,36 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
|
|
|
192
199
|
readonly type: Schema.Literal<"ephemeral">;
|
|
193
200
|
readonly ttl: Schema.optional<Schema.String>;
|
|
194
201
|
}>>;
|
|
195
|
-
}
|
|
202
|
+
}>, Schema.Struct<{
|
|
203
|
+
readonly type: Schema.tag<"custom">;
|
|
204
|
+
readonly custom: Schema.Struct<{
|
|
205
|
+
readonly name: Schema.String;
|
|
206
|
+
readonly description: Schema.String;
|
|
207
|
+
readonly format: Schema.Union<readonly [Schema.Struct<{
|
|
208
|
+
readonly type: Schema.tag<"text">;
|
|
209
|
+
}>, Schema.Struct<{
|
|
210
|
+
readonly type: Schema.tag<"grammar">;
|
|
211
|
+
readonly grammar: Schema.Struct<{
|
|
212
|
+
readonly syntax: Schema.Literals<readonly ["lark", "regex"]>;
|
|
213
|
+
readonly definition: Schema.String;
|
|
214
|
+
}>;
|
|
215
|
+
}>]>;
|
|
216
|
+
}>;
|
|
217
|
+
readonly cache_control: Schema.optional<Schema.Struct<{
|
|
218
|
+
readonly type: Schema.Literal<"ephemeral">;
|
|
219
|
+
readonly ttl: Schema.optional<Schema.String>;
|
|
220
|
+
}>>;
|
|
221
|
+
}>]>>>;
|
|
196
222
|
readonly tool_choice: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
|
|
197
223
|
readonly type: Schema.tag<"function">;
|
|
198
224
|
readonly function: Schema.Struct<{
|
|
199
225
|
readonly name: Schema.String;
|
|
200
226
|
}>;
|
|
227
|
+
}>, Schema.Struct<{
|
|
228
|
+
readonly type: Schema.tag<"custom">;
|
|
229
|
+
readonly custom: Schema.Struct<{
|
|
230
|
+
readonly name: Schema.String;
|
|
231
|
+
}>;
|
|
201
232
|
}>]>>;
|
|
202
233
|
readonly stream: Schema.Literal<true>;
|
|
203
234
|
readonly stream_options: Schema.optional<Schema.Struct<{
|
|
@@ -310,7 +341,14 @@ export declare const protocol: Protocol<{
|
|
|
310
341
|
readonly ttl?: string | undefined;
|
|
311
342
|
} | undefined;
|
|
312
343
|
}[] | null;
|
|
313
|
-
readonly tool_calls?: readonly {
|
|
344
|
+
readonly tool_calls?: readonly ({
|
|
345
|
+
readonly id: string;
|
|
346
|
+
readonly type: "custom";
|
|
347
|
+
readonly custom: {
|
|
348
|
+
readonly name: string;
|
|
349
|
+
readonly input: string;
|
|
350
|
+
};
|
|
351
|
+
} | {
|
|
314
352
|
readonly id: string;
|
|
315
353
|
readonly type: "function";
|
|
316
354
|
readonly function: {
|
|
@@ -322,13 +360,13 @@ export declare const protocol: Protocol<{
|
|
|
322
360
|
readonly thought_signature: string;
|
|
323
361
|
};
|
|
324
362
|
} | undefined;
|
|
325
|
-
}[] | undefined;
|
|
363
|
+
})[] | undefined;
|
|
326
364
|
readonly reasoning_content?: string | undefined;
|
|
327
365
|
readonly reasoning?: string | undefined;
|
|
328
366
|
readonly reasoning_text?: string | undefined;
|
|
329
367
|
readonly reasoning_details?: unknown;
|
|
330
368
|
})[];
|
|
331
|
-
tools?: readonly {
|
|
369
|
+
tools?: readonly ({
|
|
332
370
|
readonly type: "function";
|
|
333
371
|
readonly function: {
|
|
334
372
|
readonly name: string;
|
|
@@ -342,12 +380,36 @@ export declare const protocol: Protocol<{
|
|
|
342
380
|
readonly type: "ephemeral";
|
|
343
381
|
readonly ttl?: string | undefined;
|
|
344
382
|
} | undefined;
|
|
345
|
-
}
|
|
383
|
+
} | {
|
|
384
|
+
readonly type: "custom";
|
|
385
|
+
readonly custom: {
|
|
386
|
+
readonly name: string;
|
|
387
|
+
readonly description: string;
|
|
388
|
+
readonly format: {
|
|
389
|
+
readonly type: "text";
|
|
390
|
+
} | {
|
|
391
|
+
readonly type: "grammar";
|
|
392
|
+
readonly grammar: {
|
|
393
|
+
readonly syntax: "lark" | "regex";
|
|
394
|
+
readonly definition: string;
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
readonly cache_control?: {
|
|
399
|
+
readonly type: "ephemeral";
|
|
400
|
+
readonly ttl?: string | undefined;
|
|
401
|
+
} | undefined;
|
|
402
|
+
})[] | undefined;
|
|
346
403
|
tool_choice?: "auto" | "none" | "required" | {
|
|
347
404
|
readonly type: "function";
|
|
348
405
|
readonly function: {
|
|
349
406
|
readonly name: string;
|
|
350
407
|
};
|
|
408
|
+
} | {
|
|
409
|
+
readonly type: "custom";
|
|
410
|
+
readonly custom: {
|
|
411
|
+
readonly name: string;
|
|
412
|
+
};
|
|
351
413
|
} | undefined;
|
|
352
414
|
stream: true;
|
|
353
415
|
stream_options?: {
|
|
@@ -413,6 +475,10 @@ export declare const protocol: Protocol<{
|
|
|
413
475
|
readonly name?: string | null | undefined;
|
|
414
476
|
readonly arguments?: string | null | undefined;
|
|
415
477
|
} | null | undefined;
|
|
478
|
+
readonly custom?: {
|
|
479
|
+
readonly name?: string | null | undefined;
|
|
480
|
+
readonly input?: string | null | undefined;
|
|
481
|
+
} | null | undefined;
|
|
416
482
|
readonly extra_content?: unknown;
|
|
417
483
|
}[] | null | undefined;
|
|
418
484
|
} | null | undefined;
|
|
@@ -543,7 +609,14 @@ export declare const route: Route<{
|
|
|
543
609
|
readonly ttl?: string | undefined;
|
|
544
610
|
} | undefined;
|
|
545
611
|
}[] | null;
|
|
546
|
-
readonly tool_calls?: readonly {
|
|
612
|
+
readonly tool_calls?: readonly ({
|
|
613
|
+
readonly id: string;
|
|
614
|
+
readonly type: "custom";
|
|
615
|
+
readonly custom: {
|
|
616
|
+
readonly name: string;
|
|
617
|
+
readonly input: string;
|
|
618
|
+
};
|
|
619
|
+
} | {
|
|
547
620
|
readonly id: string;
|
|
548
621
|
readonly type: "function";
|
|
549
622
|
readonly function: {
|
|
@@ -555,13 +628,13 @@ export declare const route: Route<{
|
|
|
555
628
|
readonly thought_signature: string;
|
|
556
629
|
};
|
|
557
630
|
} | undefined;
|
|
558
|
-
}[] | undefined;
|
|
631
|
+
})[] | undefined;
|
|
559
632
|
readonly reasoning_content?: string | undefined;
|
|
560
633
|
readonly reasoning?: string | undefined;
|
|
561
634
|
readonly reasoning_text?: string | undefined;
|
|
562
635
|
readonly reasoning_details?: unknown;
|
|
563
636
|
})[];
|
|
564
|
-
tools?: readonly {
|
|
637
|
+
tools?: readonly ({
|
|
565
638
|
readonly type: "function";
|
|
566
639
|
readonly function: {
|
|
567
640
|
readonly name: string;
|
|
@@ -575,12 +648,36 @@ export declare const route: Route<{
|
|
|
575
648
|
readonly type: "ephemeral";
|
|
576
649
|
readonly ttl?: string | undefined;
|
|
577
650
|
} | undefined;
|
|
578
|
-
}
|
|
651
|
+
} | {
|
|
652
|
+
readonly type: "custom";
|
|
653
|
+
readonly custom: {
|
|
654
|
+
readonly name: string;
|
|
655
|
+
readonly description: string;
|
|
656
|
+
readonly format: {
|
|
657
|
+
readonly type: "text";
|
|
658
|
+
} | {
|
|
659
|
+
readonly type: "grammar";
|
|
660
|
+
readonly grammar: {
|
|
661
|
+
readonly syntax: "lark" | "regex";
|
|
662
|
+
readonly definition: string;
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
};
|
|
666
|
+
readonly cache_control?: {
|
|
667
|
+
readonly type: "ephemeral";
|
|
668
|
+
readonly ttl?: string | undefined;
|
|
669
|
+
} | undefined;
|
|
670
|
+
})[] | undefined;
|
|
579
671
|
tool_choice?: "auto" | "none" | "required" | {
|
|
580
672
|
readonly type: "function";
|
|
581
673
|
readonly function: {
|
|
582
674
|
readonly name: string;
|
|
583
675
|
};
|
|
676
|
+
} | {
|
|
677
|
+
readonly type: "custom";
|
|
678
|
+
readonly custom: {
|
|
679
|
+
readonly name: string;
|
|
680
|
+
};
|
|
584
681
|
} | undefined;
|
|
585
682
|
stream: true;
|
|
586
683
|
stream_options?: {
|
|
@@ -704,7 +801,14 @@ export declare const routes: Route<{
|
|
|
704
801
|
readonly ttl?: string | undefined;
|
|
705
802
|
} | undefined;
|
|
706
803
|
}[] | null;
|
|
707
|
-
readonly tool_calls?: readonly {
|
|
804
|
+
readonly tool_calls?: readonly ({
|
|
805
|
+
readonly id: string;
|
|
806
|
+
readonly type: "custom";
|
|
807
|
+
readonly custom: {
|
|
808
|
+
readonly name: string;
|
|
809
|
+
readonly input: string;
|
|
810
|
+
};
|
|
811
|
+
} | {
|
|
708
812
|
readonly id: string;
|
|
709
813
|
readonly type: "function";
|
|
710
814
|
readonly function: {
|
|
@@ -716,13 +820,13 @@ export declare const routes: Route<{
|
|
|
716
820
|
readonly thought_signature: string;
|
|
717
821
|
};
|
|
718
822
|
} | undefined;
|
|
719
|
-
}[] | undefined;
|
|
823
|
+
})[] | undefined;
|
|
720
824
|
readonly reasoning_content?: string | undefined;
|
|
721
825
|
readonly reasoning?: string | undefined;
|
|
722
826
|
readonly reasoning_text?: string | undefined;
|
|
723
827
|
readonly reasoning_details?: unknown;
|
|
724
828
|
})[];
|
|
725
|
-
tools?: readonly {
|
|
829
|
+
tools?: readonly ({
|
|
726
830
|
readonly type: "function";
|
|
727
831
|
readonly function: {
|
|
728
832
|
readonly name: string;
|
|
@@ -736,12 +840,36 @@ export declare const routes: Route<{
|
|
|
736
840
|
readonly type: "ephemeral";
|
|
737
841
|
readonly ttl?: string | undefined;
|
|
738
842
|
} | undefined;
|
|
739
|
-
}
|
|
843
|
+
} | {
|
|
844
|
+
readonly type: "custom";
|
|
845
|
+
readonly custom: {
|
|
846
|
+
readonly name: string;
|
|
847
|
+
readonly description: string;
|
|
848
|
+
readonly format: {
|
|
849
|
+
readonly type: "text";
|
|
850
|
+
} | {
|
|
851
|
+
readonly type: "grammar";
|
|
852
|
+
readonly grammar: {
|
|
853
|
+
readonly syntax: "lark" | "regex";
|
|
854
|
+
readonly definition: string;
|
|
855
|
+
};
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
readonly cache_control?: {
|
|
859
|
+
readonly type: "ephemeral";
|
|
860
|
+
readonly ttl?: string | undefined;
|
|
861
|
+
} | undefined;
|
|
862
|
+
})[] | undefined;
|
|
740
863
|
tool_choice?: "auto" | "none" | "required" | {
|
|
741
864
|
readonly type: "function";
|
|
742
865
|
readonly function: {
|
|
743
866
|
readonly name: string;
|
|
744
867
|
};
|
|
868
|
+
} | {
|
|
869
|
+
readonly type: "custom";
|
|
870
|
+
readonly custom: {
|
|
871
|
+
readonly name: string;
|
|
872
|
+
};
|
|
745
873
|
} | undefined;
|
|
746
874
|
stream: true;
|
|
747
875
|
stream_options?: {
|