@opencode-ai/ai 0.0.0-dev-17675 → 0.0.0-dev-17681
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/protocols/anthropic-messages.d.ts +22 -22
- package/dist/protocols/gemini.d.ts +3 -3
- package/dist/protocols/open-responses.d.ts +33 -33
- package/dist/protocols/openai-chat.d.ts +15 -15
- package/dist/protocols/openai-compatible-chat.d.ts +3 -3
- package/dist/protocols/openai-compatible-responses.d.ts +4 -4
- package/dist/protocols/openai-responses.d.ts +28 -28
- package/dist/protocols/utils/open-responses-options.d.ts +10 -5
- package/dist/protocols/utils/open-responses-options.js +4 -2
- package/dist/protocols/utils/openai-options.d.ts +6 -4
- package/dist/protocols/utils/openai-options.js +3 -3
- package/dist/providers/amazon-bedrock-mantle.d.ts +8 -8
- package/dist/providers/anthropic-compatible.d.ts +9 -9
- package/dist/providers/anthropic.d.ts +9 -9
- package/dist/providers/azure.d.ts +8 -8
- package/dist/providers/cloudflare.d.ts +9 -9
- package/dist/providers/google-vertex-chat.d.ts +3 -3
- package/dist/providers/google-vertex-messages.d.ts +9 -9
- package/dist/providers/google-vertex-responses.d.ts +4 -4
- package/dist/providers/google-vertex.d.ts +1 -1
- package/dist/providers/google.d.ts +1 -1
- package/dist/providers/openai-compatible-responses.d.ts +4 -4
- package/dist/providers/openai-compatible.d.ts +3 -3
- package/dist/providers/openai.d.ts +8 -8
- package/dist/providers/openrouter.d.ts +10 -10
- package/dist/providers/xai.d.ts +8 -8
- package/dist/schema/errors.js +2 -1
- package/dist/schema/events.d.ts +5 -3
- package/dist/schema/events.js +5 -2
- package/dist/schema/ids.d.ts +0 -13
- package/dist/schema/ids.js +0 -9
- package/dist/schema/messages.d.ts +4 -0
- package/dist/schema/messages.js +5 -2
- package/dist/schema/options.d.ts +2 -0
- package/dist/schema/options.js +2 -1
- package/package.json +3 -3
|
@@ -23,14 +23,6 @@ export interface Settings extends ProviderPackage.Settings {
|
|
|
23
23
|
}
|
|
24
24
|
export declare const routes: Route<{
|
|
25
25
|
anthropic_version: "vertex-2023-10-16";
|
|
26
|
-
system?: readonly {
|
|
27
|
-
readonly type: "text";
|
|
28
|
-
readonly text: string;
|
|
29
|
-
readonly cache_control?: {
|
|
30
|
-
readonly type: "ephemeral";
|
|
31
|
-
readonly ttl?: "1h" | "5m" | undefined;
|
|
32
|
-
} | undefined;
|
|
33
|
-
}[] | undefined;
|
|
34
26
|
max_tokens: number;
|
|
35
27
|
tools?: readonly {
|
|
36
28
|
readonly description: string;
|
|
@@ -43,6 +35,14 @@ export declare const routes: Route<{
|
|
|
43
35
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
44
36
|
} | undefined;
|
|
45
37
|
}[] | undefined;
|
|
38
|
+
system?: readonly {
|
|
39
|
+
readonly type: "text";
|
|
40
|
+
readonly text: string;
|
|
41
|
+
readonly cache_control?: {
|
|
42
|
+
readonly type: "ephemeral";
|
|
43
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
}[] | undefined;
|
|
46
46
|
messages: readonly ({
|
|
47
47
|
readonly role: "user";
|
|
48
48
|
readonly content: readonly ({
|
|
@@ -187,7 +187,7 @@ export declare const routes: Route<{
|
|
|
187
187
|
readonly type: "disabled";
|
|
188
188
|
} | undefined;
|
|
189
189
|
tool_choice?: {
|
|
190
|
-
readonly type: "
|
|
190
|
+
readonly type: "auto" | "none" | "any";
|
|
191
191
|
} | {
|
|
192
192
|
readonly type: "tool";
|
|
193
193
|
readonly name: string;
|
|
@@ -83,7 +83,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
83
83
|
readonly instructions?: string | undefined;
|
|
84
84
|
readonly reasoning?: {
|
|
85
85
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
86
|
-
readonly effort?:
|
|
86
|
+
readonly effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
87
87
|
} | undefined;
|
|
88
88
|
readonly tools?: readonly {
|
|
89
89
|
readonly type: "function";
|
|
@@ -95,15 +95,15 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
95
95
|
readonly strict?: boolean | undefined;
|
|
96
96
|
}[] | undefined;
|
|
97
97
|
readonly text?: {
|
|
98
|
-
readonly verbosity?: "
|
|
98
|
+
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
99
99
|
} | undefined;
|
|
100
100
|
readonly temperature?: number | undefined;
|
|
101
|
-
readonly tool_choice?: "required" | "
|
|
101
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
102
102
|
readonly type: "function";
|
|
103
103
|
readonly name: string;
|
|
104
104
|
} | {
|
|
105
105
|
readonly type: "allowed_tools";
|
|
106
|
-
readonly mode: "required" | "
|
|
106
|
+
readonly mode: "required" | "auto" | "none";
|
|
107
107
|
readonly tools: readonly {
|
|
108
108
|
readonly type: "function";
|
|
109
109
|
readonly name: string;
|
|
@@ -30,7 +30,7 @@ export type Settings = ProviderPackage.Settings & ({
|
|
|
30
30
|
};
|
|
31
31
|
export declare const routes: Route<{
|
|
32
32
|
readonly contents: readonly {
|
|
33
|
-
readonly role: "
|
|
33
|
+
readonly role: "model" | "user";
|
|
34
34
|
readonly parts: readonly ({
|
|
35
35
|
readonly inlineData: {
|
|
36
36
|
readonly mimeType: string;
|
|
@@ -9,7 +9,7 @@ export type GeminiProviderOptionsInput = Gemini.ProviderOptionsInput;
|
|
|
9
9
|
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
10
10
|
export declare const routes: import("../route/client.js").Route<{
|
|
11
11
|
readonly contents: readonly {
|
|
12
|
-
readonly role: "
|
|
12
|
+
readonly role: "model" | "user";
|
|
13
13
|
readonly parts: readonly ({
|
|
14
14
|
readonly inlineData: {
|
|
15
15
|
readonly mimeType: string;
|
|
@@ -81,7 +81,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
81
81
|
readonly instructions?: string | undefined;
|
|
82
82
|
readonly reasoning?: {
|
|
83
83
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
84
|
-
readonly effort?:
|
|
84
|
+
readonly effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
85
85
|
} | undefined;
|
|
86
86
|
readonly tools?: readonly {
|
|
87
87
|
readonly type: "function";
|
|
@@ -93,15 +93,15 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
93
93
|
readonly strict?: boolean | undefined;
|
|
94
94
|
}[] | undefined;
|
|
95
95
|
readonly text?: {
|
|
96
|
-
readonly verbosity?: "
|
|
96
|
+
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
97
97
|
} | undefined;
|
|
98
98
|
readonly temperature?: number | undefined;
|
|
99
|
-
readonly tool_choice?: "required" | "
|
|
99
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
100
100
|
readonly type: "function";
|
|
101
101
|
readonly name: string;
|
|
102
102
|
} | {
|
|
103
103
|
readonly type: "allowed_tools";
|
|
104
|
-
readonly mode: "required" | "
|
|
104
|
+
readonly mode: "required" | "auto" | "none";
|
|
105
105
|
readonly tools: readonly {
|
|
106
106
|
readonly type: "function";
|
|
107
107
|
readonly name: string;
|
|
@@ -81,7 +81,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
81
81
|
} | undefined;
|
|
82
82
|
})[];
|
|
83
83
|
readonly stream: true;
|
|
84
|
-
readonly stop?: readonly string[] | undefined;
|
|
85
84
|
readonly max_completion_tokens?: number | undefined;
|
|
86
85
|
readonly max_tokens?: number | undefined;
|
|
87
86
|
readonly tools?: readonly {
|
|
@@ -98,9 +97,10 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
98
97
|
readonly ttl?: string | undefined;
|
|
99
98
|
} | undefined;
|
|
100
99
|
}[] | undefined;
|
|
100
|
+
readonly stop?: readonly string[] | undefined;
|
|
101
101
|
readonly temperature?: number | undefined;
|
|
102
102
|
readonly seed?: number | undefined;
|
|
103
|
-
readonly tool_choice?: "required" | "
|
|
103
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
104
104
|
readonly type: "function";
|
|
105
105
|
readonly function: {
|
|
106
106
|
readonly name: string;
|
|
@@ -112,7 +112,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
112
112
|
readonly include_usage: boolean;
|
|
113
113
|
} | undefined;
|
|
114
114
|
readonly prompt_cache_key?: string | undefined;
|
|
115
|
-
readonly reasoning_effort?:
|
|
115
|
+
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
116
116
|
readonly frequency_penalty?: number | undefined;
|
|
117
117
|
readonly presence_penalty?: number | undefined;
|
|
118
118
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
@@ -69,7 +69,6 @@ export declare const routes: (Route<{
|
|
|
69
69
|
} | undefined;
|
|
70
70
|
})[];
|
|
71
71
|
readonly stream: true;
|
|
72
|
-
readonly stop?: readonly string[] | undefined;
|
|
73
72
|
readonly max_completion_tokens?: number | undefined;
|
|
74
73
|
readonly max_tokens?: number | undefined;
|
|
75
74
|
readonly tools?: readonly {
|
|
@@ -86,9 +85,10 @@ export declare const routes: (Route<{
|
|
|
86
85
|
readonly ttl?: string | undefined;
|
|
87
86
|
} | undefined;
|
|
88
87
|
}[] | undefined;
|
|
88
|
+
readonly stop?: readonly string[] | undefined;
|
|
89
89
|
readonly temperature?: number | undefined;
|
|
90
90
|
readonly seed?: number | undefined;
|
|
91
|
-
readonly tool_choice?: "required" | "
|
|
91
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
92
92
|
readonly type: "function";
|
|
93
93
|
readonly function: {
|
|
94
94
|
readonly name: string;
|
|
@@ -100,7 +100,7 @@ export declare const routes: (Route<{
|
|
|
100
100
|
readonly include_usage: boolean;
|
|
101
101
|
} | undefined;
|
|
102
102
|
readonly prompt_cache_key?: string | undefined;
|
|
103
|
-
readonly reasoning_effort?:
|
|
103
|
+
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
104
104
|
readonly frequency_penalty?: number | undefined;
|
|
105
105
|
readonly presence_penalty?: number | undefined;
|
|
106
106
|
}, import("../route/transport/http.js").HttpPrepared<string>> | Route<{
|
|
@@ -175,7 +175,7 @@ export declare const routes: (Route<{
|
|
|
175
175
|
readonly instructions?: string | undefined;
|
|
176
176
|
readonly reasoning?: {
|
|
177
177
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
178
|
-
readonly effort?:
|
|
178
|
+
readonly effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
179
179
|
} | undefined;
|
|
180
180
|
readonly tools?: readonly ({
|
|
181
181
|
readonly type: "function";
|
|
@@ -190,22 +190,22 @@ export declare const routes: (Route<{
|
|
|
190
190
|
readonly size?: string | undefined;
|
|
191
191
|
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
192
192
|
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
193
|
-
readonly quality?: "
|
|
193
|
+
readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
|
|
194
194
|
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
195
195
|
readonly output_compression?: number | undefined;
|
|
196
196
|
readonly input_fidelity?: "low" | "high" | undefined;
|
|
197
197
|
readonly partial_images?: number | undefined;
|
|
198
198
|
})[] | undefined;
|
|
199
199
|
readonly text?: {
|
|
200
|
-
readonly verbosity?: "
|
|
200
|
+
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
201
201
|
} | undefined;
|
|
202
202
|
readonly temperature?: number | undefined;
|
|
203
|
-
readonly tool_choice?: "required" | "
|
|
203
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
204
204
|
readonly type: "function";
|
|
205
205
|
readonly name: string;
|
|
206
206
|
} | {
|
|
207
207
|
readonly type: "allowed_tools";
|
|
208
|
-
readonly mode: "required" | "
|
|
208
|
+
readonly mode: "required" | "auto" | "none";
|
|
209
209
|
readonly tools: readonly {
|
|
210
210
|
readonly type: "function";
|
|
211
211
|
readonly name: string;
|
|
@@ -172,7 +172,7 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
|
|
|
172
172
|
}>>;
|
|
173
173
|
store: Schema.optional<Schema.Boolean>;
|
|
174
174
|
prompt_cache_key: Schema.optional<Schema.String>;
|
|
175
|
-
reasoning_effort: Schema.optional<Schema.
|
|
175
|
+
reasoning_effort: Schema.optional<Schema.declare<import("../protocols/utils/open-responses-options.js").ReasoningEffort, import("../protocols/utils/open-responses-options.js").ReasoningEffort>>;
|
|
176
176
|
max_completion_tokens: Schema.optional<Schema.Number>;
|
|
177
177
|
max_tokens: Schema.optional<Schema.Number>;
|
|
178
178
|
temperature: Schema.optional<Schema.Number>;
|
|
@@ -246,7 +246,6 @@ export declare const protocol: Protocol<{
|
|
|
246
246
|
} | undefined;
|
|
247
247
|
})[];
|
|
248
248
|
readonly stream: true;
|
|
249
|
-
readonly stop?: readonly string[] | undefined;
|
|
250
249
|
readonly max_completion_tokens?: number | undefined;
|
|
251
250
|
readonly max_tokens?: number | undefined;
|
|
252
251
|
readonly tools?: readonly {
|
|
@@ -263,9 +262,10 @@ export declare const protocol: Protocol<{
|
|
|
263
262
|
readonly ttl?: string | undefined;
|
|
264
263
|
} | undefined;
|
|
265
264
|
}[] | undefined;
|
|
265
|
+
readonly stop?: readonly string[] | undefined;
|
|
266
266
|
readonly temperature?: number | undefined;
|
|
267
267
|
readonly seed?: number | undefined;
|
|
268
|
-
readonly tool_choice?: "required" | "
|
|
268
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
269
269
|
readonly type: "function";
|
|
270
270
|
readonly function: {
|
|
271
271
|
readonly name: string;
|
|
@@ -277,7 +277,7 @@ export declare const protocol: Protocol<{
|
|
|
277
277
|
readonly include_usage: boolean;
|
|
278
278
|
} | undefined;
|
|
279
279
|
readonly prompt_cache_key?: string | undefined;
|
|
280
|
-
readonly reasoning_effort?:
|
|
280
|
+
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
281
281
|
readonly frequency_penalty?: number | undefined;
|
|
282
282
|
readonly presence_penalty?: number | undefined;
|
|
283
283
|
}, string, {
|
|
@@ -386,7 +386,6 @@ export declare const route: Route<{
|
|
|
386
386
|
} | undefined;
|
|
387
387
|
})[];
|
|
388
388
|
readonly stream: true;
|
|
389
|
-
readonly stop?: readonly string[] | undefined;
|
|
390
389
|
readonly max_completion_tokens?: number | undefined;
|
|
391
390
|
readonly max_tokens?: number | undefined;
|
|
392
391
|
readonly tools?: readonly {
|
|
@@ -403,9 +402,10 @@ export declare const route: Route<{
|
|
|
403
402
|
readonly ttl?: string | undefined;
|
|
404
403
|
} | undefined;
|
|
405
404
|
}[] | undefined;
|
|
405
|
+
readonly stop?: readonly string[] | undefined;
|
|
406
406
|
readonly temperature?: number | undefined;
|
|
407
407
|
readonly seed?: number | undefined;
|
|
408
|
-
readonly tool_choice?: "required" | "
|
|
408
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
409
409
|
readonly type: "function";
|
|
410
410
|
readonly function: {
|
|
411
411
|
readonly name: string;
|
|
@@ -417,7 +417,7 @@ export declare const route: Route<{
|
|
|
417
417
|
readonly include_usage: boolean;
|
|
418
418
|
} | undefined;
|
|
419
419
|
readonly prompt_cache_key?: string | undefined;
|
|
420
|
-
readonly reasoning_effort?:
|
|
420
|
+
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
421
421
|
readonly frequency_penalty?: number | undefined;
|
|
422
422
|
readonly presence_penalty?: number | undefined;
|
|
423
423
|
}, import("../route/transport/http.js").HttpPrepared<string>>;
|
|
@@ -484,7 +484,6 @@ export declare const routes: Route<{
|
|
|
484
484
|
} | undefined;
|
|
485
485
|
})[];
|
|
486
486
|
readonly stream: true;
|
|
487
|
-
readonly stop?: readonly string[] | undefined;
|
|
488
487
|
readonly max_completion_tokens?: number | undefined;
|
|
489
488
|
readonly max_tokens?: number | undefined;
|
|
490
489
|
readonly tools?: readonly {
|
|
@@ -501,9 +500,10 @@ export declare const routes: Route<{
|
|
|
501
500
|
readonly ttl?: string | undefined;
|
|
502
501
|
} | undefined;
|
|
503
502
|
}[] | undefined;
|
|
503
|
+
readonly stop?: readonly string[] | undefined;
|
|
504
504
|
readonly temperature?: number | undefined;
|
|
505
505
|
readonly seed?: number | undefined;
|
|
506
|
-
readonly tool_choice?: "required" | "
|
|
506
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
507
507
|
readonly type: "function";
|
|
508
508
|
readonly function: {
|
|
509
509
|
readonly name: string;
|
|
@@ -515,7 +515,7 @@ export declare const routes: Route<{
|
|
|
515
515
|
readonly include_usage: boolean;
|
|
516
516
|
} | undefined;
|
|
517
517
|
readonly prompt_cache_key?: string | undefined;
|
|
518
|
-
readonly reasoning_effort?:
|
|
518
|
+
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
519
519
|
readonly frequency_penalty?: number | undefined;
|
|
520
520
|
readonly presence_penalty?: number | undefined;
|
|
521
521
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
package/dist/providers/xai.d.ts
CHANGED
|
@@ -79,7 +79,6 @@ export declare const routes: (Route<{
|
|
|
79
79
|
} | undefined;
|
|
80
80
|
})[];
|
|
81
81
|
readonly stream: true;
|
|
82
|
-
readonly stop?: readonly string[] | undefined;
|
|
83
82
|
readonly max_completion_tokens?: number | undefined;
|
|
84
83
|
readonly max_tokens?: number | undefined;
|
|
85
84
|
readonly tools?: readonly {
|
|
@@ -96,9 +95,10 @@ export declare const routes: (Route<{
|
|
|
96
95
|
readonly ttl?: string | undefined;
|
|
97
96
|
} | undefined;
|
|
98
97
|
}[] | undefined;
|
|
98
|
+
readonly stop?: readonly string[] | undefined;
|
|
99
99
|
readonly temperature?: number | undefined;
|
|
100
100
|
readonly seed?: number | undefined;
|
|
101
|
-
readonly tool_choice?: "required" | "
|
|
101
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
102
102
|
readonly type: "function";
|
|
103
103
|
readonly function: {
|
|
104
104
|
readonly name: string;
|
|
@@ -110,7 +110,7 @@ export declare const routes: (Route<{
|
|
|
110
110
|
readonly include_usage: boolean;
|
|
111
111
|
} | undefined;
|
|
112
112
|
readonly prompt_cache_key?: string | undefined;
|
|
113
|
-
readonly reasoning_effort?:
|
|
113
|
+
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
114
114
|
readonly frequency_penalty?: number | undefined;
|
|
115
115
|
readonly presence_penalty?: number | undefined;
|
|
116
116
|
}, import("../route/transport/http.js").HttpPrepared<string>> | Route<{
|
|
@@ -185,7 +185,7 @@ export declare const routes: (Route<{
|
|
|
185
185
|
readonly instructions?: string | undefined;
|
|
186
186
|
readonly reasoning?: {
|
|
187
187
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
188
|
-
readonly effort?:
|
|
188
|
+
readonly effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
189
189
|
} | undefined;
|
|
190
190
|
readonly tools?: readonly ({
|
|
191
191
|
readonly type: "function";
|
|
@@ -200,22 +200,22 @@ export declare const routes: (Route<{
|
|
|
200
200
|
readonly size?: string | undefined;
|
|
201
201
|
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
202
202
|
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
203
|
-
readonly quality?: "
|
|
203
|
+
readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
|
|
204
204
|
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
205
205
|
readonly output_compression?: number | undefined;
|
|
206
206
|
readonly input_fidelity?: "low" | "high" | undefined;
|
|
207
207
|
readonly partial_images?: number | undefined;
|
|
208
208
|
})[] | undefined;
|
|
209
209
|
readonly text?: {
|
|
210
|
-
readonly verbosity?: "
|
|
210
|
+
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
211
211
|
} | undefined;
|
|
212
212
|
readonly temperature?: number | undefined;
|
|
213
|
-
readonly tool_choice?: "required" | "
|
|
213
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
214
214
|
readonly type: "function";
|
|
215
215
|
readonly name: string;
|
|
216
216
|
} | {
|
|
217
217
|
readonly type: "allowed_tools";
|
|
218
|
-
readonly mode: "required" | "
|
|
218
|
+
readonly mode: "required" | "auto" | "none";
|
|
219
219
|
readonly tools: readonly {
|
|
220
220
|
readonly type: "function";
|
|
221
221
|
readonly name: string;
|
package/dist/schema/errors.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Tool } from "@opencode-ai/schema/tool";
|
|
3
|
-
import { ModelID, ProviderID,
|
|
3
|
+
import { ModelID, ProviderID, RouteID } from "./ids.js";
|
|
4
|
+
import { ProviderMetadata } from "./messages.js";
|
|
4
5
|
export const ProviderFailureClassification = Schema.Literals(["context-overflow", "payload-too-large"]);
|
|
5
6
|
export class HttpRequestDetails extends Schema.Class("AI.HttpRequestDetails")({
|
|
6
7
|
method: Schema.String,
|
package/dist/schema/events.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { ContentBlockID,
|
|
3
|
-
import { Message, ToolOutput, ToolResultValue } from "./messages.js";
|
|
2
|
+
import { ContentBlockID, ToolCallID } from "./ids.js";
|
|
3
|
+
import { Message, ProviderMetadata, ToolOutput, ToolResultValue } from "./messages.js";
|
|
4
|
+
export declare const FinishReason: Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>;
|
|
5
|
+
export type FinishReason = Schema.Schema.Type<typeof FinishReason>;
|
|
6
|
+
export { ProviderMetadata } from "./messages.js";
|
|
4
7
|
declare const Usage_base: Schema.Class<Usage, Schema.Struct<{
|
|
5
8
|
readonly inputTokens: Schema.optional<Schema.Number>;
|
|
6
9
|
readonly outputTokens: Schema.optional<Schema.Number>;
|
|
@@ -4584,4 +4587,3 @@ export declare namespace LLMResponse {
|
|
|
4584
4587
|
/** Concatenate reasoning text from a response or collected event list. */
|
|
4585
4588
|
const reasoning: (response: Output) => string;
|
|
4586
4589
|
}
|
|
4587
|
-
export {};
|
package/dist/schema/events.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { LLM } from "@opencode-ai/schema/llm";
|
|
3
|
+
import { ContentBlockID, ToolCallID } from "./ids.js";
|
|
4
|
+
import { Message, ProviderMetadata, ToolCallPart, ToolOutput, ToolResultPart, ToolResultValue, } from "./messages.js";
|
|
4
5
|
import { ProviderFailureClassification } from "./errors.js";
|
|
6
|
+
export const FinishReason = LLM.FinishReason;
|
|
7
|
+
export { ProviderMetadata } from "./messages.js";
|
|
5
8
|
/**
|
|
6
9
|
* Token usage reported by an LLM provider.
|
|
7
10
|
*
|
package/dist/schema/ids.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { ProviderMetadata } from "@opencode-ai/schema/ai";
|
|
3
|
-
export { ProviderMetadata };
|
|
4
2
|
/** Stable string identifier for a protocol implementation. */
|
|
5
3
|
export declare const ProtocolID: Schema.String;
|
|
6
4
|
export type ProtocolID = Schema.Schema.Type<typeof ProtocolID>;
|
|
@@ -17,14 +15,3 @@ export declare const ContentBlockID: Schema.String;
|
|
|
17
15
|
export type ContentBlockID = Schema.Schema.Type<typeof ContentBlockID>;
|
|
18
16
|
export declare const ToolCallID: Schema.String;
|
|
19
17
|
export type ToolCallID = Schema.Schema.Type<typeof ToolCallID>;
|
|
20
|
-
export declare const ReasoningEfforts: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
21
|
-
export declare const ReasoningEffort: Schema.String;
|
|
22
|
-
export type ReasoningEffort = Schema.Schema.Type<typeof ReasoningEffort>;
|
|
23
|
-
export declare const TextVerbosity: Schema.Literals<readonly ["low", "medium", "high"]>;
|
|
24
|
-
export type TextVerbosity = Schema.Schema.Type<typeof TextVerbosity>;
|
|
25
|
-
export declare const MessageRole: Schema.Literals<readonly ["system", "user", "assistant", "tool"]>;
|
|
26
|
-
export type MessageRole = Schema.Schema.Type<typeof MessageRole>;
|
|
27
|
-
export declare const FinishReason: Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>;
|
|
28
|
-
export type FinishReason = Schema.Schema.Type<typeof FinishReason>;
|
|
29
|
-
export declare const JsonSchema: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
30
|
-
export type JsonSchema = Schema.Schema.Type<typeof JsonSchema>;
|
package/dist/schema/ids.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { ProviderMetadata } from "@opencode-ai/schema/ai";
|
|
3
|
-
import { LLM } from "@opencode-ai/schema/llm";
|
|
4
|
-
export { ProviderMetadata };
|
|
5
2
|
/** Stable string identifier for a protocol implementation. */
|
|
6
3
|
export const ProtocolID = Schema.String;
|
|
7
4
|
/** Stable string identifier for the runnable route. */
|
|
@@ -11,9 +8,3 @@ export const ProviderID = Schema.String.pipe(Schema.brand("AI.ProviderID"));
|
|
|
11
8
|
export const ResponseID = Schema.String;
|
|
12
9
|
export const ContentBlockID = Schema.String;
|
|
13
10
|
export const ToolCallID = Schema.String;
|
|
14
|
-
export const ReasoningEfforts = ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
15
|
-
export const ReasoningEffort = Schema.String;
|
|
16
|
-
export const TextVerbosity = Schema.Literals(["low", "medium", "high"]);
|
|
17
|
-
export const MessageRole = Schema.Literals(["system", "user", "assistant", "tool"]);
|
|
18
|
-
export const FinishReason = LLM.FinishReason;
|
|
19
|
-
export const JsonSchema = Schema.Record(Schema.String, Schema.Unknown);
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Tool } from "@opencode-ai/schema/tool";
|
|
3
3
|
import { CacheHint, GenerationOptions, HttpOptions } from "./options.js";
|
|
4
|
+
export declare const MessageRole: Schema.Literals<readonly ["system", "user", "assistant", "tool"]>;
|
|
5
|
+
export type MessageRole = Schema.Schema.Type<typeof MessageRole>;
|
|
6
|
+
export declare const ProviderMetadata: Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
7
|
+
export type ProviderMetadata = Schema.Schema.Type<typeof ProviderMetadata>;
|
|
4
8
|
declare const systemPartSchema: Schema.Struct<{
|
|
5
9
|
readonly type: Schema.Literal<"text">;
|
|
6
10
|
readonly text: Schema.String;
|
package/dist/schema/messages.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Tool } from "@opencode-ai/schema/tool";
|
|
3
|
-
import { JsonSchema,
|
|
4
|
-
import { CacheHint, CachePolicy, GenerationOptions, HttpOptions, LanguageModelSchema, ProviderOptions, } from "./options.js";
|
|
3
|
+
import { CacheHint, CachePolicy, GenerationOptions, HttpOptions, JsonSchema, LanguageModelSchema, ProviderOptions, } from "./options.js";
|
|
5
4
|
import { isRecord } from "../utils/record.js";
|
|
5
|
+
export const MessageRole = Schema.Literals(["system", "user", "assistant", "tool"]);
|
|
6
|
+
export const ProviderMetadata = Schema.Record(Schema.String, Schema.Record(Schema.String, Schema.Unknown)).annotate({
|
|
7
|
+
identifier: "LLM.ProviderMetadata",
|
|
8
|
+
});
|
|
6
9
|
const systemPartSchema = Schema.Struct({
|
|
7
10
|
type: Schema.Literal("text"),
|
|
8
11
|
text: Schema.String,
|
package/dist/schema/options.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { ModelID, ProviderID } from "./ids.js";
|
|
3
3
|
import type { AnyRoute } from "../route/client.js";
|
|
4
|
+
export declare const JsonSchema: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
5
|
+
export type JsonSchema = Schema.Schema.Type<typeof JsonSchema>;
|
|
4
6
|
export declare const mergeJsonRecords: (...items: ReadonlyArray<Record<string, unknown> | undefined>) => Record<string, unknown> | undefined;
|
|
5
7
|
export declare const ProviderOptions: Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
6
8
|
export type ProviderOptions = Schema.Schema.Type<typeof ProviderOptions>;
|
package/dist/schema/options.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import { ModelID, ProviderID } from "./ids.js";
|
|
3
3
|
import { isRecord } from "../utils/record.js";
|
|
4
|
+
export const JsonSchema = Schema.Record(Schema.String, Schema.Unknown);
|
|
4
5
|
export const mergeJsonRecords = (...items) => {
|
|
5
6
|
const defined = items.filter((item) => item !== undefined);
|
|
6
7
|
if (defined.length === 0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-17681",
|
|
4
4
|
"name": "@opencode-ai/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
32
32
|
"@effect/platform-node": "4.0.0-beta.107",
|
|
33
|
-
"@opencode-ai/http-recorder": "0.0.0-dev-
|
|
33
|
+
"@opencode-ai/http-recorder": "0.0.0-dev-17681",
|
|
34
34
|
"@tsconfig/bun": "1.0.9",
|
|
35
35
|
"@types/bun": "1.3.13",
|
|
36
36
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@smithy/eventstream-codec": "4.2.14",
|
|
41
41
|
"@smithy/util-utf8": "4.2.2",
|
|
42
|
-
"@opencode-ai/schema": "0.0.0-dev-
|
|
42
|
+
"@opencode-ai/schema": "0.0.0-dev-17681",
|
|
43
43
|
"aws4fetch": "1.0.20",
|
|
44
44
|
"effect": "4.0.0-beta.107",
|
|
45
45
|
"google-auth-library": "10.5.0"
|