@opencode/ai 2.0.32 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-client.d.ts +2 -2
- package/dist/experimental/evaluation-client.d.ts +1 -1
- package/dist/experimental/evaluation.d.ts +20 -20
- package/dist/experimental/realtime.d.ts +6 -14
- package/dist/experimental/realtime.js +28 -3
- package/dist/experimental/system-one.d.ts +1 -1
- package/dist/image-client.d.ts +8 -8
- package/dist/image.d.ts +593 -437
- package/dist/llm.d.ts +51 -51
- package/dist/media-client.d.ts +1 -1
- package/dist/media.d.ts +4 -4
- package/dist/promise.d.ts +199 -198
- package/dist/protocols/alibaba-chat.d.ts +81 -82
- package/dist/protocols/alibaba-chat.js +0 -1
- package/dist/protocols/alibaba-messages.d.ts +99 -99
- package/dist/protocols/alibaba-responses.d.ts +120 -120
- package/dist/protocols/anthropic-messages.d.ts +187 -187
- package/dist/protocols/anthropic-messages.js +3 -2
- package/dist/protocols/assemblyai-transcription.d.ts +1 -1
- package/dist/protocols/bedrock-converse.d.ts +75 -79
- package/dist/protocols/bfl-images.d.ts +1 -1
- package/dist/protocols/cartesia-speech.d.ts +17 -17
- package/dist/protocols/cohere-chat.d.ts +26 -23
- package/dist/protocols/cohere-chat.js +22 -1
- package/dist/protocols/deepgram-speech.d.ts +17 -17
- package/dist/protocols/deepgram-transcription.d.ts +1 -1
- package/dist/protocols/elevenlabs-speech.d.ts +17 -17
- package/dist/protocols/elevenlabs-transcription.d.ts +1 -1
- package/dist/protocols/fal-images.d.ts +1 -1
- package/dist/protocols/fal-video.d.ts +1 -1
- package/dist/protocols/gemini.d.ts +55 -55
- package/dist/protocols/google-images.d.ts +1 -1
- package/dist/protocols/google-interactions.d.ts +64 -62
- package/dist/protocols/google-interactions.js +19 -1
- package/dist/protocols/google-speech.d.ts +17 -17
- package/dist/protocols/google-transcription.d.ts +47 -47
- package/dist/protocols/google-video.d.ts +1 -1
- package/dist/protocols/meta-messages.d.ts +121 -121
- package/dist/protocols/meta-responses.d.ts +201 -201
- package/dist/protocols/mistral-chat.d.ts +45 -45
- package/dist/protocols/open-responses-channel.d.ts +1 -1
- package/dist/protocols/open-responses.d.ts +584 -450
- package/dist/protocols/open-responses.js +27 -35
- package/dist/protocols/openai-chat.d.ts +248 -248
- package/dist/protocols/openai-chat.js +11 -42
- package/dist/protocols/openai-compatible-chat.d.ts +32 -32
- package/dist/protocols/openai-compatible-responses.d.ts +88 -88
- package/dist/protocols/openai-images.d.ts +17 -17
- package/dist/protocols/openai-responses.d.ts +567 -567
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/protocols/openai-speech.d.ts +17 -17
- package/dist/protocols/openai-transcription.d.ts +47 -47
- package/dist/protocols/replicate-images.d.ts +1 -1
- package/dist/protocols/runway-video.d.ts +1 -1
- package/dist/protocols/shared.d.ts +12 -1
- package/dist/protocols/shared.js +17 -1
- package/dist/protocols/stability-images.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-media.d.ts +4 -4
- package/dist/protocols/utils/openai-options.d.ts +1 -1
- package/dist/protocols/utils/speech-stream.d.ts +1 -1
- package/dist/protocols/utils/tool-schema.d.ts +10 -5
- package/dist/protocols/utils/tool-stream.d.ts +152 -152
- package/dist/protocols/venice-chat.d.ts +109 -110
- package/dist/protocols/venice-chat.js +0 -1
- package/dist/protocols/xai-images.d.ts +1 -1
- package/dist/protocols/xai-responses.d.ts +79 -79
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/zai-chat.d.ts +77 -78
- package/dist/protocols/zai-chat.js +0 -1
- package/dist/protocols/zai-images.d.ts +1 -1
- package/dist/protocols/zai-messages.d.ts +97 -97
- package/dist/providers/alibaba.d.ts +222 -283
- package/dist/providers/amazon-bedrock-mantle.d.ts +291 -298
- package/dist/providers/amazon-bedrock.d.ts +22 -28
- package/dist/providers/anthropic-compatible.d.ts +86 -90
- package/dist/providers/anthropic.d.ts +86 -90
- package/dist/providers/assemblyai.d.ts +2 -6
- package/dist/providers/azure.d.ts +228 -238
- package/dist/providers/baseten.d.ts +66 -70
- package/dist/providers/black-forest-labs.d.ts +2 -6
- package/dist/providers/cartesia.d.ts +2 -6
- package/dist/providers/cerebras.d.ts +66 -70
- package/dist/providers/cerebras.js +0 -1
- package/dist/providers/cloudflare-ai-gateway.d.ts +352 -356
- package/dist/providers/cloudflare-workers-ai.d.ts +66 -70
- package/dist/providers/cohere.d.ts +122 -132
- package/dist/providers/cohere.js +0 -2
- package/dist/providers/deepgram.d.ts +2 -7
- package/dist/providers/deepinfra.d.ts +66 -70
- package/dist/providers/deepinfra.js +0 -1
- package/dist/providers/deepseek.d.ts +66 -70
- package/dist/providers/deepseek.js +1 -1
- package/dist/providers/digitalocean.d.ts +137 -141
- package/dist/providers/elevenlabs.d.ts +2 -7
- package/dist/providers/fal.d.ts +2 -7
- package/dist/providers/fireworks.d.ts +66 -70
- package/dist/providers/google-vertex-chat.d.ts +34 -38
- package/dist/providers/google-vertex-interactions.d.ts +31 -41
- package/dist/providers/google-vertex-messages.d.ts +81 -85
- package/dist/providers/google-vertex-mistral.d.ts +23 -27
- package/dist/providers/google-vertex-responses.d.ts +90 -94
- package/dist/providers/google-vertex.d.ts +26 -30
- package/dist/providers/google.d.ts +94 -109
- package/dist/providers/groq.d.ts +111 -115
- package/dist/providers/groq.js +0 -1
- package/dist/providers/meta.d.ts +309 -317
- package/dist/providers/meta.js +1 -1
- package/dist/providers/minimax.d.ts +296 -303
- package/dist/providers/minimax.js +1 -1
- package/dist/providers/mistral.d.ts +22 -26
- package/dist/providers/moonshot.d.ts +296 -303
- package/dist/providers/moonshot.js +0 -1
- package/dist/providers/openai-compatible-responses.d.ts +90 -94
- package/dist/providers/openai-compatible.d.ts +34 -38
- package/dist/providers/openai.d.ts +93 -108
- package/dist/providers/opencode.d.ts +2 -8
- package/dist/providers/openrouter.d.ts +137 -144
- package/dist/providers/replicate.d.ts +2 -6
- package/dist/providers/runway.d.ts +2 -6
- package/dist/providers/stability.d.ts +2 -7
- package/dist/providers/togetherai.d.ts +66 -70
- package/dist/providers/togetherai.js +1 -1
- package/dist/providers/typesafe-ai.d.ts +2 -8
- package/dist/providers/venice.d.ts +58 -63
- package/dist/providers/vercel-ai-gateway.d.ts +2 -12
- package/dist/providers/xai.d.ts +38 -50
- package/dist/providers/zai-coding-plan.d.ts +206 -213
- package/dist/providers/zai.d.ts +40 -46
- package/dist/route/client.d.ts +51 -51
- package/dist/route/media-protocol.d.ts +1 -1
- package/dist/route/transport/http.d.ts +1 -1
- package/dist/route/transport/websocket.d.ts +8 -8
- package/dist/schema/errors.d.ts +19 -19
- package/dist/schema/events.d.ts +3090 -3288
- package/dist/schema/messages.d.ts +8 -7
- package/dist/schema/options.d.ts +2 -1
- package/dist/schema/options.js +2 -1
- package/dist/speech-client.d.ts +8 -8
- package/dist/speech.d.ts +434 -398
- package/dist/testing.d.ts +338 -338
- package/dist/tool-runtime.d.ts +1 -1
- package/dist/transcription-client.d.ts +23 -23
- package/dist/transcription.d.ts +562 -646
- package/dist/utils/sanitize.d.ts +4 -0
- package/dist/utils/sanitize.js +23 -6
- package/dist/video-client.d.ts +8 -8
- package/dist/video.d.ts +416 -372
- package/package.json +6 -6
|
@@ -16,12 +16,12 @@ export type DeepgramSpeechOptions = {
|
|
|
16
16
|
} & Record<string, unknown>;
|
|
17
17
|
export type Request = SpeechRequestFor<DeepgramSpeechOptions>;
|
|
18
18
|
export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
19
|
-
readonly id: string;
|
|
20
19
|
readonly type: "generation-queued";
|
|
20
|
+
readonly id: string;
|
|
21
21
|
readonly position?: number | undefined;
|
|
22
22
|
} | {
|
|
23
|
-
readonly id: string;
|
|
24
23
|
readonly type: "generation-progress";
|
|
24
|
+
readonly id: string;
|
|
25
25
|
readonly progress?: number | undefined;
|
|
26
26
|
} | {
|
|
27
27
|
readonly type: "audio-delta";
|
|
@@ -36,11 +36,6 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
36
36
|
} | {
|
|
37
37
|
readonly type: "finish";
|
|
38
38
|
readonly audio: import("../media.js").Asset;
|
|
39
|
-
readonly providerMetadata?: {
|
|
40
|
-
readonly [x: string]: {
|
|
41
|
-
readonly [x: string]: unknown;
|
|
42
|
-
};
|
|
43
|
-
} | undefined;
|
|
44
39
|
readonly usage?: {
|
|
45
40
|
readonly type: "tokens";
|
|
46
41
|
readonly input?: number | undefined;
|
|
@@ -63,7 +58,7 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
63
58
|
readonly seconds: number;
|
|
64
59
|
} | undefined;
|
|
65
60
|
readonly notices?: readonly {
|
|
66
|
-
readonly type: "
|
|
61
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
67
62
|
readonly message: string;
|
|
68
63
|
readonly providerMetadata?: {
|
|
69
64
|
readonly [x: string]: {
|
|
@@ -71,16 +66,21 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
71
66
|
};
|
|
72
67
|
} | undefined;
|
|
73
68
|
}[] | undefined;
|
|
69
|
+
readonly providerMetadata?: {
|
|
70
|
+
readonly [x: string]: {
|
|
71
|
+
readonly [x: string]: unknown;
|
|
72
|
+
};
|
|
73
|
+
} | undefined;
|
|
74
74
|
}, Uint8Array<ArrayBufferLike>, SpeechStream.Audio>;
|
|
75
75
|
export declare const model: (input: MediaRoute.ModelInput) => SpeechModel<DeepgramSpeechOptions>;
|
|
76
76
|
export declare const DeepgramSpeech: {
|
|
77
77
|
readonly protocol: MediaProtocol.Streamed<Request, {
|
|
78
|
-
readonly id: string;
|
|
79
78
|
readonly type: "generation-queued";
|
|
79
|
+
readonly id: string;
|
|
80
80
|
readonly position?: number | undefined;
|
|
81
81
|
} | {
|
|
82
|
-
readonly id: string;
|
|
83
82
|
readonly type: "generation-progress";
|
|
83
|
+
readonly id: string;
|
|
84
84
|
readonly progress?: number | undefined;
|
|
85
85
|
} | {
|
|
86
86
|
readonly type: "audio-delta";
|
|
@@ -95,11 +95,6 @@ export declare const DeepgramSpeech: {
|
|
|
95
95
|
} | {
|
|
96
96
|
readonly type: "finish";
|
|
97
97
|
readonly audio: import("../media.js").Asset;
|
|
98
|
-
readonly providerMetadata?: {
|
|
99
|
-
readonly [x: string]: {
|
|
100
|
-
readonly [x: string]: unknown;
|
|
101
|
-
};
|
|
102
|
-
} | undefined;
|
|
103
98
|
readonly usage?: {
|
|
104
99
|
readonly type: "tokens";
|
|
105
100
|
readonly input?: number | undefined;
|
|
@@ -122,7 +117,7 @@ export declare const DeepgramSpeech: {
|
|
|
122
117
|
readonly seconds: number;
|
|
123
118
|
} | undefined;
|
|
124
119
|
readonly notices?: readonly {
|
|
125
|
-
readonly type: "
|
|
120
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
126
121
|
readonly message: string;
|
|
127
122
|
readonly providerMetadata?: {
|
|
128
123
|
readonly [x: string]: {
|
|
@@ -130,6 +125,11 @@ export declare const DeepgramSpeech: {
|
|
|
130
125
|
};
|
|
131
126
|
} | undefined;
|
|
132
127
|
}[] | undefined;
|
|
128
|
+
readonly providerMetadata?: {
|
|
129
|
+
readonly [x: string]: {
|
|
130
|
+
readonly [x: string]: unknown;
|
|
131
|
+
};
|
|
132
|
+
} | undefined;
|
|
133
133
|
}, Uint8Array<ArrayBufferLike>, SpeechStream.Audio>;
|
|
134
|
-
readonly model:
|
|
134
|
+
readonly model: typeof model;
|
|
135
135
|
};
|
|
@@ -22,5 +22,5 @@ export declare const protocol: MediaProtocol.Inline<Request, TranscriptionRespon
|
|
|
22
22
|
export declare const model: (input: MediaRoute.ModelInput) => TranscriptionModel<DeepgramTranscriptionOptions>;
|
|
23
23
|
export declare const DeepgramTranscription: {
|
|
24
24
|
readonly protocol: MediaProtocol.Inline<Request, TranscriptionResponse>;
|
|
25
|
-
readonly model:
|
|
25
|
+
readonly model: typeof model;
|
|
26
26
|
};
|
|
@@ -19,12 +19,12 @@ export type ElevenLabsSpeechOptions = {
|
|
|
19
19
|
} & Record<string, unknown>;
|
|
20
20
|
export type Request = SpeechRequestFor<ElevenLabsSpeechOptions>;
|
|
21
21
|
export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
22
|
-
readonly id: string;
|
|
23
22
|
readonly type: "generation-queued";
|
|
23
|
+
readonly id: string;
|
|
24
24
|
readonly position?: number | undefined;
|
|
25
25
|
} | {
|
|
26
|
-
readonly id: string;
|
|
27
26
|
readonly type: "generation-progress";
|
|
27
|
+
readonly id: string;
|
|
28
28
|
readonly progress?: number | undefined;
|
|
29
29
|
} | {
|
|
30
30
|
readonly type: "audio-delta";
|
|
@@ -39,11 +39,6 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
39
39
|
} | {
|
|
40
40
|
readonly type: "finish";
|
|
41
41
|
readonly audio: import("../media.js").Asset;
|
|
42
|
-
readonly providerMetadata?: {
|
|
43
|
-
readonly [x: string]: {
|
|
44
|
-
readonly [x: string]: unknown;
|
|
45
|
-
};
|
|
46
|
-
} | undefined;
|
|
47
42
|
readonly usage?: {
|
|
48
43
|
readonly type: "tokens";
|
|
49
44
|
readonly input?: number | undefined;
|
|
@@ -66,7 +61,7 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
66
61
|
readonly seconds: number;
|
|
67
62
|
} | undefined;
|
|
68
63
|
readonly notices?: readonly {
|
|
69
|
-
readonly type: "
|
|
64
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
70
65
|
readonly message: string;
|
|
71
66
|
readonly providerMetadata?: {
|
|
72
67
|
readonly [x: string]: {
|
|
@@ -74,16 +69,21 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
74
69
|
};
|
|
75
70
|
} | undefined;
|
|
76
71
|
}[] | undefined;
|
|
72
|
+
readonly providerMetadata?: {
|
|
73
|
+
readonly [x: string]: {
|
|
74
|
+
readonly [x: string]: unknown;
|
|
75
|
+
};
|
|
76
|
+
} | undefined;
|
|
77
77
|
}, string | Uint8Array<ArrayBufferLike>, SpeechStream.Audio>;
|
|
78
78
|
export declare const model: (input: MediaRoute.ModelInput) => SpeechModel<ElevenLabsSpeechOptions>;
|
|
79
79
|
export declare const ElevenLabsSpeech: {
|
|
80
80
|
readonly protocol: MediaProtocol.Streamed<Request, {
|
|
81
|
-
readonly id: string;
|
|
82
81
|
readonly type: "generation-queued";
|
|
82
|
+
readonly id: string;
|
|
83
83
|
readonly position?: number | undefined;
|
|
84
84
|
} | {
|
|
85
|
-
readonly id: string;
|
|
86
85
|
readonly type: "generation-progress";
|
|
86
|
+
readonly id: string;
|
|
87
87
|
readonly progress?: number | undefined;
|
|
88
88
|
} | {
|
|
89
89
|
readonly type: "audio-delta";
|
|
@@ -98,11 +98,6 @@ export declare const ElevenLabsSpeech: {
|
|
|
98
98
|
} | {
|
|
99
99
|
readonly type: "finish";
|
|
100
100
|
readonly audio: import("../media.js").Asset;
|
|
101
|
-
readonly providerMetadata?: {
|
|
102
|
-
readonly [x: string]: {
|
|
103
|
-
readonly [x: string]: unknown;
|
|
104
|
-
};
|
|
105
|
-
} | undefined;
|
|
106
101
|
readonly usage?: {
|
|
107
102
|
readonly type: "tokens";
|
|
108
103
|
readonly input?: number | undefined;
|
|
@@ -125,7 +120,7 @@ export declare const ElevenLabsSpeech: {
|
|
|
125
120
|
readonly seconds: number;
|
|
126
121
|
} | undefined;
|
|
127
122
|
readonly notices?: readonly {
|
|
128
|
-
readonly type: "
|
|
123
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
129
124
|
readonly message: string;
|
|
130
125
|
readonly providerMetadata?: {
|
|
131
126
|
readonly [x: string]: {
|
|
@@ -133,6 +128,11 @@ export declare const ElevenLabsSpeech: {
|
|
|
133
128
|
};
|
|
134
129
|
} | undefined;
|
|
135
130
|
}[] | undefined;
|
|
131
|
+
readonly providerMetadata?: {
|
|
132
|
+
readonly [x: string]: {
|
|
133
|
+
readonly [x: string]: unknown;
|
|
134
|
+
};
|
|
135
|
+
} | undefined;
|
|
136
136
|
}, string | Uint8Array<ArrayBufferLike>, SpeechStream.Audio>;
|
|
137
|
-
readonly model:
|
|
137
|
+
readonly model: typeof model;
|
|
138
138
|
};
|
|
@@ -24,5 +24,5 @@ export declare const protocol: MediaProtocol.Inline<Request, TranscriptionRespon
|
|
|
24
24
|
export declare const model: (input: MediaRoute.ModelInput) => TranscriptionModel<ElevenLabsTranscriptionOptions>;
|
|
25
25
|
export declare const ElevenLabsTranscription: {
|
|
26
26
|
readonly protocol: MediaProtocol.Inline<Request, TranscriptionResponse>;
|
|
27
|
-
readonly model:
|
|
27
|
+
readonly model: typeof model;
|
|
28
28
|
};
|
|
@@ -11,14 +11,14 @@ export type ProviderOptionsInput = OptionsInput;
|
|
|
11
11
|
declare const Options: Schema.Struct<{
|
|
12
12
|
readonly cachedContent: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.String>, never>>;
|
|
13
13
|
readonly safetySettings: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.$Array<Schema.Struct<{
|
|
14
|
-
readonly category: Schema.declare<import("../schema/options.js").OpenString<"
|
|
15
|
-
readonly threshold: Schema.declare<import("../schema/options.js").OpenString<"
|
|
14
|
+
readonly category: Schema.declare<import("../schema/options.js").OpenString<"HARM_CATEGORY_CIVIC_INTEGRITY" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_UNSPECIFIED">, import("../schema/options.js").OpenString<"HARM_CATEGORY_CIVIC_INTEGRITY" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_UNSPECIFIED">>;
|
|
15
|
+
readonly threshold: Schema.declare<import("../schema/options.js").OpenString<"BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_NONE" | "BLOCK_ONLY_HIGH" | "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "OFF">, import("../schema/options.js").OpenString<"BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_NONE" | "BLOCK_ONLY_HIGH" | "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "OFF">>;
|
|
16
16
|
}>>>, never>>;
|
|
17
|
-
readonly serviceTier: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.declare<import("../schema/options.js").OpenString<"
|
|
17
|
+
readonly serviceTier: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.declare<import("../schema/options.js").OpenString<"flex" | "priority" | "standard">, import("../schema/options.js").OpenString<"flex" | "priority" | "standard">>>, never>>;
|
|
18
18
|
readonly thinkingConfig: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Struct<{
|
|
19
19
|
readonly thinkingBudget: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
|
|
20
20
|
readonly includeThoughts: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Boolean>, never>>;
|
|
21
|
-
readonly thinkingLevel: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.declare<import("../schema/options.js").OpenString<"
|
|
21
|
+
readonly thinkingLevel: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.declare<import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal">, import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal">>>, never>>;
|
|
22
22
|
}>>, never>>;
|
|
23
23
|
}>;
|
|
24
24
|
declare const GeminiBody: Schema.Struct<{
|
|
@@ -64,8 +64,8 @@ declare const GeminiBody: Schema.Struct<{
|
|
|
64
64
|
}>>;
|
|
65
65
|
labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
66
66
|
safetySettings: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
67
|
-
readonly category: Schema.declare<import("../schema/options.js").OpenString<"
|
|
68
|
-
readonly threshold: Schema.declare<import("../schema/options.js").OpenString<"
|
|
67
|
+
readonly category: Schema.declare<import("../schema/options.js").OpenString<"HARM_CATEGORY_CIVIC_INTEGRITY" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_UNSPECIFIED">, import("../schema/options.js").OpenString<"HARM_CATEGORY_CIVIC_INTEGRITY" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_UNSPECIFIED">>;
|
|
68
|
+
readonly threshold: Schema.declare<import("../schema/options.js").OpenString<"BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_NONE" | "BLOCK_ONLY_HIGH" | "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "OFF">, import("../schema/options.js").OpenString<"BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_NONE" | "BLOCK_ONLY_HIGH" | "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "OFF">>;
|
|
69
69
|
}>>>;
|
|
70
70
|
serviceTier: Schema.optional<Schema.String>;
|
|
71
71
|
systemInstruction: Schema.optional<Schema.Struct<{
|
|
@@ -98,7 +98,7 @@ declare const GeminiBody: Schema.Struct<{
|
|
|
98
98
|
readonly thinkingConfig: Schema.optional<Schema.Struct<{
|
|
99
99
|
readonly thinkingBudget: Schema.optional<Schema.Number>;
|
|
100
100
|
readonly includeThoughts: Schema.optional<Schema.Boolean>;
|
|
101
|
-
readonly thinkingLevel: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"
|
|
101
|
+
readonly thinkingLevel: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal">, import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal">>>;
|
|
102
102
|
}>>;
|
|
103
103
|
}>>;
|
|
104
104
|
continuationToken: Schema.optional<Schema.String>;
|
|
@@ -154,7 +154,9 @@ export declare const transport: Transport<GeminiBody, Prepared, unknown>;
|
|
|
154
154
|
* streaming-event state machine shared by Google AI Studio and Vertex Gemini.
|
|
155
155
|
*/
|
|
156
156
|
export declare const protocol: Protocol<{
|
|
157
|
+
readonly cachedContent?: string | undefined;
|
|
157
158
|
readonly contents: readonly {
|
|
159
|
+
readonly role?: "model" | "user" | null | undefined;
|
|
158
160
|
readonly parts?: readonly ({
|
|
159
161
|
readonly inlineData: {
|
|
160
162
|
readonly mimeType: string;
|
|
@@ -172,16 +174,16 @@ export declare const protocol: Protocol<{
|
|
|
172
174
|
};
|
|
173
175
|
} | {
|
|
174
176
|
readonly functionCall: {
|
|
175
|
-
readonly name: string;
|
|
176
177
|
readonly id?: string | null | undefined;
|
|
178
|
+
readonly name: string;
|
|
177
179
|
readonly args?: unknown;
|
|
178
180
|
};
|
|
179
181
|
readonly thoughtSignature?: string | null | undefined;
|
|
180
182
|
} | {
|
|
181
183
|
readonly functionResponse: {
|
|
184
|
+
readonly id?: string | undefined;
|
|
182
185
|
readonly name: string;
|
|
183
186
|
readonly response: unknown;
|
|
184
|
-
readonly id?: string | undefined;
|
|
185
187
|
readonly parts?: readonly {
|
|
186
188
|
readonly inlineData: {
|
|
187
189
|
readonly mimeType: string;
|
|
@@ -191,8 +193,20 @@ export declare const protocol: Protocol<{
|
|
|
191
193
|
}[] | undefined;
|
|
192
194
|
};
|
|
193
195
|
})[] | null | undefined;
|
|
194
|
-
readonly role?: "model" | "user" | null | undefined;
|
|
195
196
|
}[];
|
|
197
|
+
readonly labels?: {
|
|
198
|
+
readonly [x: string]: string;
|
|
199
|
+
} | undefined;
|
|
200
|
+
readonly safetySettings?: readonly {
|
|
201
|
+
readonly category: import("../schema/options.js").OpenString<"HARM_CATEGORY_CIVIC_INTEGRITY" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_UNSPECIFIED">;
|
|
202
|
+
readonly threshold: import("../schema/options.js").OpenString<"BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_NONE" | "BLOCK_ONLY_HIGH" | "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "OFF">;
|
|
203
|
+
}[] | undefined;
|
|
204
|
+
readonly serviceTier?: string | undefined;
|
|
205
|
+
readonly systemInstruction?: {
|
|
206
|
+
readonly parts: readonly {
|
|
207
|
+
readonly text: string;
|
|
208
|
+
}[];
|
|
209
|
+
} | undefined;
|
|
196
210
|
readonly tools?: readonly {
|
|
197
211
|
readonly functionDeclarations: readonly {
|
|
198
212
|
readonly name: string;
|
|
@@ -202,27 +216,14 @@ export declare const protocol: Protocol<{
|
|
|
202
216
|
};
|
|
203
217
|
}[];
|
|
204
218
|
}[] | undefined;
|
|
205
|
-
readonly serviceTier?: string | undefined;
|
|
206
219
|
readonly toolConfig?: {
|
|
207
220
|
readonly functionCallingConfig: {
|
|
208
|
-
readonly mode: "
|
|
221
|
+
readonly mode: "ANY" | "AUTO" | "NONE";
|
|
209
222
|
readonly allowedFunctionNames?: readonly string[] | undefined;
|
|
210
223
|
};
|
|
211
224
|
} | undefined;
|
|
212
|
-
readonly cachedContent?: string | undefined;
|
|
213
|
-
readonly safetySettings?: readonly {
|
|
214
|
-
readonly category: import("../schema/options.js").OpenString<"HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_CIVIC_INTEGRITY">;
|
|
215
|
-
readonly threshold: import("../schema/options.js").OpenString<"HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF">;
|
|
216
|
-
}[] | undefined;
|
|
217
|
-
readonly labels?: {
|
|
218
|
-
readonly [x: string]: string;
|
|
219
|
-
} | undefined;
|
|
220
|
-
readonly systemInstruction?: {
|
|
221
|
-
readonly parts: readonly {
|
|
222
|
-
readonly text: string;
|
|
223
|
-
}[];
|
|
224
|
-
} | undefined;
|
|
225
225
|
readonly generationConfig?: {
|
|
226
|
+
readonly maxOutputTokens?: number | undefined;
|
|
226
227
|
readonly temperature?: number | undefined;
|
|
227
228
|
readonly topP?: number | undefined;
|
|
228
229
|
readonly topK?: number | undefined;
|
|
@@ -233,17 +234,16 @@ export declare const protocol: Protocol<{
|
|
|
233
234
|
readonly thinkingConfig?: {
|
|
234
235
|
readonly thinkingBudget?: number | undefined;
|
|
235
236
|
readonly includeThoughts?: boolean | undefined;
|
|
236
|
-
readonly thinkingLevel?: import("../schema/options.js").OpenString<"
|
|
237
|
+
readonly thinkingLevel?: import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal"> | undefined;
|
|
237
238
|
} | undefined;
|
|
238
|
-
readonly maxOutputTokens?: number | undefined;
|
|
239
239
|
} | undefined;
|
|
240
240
|
readonly continuationToken?: string | undefined;
|
|
241
241
|
}, NextRequest | {
|
|
242
242
|
readonly error?: unknown;
|
|
243
243
|
readonly candidates?: readonly {
|
|
244
244
|
readonly content?: {
|
|
245
|
-
readonly parts?: readonly unknown[] | null | undefined;
|
|
246
245
|
readonly role?: "model" | "user" | null | undefined;
|
|
246
|
+
readonly parts?: readonly unknown[] | null | undefined;
|
|
247
247
|
} | null | undefined;
|
|
248
248
|
readonly finishReason?: string | null | undefined;
|
|
249
249
|
}[] | null | undefined;
|
|
@@ -254,18 +254,18 @@ export declare const protocol: Protocol<{
|
|
|
254
254
|
readonly safetyRatings?: unknown;
|
|
255
255
|
} | null | undefined;
|
|
256
256
|
readonly usageMetadata?: {
|
|
257
|
+
readonly cachedContentTokenCount?: number | null | undefined;
|
|
258
|
+
readonly thoughtsTokenCount?: number | null | undefined;
|
|
257
259
|
readonly promptTokenCount?: number | null | undefined;
|
|
258
260
|
readonly candidatesTokenCount?: number | null | undefined;
|
|
259
261
|
readonly totalTokenCount?: number | null | undefined;
|
|
260
|
-
readonly cachedContentTokenCount?: number | null | undefined;
|
|
261
|
-
readonly thoughtsTokenCount?: number | null | undefined;
|
|
262
262
|
} | null | undefined;
|
|
263
|
-
}, {
|
|
263
|
+
}, NextRequest | {
|
|
264
264
|
readonly error?: unknown;
|
|
265
265
|
readonly candidates?: readonly {
|
|
266
266
|
readonly content?: {
|
|
267
|
-
readonly parts?: readonly unknown[] | null | undefined;
|
|
268
267
|
readonly role?: "model" | "user" | null | undefined;
|
|
268
|
+
readonly parts?: readonly unknown[] | null | undefined;
|
|
269
269
|
} | null | undefined;
|
|
270
270
|
readonly finishReason?: string | null | undefined;
|
|
271
271
|
}[] | null | undefined;
|
|
@@ -276,15 +276,17 @@ export declare const protocol: Protocol<{
|
|
|
276
276
|
readonly safetyRatings?: unknown;
|
|
277
277
|
} | null | undefined;
|
|
278
278
|
readonly usageMetadata?: {
|
|
279
|
+
readonly cachedContentTokenCount?: number | null | undefined;
|
|
280
|
+
readonly thoughtsTokenCount?: number | null | undefined;
|
|
279
281
|
readonly promptTokenCount?: number | null | undefined;
|
|
280
282
|
readonly candidatesTokenCount?: number | null | undefined;
|
|
281
283
|
readonly totalTokenCount?: number | null | undefined;
|
|
282
|
-
readonly cachedContentTokenCount?: number | null | undefined;
|
|
283
|
-
readonly thoughtsTokenCount?: number | null | undefined;
|
|
284
284
|
} | null | undefined;
|
|
285
|
-
}
|
|
285
|
+
}, ParserState>;
|
|
286
286
|
export declare const route: Route<{
|
|
287
|
+
readonly cachedContent?: string | undefined;
|
|
287
288
|
readonly contents: readonly {
|
|
289
|
+
readonly role?: "model" | "user" | null | undefined;
|
|
288
290
|
readonly parts?: readonly ({
|
|
289
291
|
readonly inlineData: {
|
|
290
292
|
readonly mimeType: string;
|
|
@@ -302,16 +304,16 @@ export declare const route: Route<{
|
|
|
302
304
|
};
|
|
303
305
|
} | {
|
|
304
306
|
readonly functionCall: {
|
|
305
|
-
readonly name: string;
|
|
306
307
|
readonly id?: string | null | undefined;
|
|
308
|
+
readonly name: string;
|
|
307
309
|
readonly args?: unknown;
|
|
308
310
|
};
|
|
309
311
|
readonly thoughtSignature?: string | null | undefined;
|
|
310
312
|
} | {
|
|
311
313
|
readonly functionResponse: {
|
|
314
|
+
readonly id?: string | undefined;
|
|
312
315
|
readonly name: string;
|
|
313
316
|
readonly response: unknown;
|
|
314
|
-
readonly id?: string | undefined;
|
|
315
317
|
readonly parts?: readonly {
|
|
316
318
|
readonly inlineData: {
|
|
317
319
|
readonly mimeType: string;
|
|
@@ -321,8 +323,20 @@ export declare const route: Route<{
|
|
|
321
323
|
}[] | undefined;
|
|
322
324
|
};
|
|
323
325
|
})[] | null | undefined;
|
|
324
|
-
readonly role?: "model" | "user" | null | undefined;
|
|
325
326
|
}[];
|
|
327
|
+
readonly labels?: {
|
|
328
|
+
readonly [x: string]: string;
|
|
329
|
+
} | undefined;
|
|
330
|
+
readonly safetySettings?: readonly {
|
|
331
|
+
readonly category: import("../schema/options.js").OpenString<"HARM_CATEGORY_CIVIC_INTEGRITY" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_UNSPECIFIED">;
|
|
332
|
+
readonly threshold: import("../schema/options.js").OpenString<"BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_NONE" | "BLOCK_ONLY_HIGH" | "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "OFF">;
|
|
333
|
+
}[] | undefined;
|
|
334
|
+
readonly serviceTier?: string | undefined;
|
|
335
|
+
readonly systemInstruction?: {
|
|
336
|
+
readonly parts: readonly {
|
|
337
|
+
readonly text: string;
|
|
338
|
+
}[];
|
|
339
|
+
} | undefined;
|
|
326
340
|
readonly tools?: readonly {
|
|
327
341
|
readonly functionDeclarations: readonly {
|
|
328
342
|
readonly name: string;
|
|
@@ -332,27 +346,14 @@ export declare const route: Route<{
|
|
|
332
346
|
};
|
|
333
347
|
}[];
|
|
334
348
|
}[] | undefined;
|
|
335
|
-
readonly serviceTier?: string | undefined;
|
|
336
349
|
readonly toolConfig?: {
|
|
337
350
|
readonly functionCallingConfig: {
|
|
338
|
-
readonly mode: "
|
|
351
|
+
readonly mode: "ANY" | "AUTO" | "NONE";
|
|
339
352
|
readonly allowedFunctionNames?: readonly string[] | undefined;
|
|
340
353
|
};
|
|
341
354
|
} | undefined;
|
|
342
|
-
readonly cachedContent?: string | undefined;
|
|
343
|
-
readonly safetySettings?: readonly {
|
|
344
|
-
readonly category: import("../schema/options.js").OpenString<"HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_CIVIC_INTEGRITY">;
|
|
345
|
-
readonly threshold: import("../schema/options.js").OpenString<"HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF">;
|
|
346
|
-
}[] | undefined;
|
|
347
|
-
readonly labels?: {
|
|
348
|
-
readonly [x: string]: string;
|
|
349
|
-
} | undefined;
|
|
350
|
-
readonly systemInstruction?: {
|
|
351
|
-
readonly parts: readonly {
|
|
352
|
-
readonly text: string;
|
|
353
|
-
}[];
|
|
354
|
-
} | undefined;
|
|
355
355
|
readonly generationConfig?: {
|
|
356
|
+
readonly maxOutputTokens?: number | undefined;
|
|
356
357
|
readonly temperature?: number | undefined;
|
|
357
358
|
readonly topP?: number | undefined;
|
|
358
359
|
readonly topK?: number | undefined;
|
|
@@ -363,9 +364,8 @@ export declare const route: Route<{
|
|
|
363
364
|
readonly thinkingConfig?: {
|
|
364
365
|
readonly thinkingBudget?: number | undefined;
|
|
365
366
|
readonly includeThoughts?: boolean | undefined;
|
|
366
|
-
readonly thinkingLevel?: import("../schema/options.js").OpenString<"
|
|
367
|
+
readonly thinkingLevel?: import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal"> | undefined;
|
|
367
368
|
} | undefined;
|
|
368
|
-
readonly maxOutputTokens?: number | undefined;
|
|
369
369
|
} | undefined;
|
|
370
370
|
readonly continuationToken?: string | undefined;
|
|
371
371
|
}, Prepared, import("../route/client.js").CompactionOperations | undefined>;
|
|
@@ -14,5 +14,5 @@ export declare const protocol: MediaProtocol.Inline<Request, ImageResponse>;
|
|
|
14
14
|
export declare const model: (input: MediaRoute.ModelInput) => ImageModel<GoogleImageOptions>;
|
|
15
15
|
export declare const GoogleImages: {
|
|
16
16
|
readonly protocol: MediaProtocol.Inline<Request, ImageResponse>;
|
|
17
|
-
readonly model:
|
|
17
|
+
readonly model: typeof model;
|
|
18
18
|
};
|