@opencode/ai 0.0.0-dev-21627 → 0.0.0-dev-21641
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/experimental/evaluation.js +3 -10
- package/dist/image-client.d.ts +8 -8
- package/dist/image.d.ts +148 -148
- package/dist/promise.d.ts +120 -120
- package/dist/protocols/alibaba-chat.d.ts +12 -12
- package/dist/protocols/alibaba-messages.d.ts +11 -11
- package/dist/protocols/alibaba-responses.d.ts +35 -35
- package/dist/protocols/anthropic-messages.d.ts +40 -40
- package/dist/protocols/bedrock-converse.d.ts +30 -30
- package/dist/protocols/cartesia-speech.d.ts +32 -32
- package/dist/protocols/cohere-chat.d.ts +7 -8
- package/dist/protocols/deepgram-speech.d.ts +32 -32
- package/dist/protocols/elevenlabs-speech.d.ts +32 -32
- package/dist/protocols/gemini.d.ts +34 -34
- package/dist/protocols/google-interactions.d.ts +14 -14
- package/dist/protocols/google-speech.d.ts +32 -32
- package/dist/protocols/google-transcription.d.ts +32 -32
- package/dist/protocols/meta-messages.d.ts +23 -23
- package/dist/protocols/meta-responses.d.ts +78 -78
- package/dist/protocols/mistral-chat.d.ts +81 -78
- package/dist/protocols/mistral-chat.js +2 -1
- package/dist/protocols/open-responses-channel.js +47 -46
- package/dist/protocols/open-responses-continuation.d.ts +8 -2
- package/dist/protocols/open-responses-continuation.js +3 -1
- package/dist/protocols/open-responses.d.ts +396 -396
- package/dist/protocols/openai-chat.d.ts +60 -60
- package/dist/protocols/openai-compatible-chat.d.ts +12 -12
- package/dist/protocols/openai-compatible-responses.d.ts +35 -35
- package/dist/protocols/openai-images.d.ts +32 -32
- package/dist/protocols/openai-responses.d.ts +235 -235
- package/dist/protocols/openai-speech.d.ts +32 -32
- package/dist/protocols/openai-transcription.d.ts +32 -32
- package/dist/protocols/utils/tool-stream.d.ts +1 -1
- package/dist/protocols/venice-chat.d.ts +52 -53
- package/dist/protocols/venice-chat.js +6 -5
- package/dist/protocols/xai-responses.d.ts +78 -78
- package/dist/protocols/zai-chat.d.ts +33 -30
- package/dist/protocols/zai-chat.js +8 -3
- package/dist/protocols/zai-messages.d.ts +21 -19
- package/dist/protocols/zai-messages.js +3 -2
- package/dist/providers/alibaba.d.ts +69 -69
- package/dist/providers/amazon-bedrock-mantle.d.ts +202 -202
- package/dist/providers/amazon-bedrock.d.ts +15 -15
- package/dist/providers/anthropic-compatible.d.ts +13 -13
- package/dist/providers/anthropic.d.ts +13 -13
- package/dist/providers/azure.d.ts +106 -106
- package/dist/providers/baseten.d.ts +24 -24
- package/dist/providers/cerebras.d.ts +24 -24
- package/dist/providers/cloudflare-ai-gateway.d.ts +230 -227
- package/dist/providers/cloudflare-workers-ai.d.ts +24 -24
- package/dist/providers/cohere.d.ts +75 -75
- package/dist/providers/deepinfra.d.ts +24 -24
- package/dist/providers/deepseek.d.ts +24 -24
- package/dist/providers/digitalocean.d.ts +36 -36
- package/dist/providers/fireworks.d.ts +24 -24
- package/dist/providers/google-vertex-chat.d.ts +12 -12
- package/dist/providers/google-vertex-messages.d.ts +13 -13
- package/dist/providers/google-vertex-mistral.d.ts +17 -17
- package/dist/providers/google-vertex-responses.d.ts +35 -35
- package/dist/providers/google-vertex.d.ts +17 -17
- package/dist/providers/google.d.ts +17 -17
- package/dist/providers/groq.d.ts +24 -24
- package/dist/providers/meta.d.ts +179 -179
- package/dist/providers/minimax.d.ts +71 -71
- package/dist/providers/mistral.d.ts +28 -28
- package/dist/providers/moonshot.d.ts +202 -202
- package/dist/providers/openai-compatible-responses.d.ts +35 -35
- package/dist/providers/openai-compatible.d.ts +12 -12
- package/dist/providers/openai.d.ts +100 -100
- package/dist/providers/openrouter.d.ts +36 -36
- package/dist/providers/togetherai.d.ts +24 -24
- package/dist/providers/venice.d.ts +195 -20
- package/dist/providers/xai.d.ts +12 -12
- package/dist/providers/zai-coding-plan.d.ts +149 -69
- package/dist/providers/zai.d.ts +84 -19
- package/dist/speech-client.d.ts +8 -8
- package/dist/speech.d.ts +148 -148
- package/dist/transcription-client.d.ts +8 -8
- package/dist/transcription.d.ts +148 -148
- package/dist/video-client.d.ts +8 -8
- package/dist/video.d.ts +114 -114
- package/package.json +6 -5
|
@@ -16,14 +16,6 @@ interface State extends SpeechStream.Audio {
|
|
|
16
16
|
readonly usage?: MediaUsage;
|
|
17
17
|
}
|
|
18
18
|
export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
19
|
-
readonly type: "generation-queued";
|
|
20
|
-
readonly id: string;
|
|
21
|
-
readonly position?: number | undefined;
|
|
22
|
-
} | {
|
|
23
|
-
readonly type: "generation-progress";
|
|
24
|
-
readonly id: string;
|
|
25
|
-
readonly progress?: number | undefined;
|
|
26
|
-
} | {
|
|
27
19
|
readonly type: "audio-delta";
|
|
28
20
|
readonly chunk: Uint8Array<ArrayBufferLike>;
|
|
29
21
|
} | {
|
|
@@ -33,18 +25,18 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
33
25
|
readonly startSeconds: number;
|
|
34
26
|
readonly endSeconds: number;
|
|
35
27
|
}[];
|
|
28
|
+
} | {
|
|
29
|
+
readonly type: "generation-queued";
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly position?: number | undefined;
|
|
32
|
+
} | {
|
|
33
|
+
readonly type: "generation-progress";
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly progress?: number | undefined;
|
|
36
36
|
} | {
|
|
37
37
|
readonly type: "finish";
|
|
38
38
|
readonly audio: import("../media.js").Asset;
|
|
39
39
|
readonly usage?: {
|
|
40
|
-
readonly type: "tokens";
|
|
41
|
-
readonly input?: number | undefined;
|
|
42
|
-
readonly output?: number | undefined;
|
|
43
|
-
readonly total?: number | undefined;
|
|
44
|
-
readonly details?: {
|
|
45
|
-
readonly [x: string]: unknown;
|
|
46
|
-
} | undefined;
|
|
47
|
-
} | {
|
|
48
40
|
readonly type: "seconds";
|
|
49
41
|
readonly seconds: number;
|
|
50
42
|
} | {
|
|
@@ -56,6 +48,14 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
56
48
|
} | {
|
|
57
49
|
readonly type: "compute";
|
|
58
50
|
readonly seconds: number;
|
|
51
|
+
} | {
|
|
52
|
+
readonly type: "tokens";
|
|
53
|
+
readonly input?: number | undefined;
|
|
54
|
+
readonly output?: number | undefined;
|
|
55
|
+
readonly total?: number | undefined;
|
|
56
|
+
readonly details?: {
|
|
57
|
+
readonly [x: string]: unknown;
|
|
58
|
+
} | undefined;
|
|
59
59
|
} | undefined;
|
|
60
60
|
readonly notices?: readonly {
|
|
61
61
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -75,14 +75,6 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
75
75
|
export declare const model: (input: MediaRoute.ModelInput) => SpeechModel<OpenAISpeechOptions>;
|
|
76
76
|
export declare const OpenAISpeech: {
|
|
77
77
|
readonly protocol: MediaProtocol.Streamed<Request, {
|
|
78
|
-
readonly type: "generation-queued";
|
|
79
|
-
readonly id: string;
|
|
80
|
-
readonly position?: number | undefined;
|
|
81
|
-
} | {
|
|
82
|
-
readonly type: "generation-progress";
|
|
83
|
-
readonly id: string;
|
|
84
|
-
readonly progress?: number | undefined;
|
|
85
|
-
} | {
|
|
86
78
|
readonly type: "audio-delta";
|
|
87
79
|
readonly chunk: Uint8Array<ArrayBufferLike>;
|
|
88
80
|
} | {
|
|
@@ -92,18 +84,18 @@ export declare const OpenAISpeech: {
|
|
|
92
84
|
readonly startSeconds: number;
|
|
93
85
|
readonly endSeconds: number;
|
|
94
86
|
}[];
|
|
87
|
+
} | {
|
|
88
|
+
readonly type: "generation-queued";
|
|
89
|
+
readonly id: string;
|
|
90
|
+
readonly position?: number | undefined;
|
|
91
|
+
} | {
|
|
92
|
+
readonly type: "generation-progress";
|
|
93
|
+
readonly id: string;
|
|
94
|
+
readonly progress?: number | undefined;
|
|
95
95
|
} | {
|
|
96
96
|
readonly type: "finish";
|
|
97
97
|
readonly audio: import("../media.js").Asset;
|
|
98
98
|
readonly usage?: {
|
|
99
|
-
readonly type: "tokens";
|
|
100
|
-
readonly input?: number | undefined;
|
|
101
|
-
readonly output?: number | undefined;
|
|
102
|
-
readonly total?: number | undefined;
|
|
103
|
-
readonly details?: {
|
|
104
|
-
readonly [x: string]: unknown;
|
|
105
|
-
} | undefined;
|
|
106
|
-
} | {
|
|
107
99
|
readonly type: "seconds";
|
|
108
100
|
readonly seconds: number;
|
|
109
101
|
} | {
|
|
@@ -115,6 +107,14 @@ export declare const OpenAISpeech: {
|
|
|
115
107
|
} | {
|
|
116
108
|
readonly type: "compute";
|
|
117
109
|
readonly seconds: number;
|
|
110
|
+
} | {
|
|
111
|
+
readonly type: "tokens";
|
|
112
|
+
readonly input?: number | undefined;
|
|
113
|
+
readonly output?: number | undefined;
|
|
114
|
+
readonly total?: number | undefined;
|
|
115
|
+
readonly details?: {
|
|
116
|
+
readonly [x: string]: unknown;
|
|
117
|
+
} | undefined;
|
|
118
118
|
} | undefined;
|
|
119
119
|
readonly notices?: readonly {
|
|
120
120
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -59,14 +59,6 @@ interface State {
|
|
|
59
59
|
readonly transcript?: Transcript;
|
|
60
60
|
}
|
|
61
61
|
export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
62
|
-
readonly type: "generation-queued";
|
|
63
|
-
readonly id: string;
|
|
64
|
-
readonly position?: number | undefined;
|
|
65
|
-
} | {
|
|
66
|
-
readonly type: "generation-progress";
|
|
67
|
-
readonly id: string;
|
|
68
|
-
readonly progress?: number | undefined;
|
|
69
|
-
} | {
|
|
70
62
|
readonly type: "text-delta";
|
|
71
63
|
readonly delta: string;
|
|
72
64
|
} | {
|
|
@@ -77,6 +69,14 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
77
69
|
readonly endSeconds: number;
|
|
78
70
|
readonly speaker?: string | undefined;
|
|
79
71
|
};
|
|
72
|
+
} | {
|
|
73
|
+
readonly type: "generation-queued";
|
|
74
|
+
readonly id: string;
|
|
75
|
+
readonly position?: number | undefined;
|
|
76
|
+
} | {
|
|
77
|
+
readonly type: "generation-progress";
|
|
78
|
+
readonly id: string;
|
|
79
|
+
readonly progress?: number | undefined;
|
|
80
80
|
} | {
|
|
81
81
|
readonly text: string;
|
|
82
82
|
readonly segments?: readonly {
|
|
@@ -95,14 +95,6 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
95
95
|
readonly language?: string | undefined;
|
|
96
96
|
readonly durationSeconds?: number | undefined;
|
|
97
97
|
readonly usage?: {
|
|
98
|
-
readonly type: "tokens";
|
|
99
|
-
readonly input?: number | undefined;
|
|
100
|
-
readonly output?: number | undefined;
|
|
101
|
-
readonly total?: number | undefined;
|
|
102
|
-
readonly details?: {
|
|
103
|
-
readonly [x: string]: unknown;
|
|
104
|
-
} | undefined;
|
|
105
|
-
} | {
|
|
106
98
|
readonly type: "seconds";
|
|
107
99
|
readonly seconds: number;
|
|
108
100
|
} | {
|
|
@@ -114,6 +106,14 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
114
106
|
} | {
|
|
115
107
|
readonly type: "compute";
|
|
116
108
|
readonly seconds: number;
|
|
109
|
+
} | {
|
|
110
|
+
readonly type: "tokens";
|
|
111
|
+
readonly input?: number | undefined;
|
|
112
|
+
readonly output?: number | undefined;
|
|
113
|
+
readonly total?: number | undefined;
|
|
114
|
+
readonly details?: {
|
|
115
|
+
readonly [x: string]: unknown;
|
|
116
|
+
} | undefined;
|
|
117
117
|
} | undefined;
|
|
118
118
|
readonly notices?: readonly {
|
|
119
119
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -134,14 +134,6 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
134
134
|
export declare const model: (input: MediaRoute.ModelInput) => TranscriptionModel<OpenAITranscriptionOptions>;
|
|
135
135
|
export declare const OpenAITranscription: {
|
|
136
136
|
readonly protocol: MediaProtocol.Streamed<Request, {
|
|
137
|
-
readonly type: "generation-queued";
|
|
138
|
-
readonly id: string;
|
|
139
|
-
readonly position?: number | undefined;
|
|
140
|
-
} | {
|
|
141
|
-
readonly type: "generation-progress";
|
|
142
|
-
readonly id: string;
|
|
143
|
-
readonly progress?: number | undefined;
|
|
144
|
-
} | {
|
|
145
137
|
readonly type: "text-delta";
|
|
146
138
|
readonly delta: string;
|
|
147
139
|
} | {
|
|
@@ -152,6 +144,14 @@ export declare const OpenAITranscription: {
|
|
|
152
144
|
readonly endSeconds: number;
|
|
153
145
|
readonly speaker?: string | undefined;
|
|
154
146
|
};
|
|
147
|
+
} | {
|
|
148
|
+
readonly type: "generation-queued";
|
|
149
|
+
readonly id: string;
|
|
150
|
+
readonly position?: number | undefined;
|
|
151
|
+
} | {
|
|
152
|
+
readonly type: "generation-progress";
|
|
153
|
+
readonly id: string;
|
|
154
|
+
readonly progress?: number | undefined;
|
|
155
155
|
} | {
|
|
156
156
|
readonly text: string;
|
|
157
157
|
readonly segments?: readonly {
|
|
@@ -170,14 +170,6 @@ export declare const OpenAITranscription: {
|
|
|
170
170
|
readonly language?: string | undefined;
|
|
171
171
|
readonly durationSeconds?: number | undefined;
|
|
172
172
|
readonly usage?: {
|
|
173
|
-
readonly type: "tokens";
|
|
174
|
-
readonly input?: number | undefined;
|
|
175
|
-
readonly output?: number | undefined;
|
|
176
|
-
readonly total?: number | undefined;
|
|
177
|
-
readonly details?: {
|
|
178
|
-
readonly [x: string]: unknown;
|
|
179
|
-
} | undefined;
|
|
180
|
-
} | {
|
|
181
173
|
readonly type: "seconds";
|
|
182
174
|
readonly seconds: number;
|
|
183
175
|
} | {
|
|
@@ -189,6 +181,14 @@ export declare const OpenAITranscription: {
|
|
|
189
181
|
} | {
|
|
190
182
|
readonly type: "compute";
|
|
191
183
|
readonly seconds: number;
|
|
184
|
+
} | {
|
|
185
|
+
readonly type: "tokens";
|
|
186
|
+
readonly input?: number | undefined;
|
|
187
|
+
readonly output?: number | undefined;
|
|
188
|
+
readonly total?: number | undefined;
|
|
189
|
+
readonly details?: {
|
|
190
|
+
readonly [x: string]: unknown;
|
|
191
|
+
} | undefined;
|
|
192
192
|
} | undefined;
|
|
193
193
|
readonly notices?: readonly {
|
|
194
194
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -299,8 +299,8 @@ export declare const finish: <K extends StreamKey>(route: string, tools: State<K
|
|
|
299
299
|
* arguments on `response.output_item.done`; the final value wins.
|
|
300
300
|
*/
|
|
301
301
|
export declare const finishWithInput: <K extends StreamKey>(route: string, tools: State<K>, key: K, input: string) => Effect.Effect<{
|
|
302
|
-
events?: undefined;
|
|
303
302
|
tools: Partial<Record<K, PendingTool>>;
|
|
303
|
+
events?: undefined;
|
|
304
304
|
} | {
|
|
305
305
|
tools: Partial<Record<K, PendingTool>>;
|
|
306
306
|
events: readonly ({
|
|
@@ -1,44 +1,43 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Protocol } from "../route/protocol.js";
|
|
3
3
|
import { OpenAIChat } from "./openai-chat.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
readonly
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
import { OpenResponsesOptions } from "./utils/open-responses-options.js";
|
|
5
|
+
export type ReasoningEffort = OpenResponsesOptions.ReasoningEffort;
|
|
6
|
+
declare const Options: Schema.Struct<{
|
|
7
|
+
readonly reasoningEffort: Schema.optional<Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>>;
|
|
8
|
+
readonly reasoning: Schema.optional<Schema.Struct<{
|
|
9
|
+
readonly effort: Schema.optional<Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>>;
|
|
10
|
+
readonly enabled: Schema.optional<Schema.Boolean>;
|
|
11
|
+
readonly summary: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"auto" | "concise" | "detailed">, import("../schema/options.js").OpenString<"auto" | "concise" | "detailed">>>;
|
|
12
|
+
}>>;
|
|
13
|
+
readonly veniceParameters: Schema.optional<Schema.Struct<{
|
|
14
|
+
readonly enableWebSearch: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"auto" | "off" | "on">, import("../schema/options.js").OpenString<"auto" | "off" | "on">>>;
|
|
15
|
+
readonly enableWebScraping: Schema.optional<Schema.Boolean>;
|
|
16
|
+
readonly enableWebCitations: Schema.optional<Schema.Boolean>;
|
|
17
|
+
readonly enableXSearch: Schema.optional<Schema.Boolean>;
|
|
18
|
+
readonly stripThinkingResponse: Schema.optional<Schema.Boolean>;
|
|
19
|
+
readonly disableThinking: Schema.optional<Schema.Boolean>;
|
|
20
|
+
readonly includeVeniceSystemPrompt: Schema.optional<Schema.Boolean>;
|
|
21
|
+
readonly characterSlug: Schema.optional<Schema.String>;
|
|
22
|
+
readonly includeSearchResultsInStream: Schema.optional<Schema.Boolean>;
|
|
23
|
+
readonly returnSearchResultsAsDocuments: Schema.optional<Schema.Boolean>;
|
|
24
|
+
}>>;
|
|
25
|
+
readonly promptCacheKey: Schema.optional<Schema.String>;
|
|
26
|
+
readonly promptCacheRetention: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"24h" | "default" | "extended">, import("../schema/options.js").OpenString<"24h" | "default" | "extended">>>;
|
|
27
|
+
readonly parallelToolCalls: Schema.optional<Schema.Boolean>;
|
|
28
|
+
readonly maxCompletionTokens: Schema.optional<Schema.Number>;
|
|
29
|
+
readonly maxTokens: Schema.optional<Schema.Number>;
|
|
30
|
+
readonly minP: Schema.optional<Schema.Number>;
|
|
31
|
+
readonly repetitionPenalty: Schema.optional<Schema.Number>;
|
|
32
|
+
readonly stopTokenIds: Schema.optional<Schema.$Array<Schema.Number>>;
|
|
33
|
+
readonly logprobs: Schema.optional<Schema.Boolean>;
|
|
34
|
+
readonly topLogprobs: Schema.optional<Schema.Number>;
|
|
35
|
+
readonly maxTemp: Schema.optional<Schema.Number>;
|
|
36
|
+
readonly minTemp: Schema.optional<Schema.Number>;
|
|
37
|
+
readonly responseFormat: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
38
|
+
readonly user: Schema.optional<Schema.String>;
|
|
16
39
|
}>;
|
|
17
|
-
export type OptionsInput =
|
|
18
|
-
readonly reasoningEffort?: ReasoningEffort;
|
|
19
|
-
readonly reasoning?: {
|
|
20
|
-
readonly effort?: ReasoningEffort;
|
|
21
|
-
readonly enabled?: boolean;
|
|
22
|
-
readonly summary?: "auto" | "concise" | "detailed" | (string & {});
|
|
23
|
-
};
|
|
24
|
-
readonly veniceParameters?: Omit<typeof Parameters.Type, "enableWebSearch"> & {
|
|
25
|
-
readonly enableWebSearch?: "off" | "on" | "auto" | (string & {});
|
|
26
|
-
};
|
|
27
|
-
readonly promptCacheKey?: string;
|
|
28
|
-
readonly promptCacheRetention?: "default" | "extended" | "24h" | (string & {});
|
|
29
|
-
readonly parallelToolCalls?: boolean;
|
|
30
|
-
readonly maxCompletionTokens?: number;
|
|
31
|
-
readonly maxTokens?: number;
|
|
32
|
-
readonly minP?: number;
|
|
33
|
-
readonly repetitionPenalty?: number;
|
|
34
|
-
readonly stopTokenIds?: readonly number[];
|
|
35
|
-
readonly logprobs?: boolean;
|
|
36
|
-
readonly topLogprobs?: number;
|
|
37
|
-
readonly maxTemp?: number;
|
|
38
|
-
readonly minTemp?: number;
|
|
39
|
-
readonly responseFormat?: Readonly<Record<string, unknown>>;
|
|
40
|
-
readonly user?: string;
|
|
41
|
-
};
|
|
40
|
+
export type OptionsInput = typeof Options.Type;
|
|
42
41
|
interface State {
|
|
43
42
|
readonly shared: OpenAIChat.ParserState;
|
|
44
43
|
readonly pending: string;
|
|
@@ -80,7 +79,7 @@ export declare const protocol: Protocol<{
|
|
|
80
79
|
} | undefined;
|
|
81
80
|
readonly store?: boolean | undefined;
|
|
82
81
|
readonly prompt_cache_key?: string | undefined;
|
|
83
|
-
readonly reasoning_effort?:
|
|
82
|
+
readonly reasoning_effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
84
83
|
readonly tool_stream?: boolean | undefined;
|
|
85
84
|
readonly max_completion_tokens?: number | undefined;
|
|
86
85
|
readonly max_tokens?: number | undefined;
|
|
@@ -93,13 +92,6 @@ export declare const protocol: Protocol<{
|
|
|
93
92
|
readonly messages: readonly ({
|
|
94
93
|
readonly role: "system";
|
|
95
94
|
readonly content: string | readonly ({
|
|
96
|
-
readonly type: "text";
|
|
97
|
-
readonly text: string;
|
|
98
|
-
readonly cache_control?: {
|
|
99
|
-
readonly type: "ephemeral";
|
|
100
|
-
readonly ttl?: string | undefined;
|
|
101
|
-
} | undefined;
|
|
102
|
-
} | {
|
|
103
95
|
readonly type: "image_url";
|
|
104
96
|
readonly image_url: {
|
|
105
97
|
readonly url: string;
|
|
@@ -110,17 +102,17 @@ export declare const protocol: Protocol<{
|
|
|
110
102
|
readonly filename: string;
|
|
111
103
|
readonly file_data: string;
|
|
112
104
|
};
|
|
113
|
-
}
|
|
114
|
-
} | {
|
|
115
|
-
readonly role: "user";
|
|
116
|
-
readonly content: string | readonly ({
|
|
105
|
+
} | {
|
|
117
106
|
readonly type: "text";
|
|
118
107
|
readonly text: string;
|
|
119
108
|
readonly cache_control?: {
|
|
120
109
|
readonly type: "ephemeral";
|
|
121
110
|
readonly ttl?: string | undefined;
|
|
122
111
|
} | undefined;
|
|
123
|
-
}
|
|
112
|
+
})[];
|
|
113
|
+
} | {
|
|
114
|
+
readonly role: "user";
|
|
115
|
+
readonly content: string | readonly ({
|
|
124
116
|
readonly type: "image_url";
|
|
125
117
|
readonly image_url: {
|
|
126
118
|
readonly url: string;
|
|
@@ -131,6 +123,13 @@ export declare const protocol: Protocol<{
|
|
|
131
123
|
readonly filename: string;
|
|
132
124
|
readonly file_data: string;
|
|
133
125
|
};
|
|
126
|
+
} | {
|
|
127
|
+
readonly type: "text";
|
|
128
|
+
readonly text: string;
|
|
129
|
+
readonly cache_control?: {
|
|
130
|
+
readonly type: "ephemeral";
|
|
131
|
+
readonly ttl?: string | undefined;
|
|
132
|
+
} | undefined;
|
|
134
133
|
})[];
|
|
135
134
|
} | {
|
|
136
135
|
readonly role: "tool";
|
|
@@ -175,14 +174,14 @@ export declare const protocol: Protocol<{
|
|
|
175
174
|
readonly thought_signature?: string | undefined;
|
|
176
175
|
})[];
|
|
177
176
|
readonly reasoning?: {
|
|
178
|
-
readonly effort?:
|
|
177
|
+
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
179
178
|
readonly enabled?: boolean | undefined;
|
|
180
|
-
readonly summary?:
|
|
179
|
+
readonly summary?: import("../schema/options.js").OpenString<"auto" | "concise" | "detailed"> | undefined;
|
|
181
180
|
} | undefined;
|
|
182
181
|
readonly venice_parameters: {
|
|
183
182
|
readonly [x: string]: string | boolean;
|
|
184
183
|
};
|
|
185
|
-
readonly prompt_cache_retention?:
|
|
184
|
+
readonly prompt_cache_retention?: import("../schema/options.js").OpenString<"24h" | "default" | "extended"> | undefined;
|
|
186
185
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
187
186
|
readonly min_p?: number | undefined;
|
|
188
187
|
readonly top_k?: number | undefined;
|
|
@@ -5,8 +5,9 @@ import { classifyProviderFailure } from "../provider-error.js";
|
|
|
5
5
|
import { OpenAIChat } from "./openai-chat.js";
|
|
6
6
|
import { JsonObject, optionalArray, optionalNull, ProviderShared } from "./shared.js";
|
|
7
7
|
import { cacheControl } from "./utils/cache.js";
|
|
8
|
+
import { OpenResponsesOptions } from "./utils/open-responses-options.js";
|
|
8
9
|
const Parameters = Schema.Struct({
|
|
9
|
-
enableWebSearch: Schema.optional(
|
|
10
|
+
enableWebSearch: Schema.optional(ProviderShared.knownString()),
|
|
10
11
|
enableWebScraping: Schema.optional(Schema.Boolean),
|
|
11
12
|
enableWebCitations: Schema.optional(Schema.Boolean),
|
|
12
13
|
enableXSearch: Schema.optional(Schema.Boolean),
|
|
@@ -18,16 +19,16 @@ const Parameters = Schema.Struct({
|
|
|
18
19
|
returnSearchResultsAsDocuments: Schema.optional(Schema.Boolean),
|
|
19
20
|
});
|
|
20
21
|
const Reasoning = Schema.Struct({
|
|
21
|
-
effort: Schema.optional(
|
|
22
|
+
effort: Schema.optional(OpenResponsesOptions.ReasoningEffort),
|
|
22
23
|
enabled: Schema.optional(Schema.Boolean),
|
|
23
|
-
summary: Schema.optional(
|
|
24
|
+
summary: Schema.optional(ProviderShared.knownString()),
|
|
24
25
|
});
|
|
25
26
|
const Options = Schema.Struct({
|
|
26
|
-
reasoningEffort: Schema.optional(
|
|
27
|
+
reasoningEffort: Schema.optional(OpenResponsesOptions.ReasoningEffort),
|
|
27
28
|
reasoning: Schema.optional(Reasoning),
|
|
28
29
|
veniceParameters: Schema.optional(Parameters),
|
|
29
30
|
promptCacheKey: Schema.optional(Schema.String),
|
|
30
|
-
promptCacheRetention: Schema.optional(
|
|
31
|
+
promptCacheRetention: Schema.optional(ProviderShared.knownString()),
|
|
31
32
|
parallelToolCalls: Schema.optional(Schema.Boolean),
|
|
32
33
|
maxCompletionTokens: Schema.optional(Schema.Number),
|
|
33
34
|
maxTokens: Schema.optional(Schema.Number),
|
|
@@ -3,55 +3,10 @@ import { OpenResponses } from "./open-responses.js";
|
|
|
3
3
|
export declare const protocol: Protocol<{
|
|
4
4
|
readonly model: string;
|
|
5
5
|
readonly input: readonly ({
|
|
6
|
-
readonly [x: string]: unknown;
|
|
7
|
-
readonly type: "web_search_call";
|
|
8
|
-
readonly id: string;
|
|
9
|
-
readonly status?: string | undefined;
|
|
10
|
-
readonly action?: {
|
|
11
|
-
readonly [x: string]: unknown;
|
|
12
|
-
} | null | undefined;
|
|
13
|
-
} | {
|
|
14
|
-
readonly [x: string]: unknown;
|
|
15
|
-
readonly type: "file_search_call";
|
|
16
|
-
readonly id: string;
|
|
17
|
-
readonly status?: string | undefined;
|
|
18
|
-
readonly queries?: readonly string[] | undefined;
|
|
19
|
-
readonly results?: readonly {
|
|
20
|
-
readonly [x: string]: unknown;
|
|
21
|
-
}[] | null | undefined;
|
|
22
|
-
} | {
|
|
23
|
-
readonly [x: string]: unknown;
|
|
24
|
-
readonly type: "code_interpreter_call";
|
|
25
|
-
readonly id: string;
|
|
26
|
-
readonly status?: string | undefined;
|
|
27
|
-
readonly code?: string | null | undefined;
|
|
28
|
-
readonly container_id?: string | null | undefined;
|
|
29
|
-
readonly outputs?: readonly {
|
|
30
|
-
readonly [x: string]: unknown;
|
|
31
|
-
}[] | null | undefined;
|
|
32
|
-
} | {
|
|
33
|
-
readonly [x: string]: unknown;
|
|
34
|
-
readonly type: "mcp_call";
|
|
35
|
-
readonly id: string;
|
|
36
|
-
readonly status?: string | undefined;
|
|
37
|
-
readonly server_label?: string | undefined;
|
|
38
|
-
readonly name?: string | undefined;
|
|
39
|
-
readonly arguments?: string | undefined;
|
|
40
|
-
readonly output?: string | null | undefined;
|
|
41
|
-
readonly error?: unknown;
|
|
42
|
-
} | {
|
|
43
6
|
readonly type: "configuration_update";
|
|
44
7
|
readonly reasoning: {
|
|
45
8
|
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
46
9
|
};
|
|
47
|
-
} | {
|
|
48
|
-
readonly [x: string]: unknown;
|
|
49
|
-
readonly type: string;
|
|
50
|
-
readonly id: string;
|
|
51
|
-
} | {
|
|
52
|
-
readonly type: "compaction";
|
|
53
|
-
readonly id?: string | null | undefined;
|
|
54
|
-
readonly encrypted_content: string;
|
|
55
10
|
} | {
|
|
56
11
|
readonly type: "message";
|
|
57
12
|
readonly role: "system";
|
|
@@ -60,10 +15,45 @@ export declare const protocol: Protocol<{
|
|
|
60
15
|
readonly type: "message";
|
|
61
16
|
readonly role: "developer";
|
|
62
17
|
readonly content: string;
|
|
18
|
+
} | {
|
|
19
|
+
readonly type: "function_call_output";
|
|
20
|
+
readonly call_id: string;
|
|
21
|
+
readonly output: string | readonly ({
|
|
22
|
+
readonly type: "input_text";
|
|
23
|
+
readonly text: string;
|
|
24
|
+
} | {
|
|
25
|
+
readonly type: "input_video";
|
|
26
|
+
readonly video_url: string;
|
|
27
|
+
} | {
|
|
28
|
+
readonly type: "input_image";
|
|
29
|
+
readonly image_url: string;
|
|
30
|
+
readonly detail?: string | undefined;
|
|
31
|
+
} | {
|
|
32
|
+
readonly type: "input_file";
|
|
33
|
+
readonly filename: string;
|
|
34
|
+
readonly detail?: string | undefined;
|
|
35
|
+
readonly file_data?: string | undefined;
|
|
36
|
+
readonly file_url?: string | undefined;
|
|
37
|
+
})[];
|
|
38
|
+
} | {
|
|
39
|
+
readonly type: "reasoning";
|
|
40
|
+
readonly id?: string | undefined;
|
|
41
|
+
readonly summary: readonly {
|
|
42
|
+
readonly type: "summary_text";
|
|
43
|
+
readonly text: string;
|
|
44
|
+
}[];
|
|
45
|
+
readonly encrypted_content?: string | null | undefined;
|
|
46
|
+
} | {
|
|
47
|
+
readonly type: "compaction";
|
|
48
|
+
readonly id?: string | null | undefined;
|
|
49
|
+
readonly encrypted_content: string;
|
|
63
50
|
} | {
|
|
64
51
|
readonly type: "message";
|
|
65
52
|
readonly role: "user";
|
|
66
53
|
readonly content: readonly ({
|
|
54
|
+
readonly type: "input_text";
|
|
55
|
+
readonly text: string;
|
|
56
|
+
} | {
|
|
67
57
|
readonly type: "input_image";
|
|
68
58
|
readonly image_url: string;
|
|
69
59
|
readonly detail?: string | undefined;
|
|
@@ -73,9 +63,6 @@ export declare const protocol: Protocol<{
|
|
|
73
63
|
readonly detail?: string | undefined;
|
|
74
64
|
readonly file_data?: string | undefined;
|
|
75
65
|
readonly file_url?: string | undefined;
|
|
76
|
-
} | {
|
|
77
|
-
readonly type: "input_text";
|
|
78
|
-
readonly text: string;
|
|
79
66
|
})[];
|
|
80
67
|
readonly id?: string | undefined;
|
|
81
68
|
readonly status?: string | undefined;
|
|
@@ -89,14 +76,6 @@ export declare const protocol: Protocol<{
|
|
|
89
76
|
}[];
|
|
90
77
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
91
78
|
readonly status?: string | undefined;
|
|
92
|
-
} | {
|
|
93
|
-
readonly type: "reasoning";
|
|
94
|
-
readonly id?: string | undefined;
|
|
95
|
-
readonly summary: readonly {
|
|
96
|
-
readonly type: "summary_text";
|
|
97
|
-
readonly text: string;
|
|
98
|
-
}[];
|
|
99
|
-
readonly encrypted_content?: string | null | undefined;
|
|
100
79
|
} | {
|
|
101
80
|
readonly type: "function_call";
|
|
102
81
|
readonly id?: string | undefined;
|
|
@@ -105,31 +84,49 @@ export declare const protocol: Protocol<{
|
|
|
105
84
|
readonly namespace?: string | undefined;
|
|
106
85
|
readonly arguments: string;
|
|
107
86
|
} | {
|
|
108
|
-
readonly
|
|
109
|
-
readonly
|
|
110
|
-
readonly
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
readonly
|
|
114
|
-
} |
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
readonly
|
|
123
|
-
} |
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
87
|
+
readonly [x: string]: unknown;
|
|
88
|
+
readonly type: "web_search_call";
|
|
89
|
+
readonly id: string;
|
|
90
|
+
readonly status?: string | undefined;
|
|
91
|
+
readonly action?: {
|
|
92
|
+
readonly [x: string]: unknown;
|
|
93
|
+
} | null | undefined;
|
|
94
|
+
} | {
|
|
95
|
+
readonly [x: string]: unknown;
|
|
96
|
+
readonly type: "file_search_call";
|
|
97
|
+
readonly id: string;
|
|
98
|
+
readonly status?: string | undefined;
|
|
99
|
+
readonly queries?: readonly string[] | undefined;
|
|
100
|
+
readonly results?: readonly {
|
|
101
|
+
readonly [x: string]: unknown;
|
|
102
|
+
}[] | null | undefined;
|
|
103
|
+
} | {
|
|
104
|
+
readonly [x: string]: unknown;
|
|
105
|
+
readonly type: "code_interpreter_call";
|
|
106
|
+
readonly id: string;
|
|
107
|
+
readonly status?: string | undefined;
|
|
108
|
+
readonly code?: string | null | undefined;
|
|
109
|
+
readonly container_id?: string | null | undefined;
|
|
110
|
+
readonly outputs?: readonly {
|
|
111
|
+
readonly [x: string]: unknown;
|
|
112
|
+
}[] | null | undefined;
|
|
113
|
+
} | {
|
|
114
|
+
readonly [x: string]: unknown;
|
|
115
|
+
readonly type: "mcp_call";
|
|
116
|
+
readonly id: string;
|
|
117
|
+
readonly status?: string | undefined;
|
|
118
|
+
readonly server_label?: string | undefined;
|
|
119
|
+
readonly name?: string | undefined;
|
|
120
|
+
readonly arguments?: string | undefined;
|
|
121
|
+
readonly output?: string | null | undefined;
|
|
122
|
+
readonly error?: unknown;
|
|
123
|
+
} | {
|
|
124
|
+
readonly [x: string]: unknown;
|
|
125
|
+
readonly type: string;
|
|
126
|
+
readonly id: string;
|
|
127
127
|
})[];
|
|
128
128
|
readonly instructions?: string | undefined;
|
|
129
129
|
readonly tools?: readonly ({
|
|
130
|
-
readonly [x: string]: unknown;
|
|
131
|
-
readonly type: string;
|
|
132
|
-
} | {
|
|
133
130
|
readonly type: "function";
|
|
134
131
|
readonly name: string;
|
|
135
132
|
readonly description: string;
|
|
@@ -137,6 +134,9 @@ export declare const protocol: Protocol<{
|
|
|
137
134
|
readonly [x: string]: unknown;
|
|
138
135
|
};
|
|
139
136
|
readonly strict?: boolean | undefined;
|
|
137
|
+
} | {
|
|
138
|
+
readonly [x: string]: unknown;
|
|
139
|
+
readonly type: string;
|
|
140
140
|
})[] | undefined;
|
|
141
141
|
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
142
142
|
readonly type: "function";
|