@opencode/ai 2.0.17 → 2.0.19

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.
Files changed (72) hide show
  1. package/README.md +24 -12
  2. package/dist/cache-policy.js +1 -0
  3. package/dist/experimental/evaluation.d.ts +7 -0
  4. package/dist/experimental/evaluation.js +2 -0
  5. package/dist/experimental/system-one.js +10 -7
  6. package/dist/generation.d.ts +1 -1
  7. package/dist/generation.js +23 -18
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.js +1 -1
  10. package/dist/promise.d.ts +1 -1
  11. package/dist/promise.js +4 -3
  12. package/dist/protocols/alibaba-chat.d.ts +8 -2
  13. package/dist/protocols/deepgram-speech.js +9 -7
  14. package/dist/protocols/deepgram-transcription.js +4 -10
  15. package/dist/protocols/elevenlabs-transcription.d.ts +28 -0
  16. package/dist/protocols/elevenlabs-transcription.js +137 -0
  17. package/dist/protocols/gemini.js +1 -10
  18. package/dist/protocols/google-speech.js +9 -2
  19. package/dist/protocols/google-transcription.js +4 -0
  20. package/dist/protocols/google-video.js +11 -2
  21. package/dist/protocols/openai-chat.d.ts +53 -10
  22. package/dist/protocols/openai-chat.js +21 -8
  23. package/dist/protocols/openai-compatible-chat.d.ts +7 -2
  24. package/dist/protocols/openai-speech.js +6 -1
  25. package/dist/protocols/openai-transcription.js +1 -1
  26. package/dist/protocols/runway-video.js +2 -1
  27. package/dist/protocols/utils/gemini-generate-content.d.ts +6 -0
  28. package/dist/protocols/utils/gemini-generate-content.js +33 -0
  29. package/dist/protocols/utils/media-input.d.ts +4 -3
  30. package/dist/protocols/utils/media-input.js +5 -4
  31. package/dist/protocols/utils/speaker-turns.d.ts +3 -0
  32. package/dist/protocols/utils/speaker-turns.js +9 -0
  33. package/dist/protocols/utils/speech-stream.d.ts +1 -0
  34. package/dist/protocols/utils/speech-stream.js +1 -0
  35. package/dist/protocols/utils/tool-stream.d.ts +1 -0
  36. package/dist/protocols/utils/tool-stream.js +1 -1
  37. package/dist/protocols/xai-video.js +7 -1
  38. package/dist/protocols/zai-chat.d.ts +8 -2
  39. package/dist/provider-error.d.ts +5 -0
  40. package/dist/provider-error.js +46 -1
  41. package/dist/providers/alibaba.d.ts +7 -2
  42. package/dist/providers/amazon-bedrock-mantle.d.ts +7 -2
  43. package/dist/providers/anthropic-compatible.js +3 -2
  44. package/dist/providers/azure.d.ts +7 -2
  45. package/dist/providers/baseten.d.ts +14 -4
  46. package/dist/providers/cerebras.d.ts +14 -4
  47. package/dist/providers/cloudflare-ai-gateway.d.ts +14 -4
  48. package/dist/providers/cloudflare-workers-ai.d.ts +14 -4
  49. package/dist/providers/deepinfra.d.ts +14 -4
  50. package/dist/providers/deepseek.d.ts +14 -4
  51. package/dist/providers/elevenlabs.d.ts +5 -0
  52. package/dist/providers/elevenlabs.js +4 -0
  53. package/dist/providers/fireworks.d.ts +14 -4
  54. package/dist/providers/google-vertex-chat.d.ts +7 -2
  55. package/dist/providers/groq.d.ts +15 -4
  56. package/dist/providers/meta.d.ts +7 -2
  57. package/dist/providers/minimax.d.ts +7 -2
  58. package/dist/providers/moonshot.d.ts +7 -2
  59. package/dist/providers/openai-compatible.d.ts +7 -2
  60. package/dist/providers/openai.d.ts +7 -2
  61. package/dist/providers/openrouter.d.ts +27 -6
  62. package/dist/providers/togetherai.d.ts +14 -4
  63. package/dist/providers/xai.d.ts +7 -2
  64. package/dist/providers/xai.js +3 -3
  65. package/dist/providers/zai-coding-plan.d.ts +7 -2
  66. package/dist/providers/zai.d.ts +7 -2
  67. package/dist/route/media-protocol.d.ts +13 -3
  68. package/dist/route/media-protocol.js +16 -6
  69. package/dist/route/media.js +18 -4
  70. package/dist/transcription.d.ts +1 -1
  71. package/dist/transcription.js +1 -1
  72. package/package.json +3 -3
@@ -37,6 +37,46 @@ export const isPayloadTooLarge = (message) => payloadPatterns.some((pattern) =>
37
37
  export const isContextOverflowFailure = (failure) => failure instanceof AIError
38
38
  ? failure.reason._tag === "InvalidRequest" && failure.reason.classification === "context-overflow"
39
39
  : Schema.is(ProviderErrorEvent)(failure) && failure.classification === "context-overflow";
40
+ /**
41
+ * Whether a failed call may succeed when sent again: rate limits, provider-side failures, transport failures that did
42
+ * not deliver an accepted write, and unrecognized failures. Callers decide which calls are safe to repeat.
43
+ */
44
+ export const isRetryable = (error) => {
45
+ const override = error.reason.http?.headers["x-should-retry"];
46
+ if (override === "true")
47
+ return true;
48
+ if (override === "false")
49
+ return false;
50
+ switch (error.reason._tag) {
51
+ case "RateLimit":
52
+ case "ProviderInternal":
53
+ return true;
54
+ // A WebSocket acknowledgment marks delivery accepted before model output may exist.
55
+ // Read failures can still recover; the caller chooses retry versus continuation from durable output.
56
+ case "Transport":
57
+ return (error.reason.delivery !== "rejected" &&
58
+ (error.reason.delivery !== "accepted" || error.reason.operation === "read"));
59
+ case "InvalidProviderOutput":
60
+ return error.reason.classification === "incomplete-stream";
61
+ // Unrecognized failures retry: classification records affirmative
62
+ // deterministic evidence, and transient failures are exactly the ones
63
+ // that arrive in shapes no classifier anticipates.
64
+ case "UnknownProvider":
65
+ return true;
66
+ case "Authentication":
67
+ case "QuotaExceeded":
68
+ case "ContentPolicy":
69
+ case "InvalidRequest":
70
+ case "UnsupportedOperation":
71
+ case "NoRoute":
72
+ case "Timeout":
73
+ return false;
74
+ default: {
75
+ const exhaustive = error.reason;
76
+ return exhaustive;
77
+ }
78
+ }
79
+ };
40
80
  const decodeJson = Schema.decodeUnknownOption(Schema.fromJsonString(Schema.Unknown));
41
81
  // OpenCode Zen reports account caps as typed 429/402 errors that are not throttles.
42
82
  const QUOTA_CODES = new Set([
@@ -47,7 +87,8 @@ const QUOTA_CODES = new Set([
47
87
  "freeusagelimiterror",
48
88
  "creditlimitexceeded",
49
89
  ]);
50
- const AUTH_CODES = new Set(["authentication_error", "permission_error"]);
90
+ // Google reports an invalid API key as HTTP 400 INVALID_ARGUMENT with this `details[].reason`.
91
+ const AUTH_CODES = new Set(["authentication_error", "permission_error", "api_key_invalid"]);
51
92
  const SERVER_CODES = new Set([
52
93
  "api_error",
53
94
  "internal_error",
@@ -171,6 +212,10 @@ function providerCodes(value) {
171
212
  error?.type,
172
213
  error?.status,
173
214
  error?.error_type,
215
+ // Google `google.rpc.ErrorInfo` details carry the specific reason.
216
+ ...(Array.isArray(error?.details)
217
+ ? error.details.map((detail) => (isRecord(detail) ? detail.reason : undefined))
218
+ : []),
174
219
  inner?.code,
175
220
  metadata?.error_type,
176
221
  responseError?.code,
@@ -79,12 +79,17 @@ export declare const routes: (Route<{
79
79
  readonly ttl?: string | undefined;
80
80
  } | undefined;
81
81
  readonly tool_calls?: readonly {
82
- readonly id: string;
83
- readonly type: "function";
84
82
  readonly function: {
85
83
  readonly name: string;
86
84
  readonly arguments: string;
87
85
  };
86
+ readonly id: string;
87
+ readonly type: "function";
88
+ readonly extra_content?: {
89
+ readonly google: {
90
+ readonly thought_signature: string;
91
+ };
92
+ } | undefined;
88
93
  }[] | undefined;
89
94
  readonly reasoning_details?: unknown;
90
95
  } | {
@@ -82,12 +82,17 @@ export declare const routes: (Route<{
82
82
  readonly ttl?: string | undefined;
83
83
  } | undefined;
84
84
  readonly tool_calls?: readonly {
85
- readonly id: string;
86
- readonly type: "function";
87
85
  readonly function: {
88
86
  readonly name: string;
89
87
  readonly arguments: string;
90
88
  };
89
+ readonly id: string;
90
+ readonly type: "function";
91
+ readonly extra_content?: {
92
+ readonly google: {
93
+ readonly thought_signature: string;
94
+ };
95
+ } | undefined;
91
96
  }[] | undefined;
92
97
  readonly reasoning_details?: unknown;
93
98
  } | {
@@ -2,7 +2,8 @@ import { AnthropicMessages } from "../protocols/anthropic-messages.js";
2
2
  import { Auth } from "../route/auth.js";
3
3
  import { ProviderConfigurationError, ProviderID } from "../schema/index.js";
4
4
  export const id = ProviderID.make("anthropic-compatible");
5
- export const routes = [AnthropicMessages.route];
5
+ const compatibleRoute = AnthropicMessages.route.with({ id: "anthropic-compatible-messages", provider: id });
6
+ export const routes = [compatibleRoute];
6
7
  const auth = (input) => {
7
8
  if ("auth" in input && input.auth)
8
9
  return input.auth;
@@ -16,7 +17,7 @@ export const configure = (input) => {
16
17
  message: "Anthropic-compatible providers require a baseURL",
17
18
  });
18
19
  const { provider: _, baseURL, apiKey: _apiKey, auth: _auth, ...rest } = input;
19
- const route = AnthropicMessages.route.with({
20
+ const route = (provider === "anthropic" ? AnthropicMessages.route : compatibleRoute).with({
20
21
  ...rest,
21
22
  provider,
22
23
  endpoint: { baseURL },
@@ -307,12 +307,17 @@ export declare const routes: (Route<{
307
307
  readonly ttl?: string | undefined;
308
308
  } | undefined;
309
309
  readonly tool_calls?: readonly {
310
- readonly id: string;
311
- readonly type: "function";
312
310
  readonly function: {
313
311
  readonly name: string;
314
312
  readonly arguments: string;
315
313
  };
314
+ readonly id: string;
315
+ readonly type: "function";
316
+ readonly extra_content?: {
317
+ readonly google: {
318
+ readonly thought_signature: string;
319
+ };
320
+ } | undefined;
316
321
  }[] | undefined;
317
322
  readonly reasoning_details?: unknown;
318
323
  } | {
@@ -68,12 +68,17 @@ export declare const route: Route<{
68
68
  readonly ttl?: string | undefined;
69
69
  } | undefined;
70
70
  readonly tool_calls?: readonly {
71
- readonly id: string;
72
- readonly type: "function";
73
71
  readonly function: {
74
72
  readonly name: string;
75
73
  readonly arguments: string;
76
74
  };
75
+ readonly id: string;
76
+ readonly type: "function";
77
+ readonly extra_content?: {
78
+ readonly google: {
79
+ readonly thought_signature: string;
80
+ };
81
+ } | undefined;
77
82
  }[] | undefined;
78
83
  readonly reasoning_details?: unknown;
79
84
  } | {
@@ -179,12 +184,17 @@ export declare const routes: Route<{
179
184
  readonly ttl?: string | undefined;
180
185
  } | undefined;
181
186
  readonly tool_calls?: readonly {
182
- readonly id: string;
183
- readonly type: "function";
184
187
  readonly function: {
185
188
  readonly name: string;
186
189
  readonly arguments: string;
187
190
  };
191
+ readonly id: string;
192
+ readonly type: "function";
193
+ readonly extra_content?: {
194
+ readonly google: {
195
+ readonly thought_signature: string;
196
+ };
197
+ } | undefined;
188
198
  }[] | undefined;
189
199
  readonly reasoning_details?: unknown;
190
200
  } | {
@@ -68,12 +68,17 @@ export declare const route: Route<{
68
68
  readonly ttl?: string | undefined;
69
69
  } | undefined;
70
70
  readonly tool_calls?: readonly {
71
- readonly id: string;
72
- readonly type: "function";
73
71
  readonly function: {
74
72
  readonly name: string;
75
73
  readonly arguments: string;
76
74
  };
75
+ readonly id: string;
76
+ readonly type: "function";
77
+ readonly extra_content?: {
78
+ readonly google: {
79
+ readonly thought_signature: string;
80
+ };
81
+ } | undefined;
77
82
  }[] | undefined;
78
83
  readonly reasoning_details?: unknown;
79
84
  } | {
@@ -179,12 +184,17 @@ export declare const routes: Route<{
179
184
  readonly ttl?: string | undefined;
180
185
  } | undefined;
181
186
  readonly tool_calls?: readonly {
182
- readonly id: string;
183
- readonly type: "function";
184
187
  readonly function: {
185
188
  readonly name: string;
186
189
  readonly arguments: string;
187
190
  };
191
+ readonly id: string;
192
+ readonly type: "function";
193
+ readonly extra_content?: {
194
+ readonly google: {
195
+ readonly thought_signature: string;
196
+ };
197
+ } | undefined;
188
198
  }[] | undefined;
189
199
  readonly reasoning_details?: unknown;
190
200
  } | {
@@ -587,12 +587,17 @@ export declare const route: import("../route/client.js").Route<{
587
587
  readonly ttl?: string | undefined;
588
588
  } | undefined;
589
589
  readonly tool_calls?: readonly {
590
- readonly id: string;
591
- readonly type: "function";
592
590
  readonly function: {
593
591
  readonly name: string;
594
592
  readonly arguments: string;
595
593
  };
594
+ readonly id: string;
595
+ readonly type: "function";
596
+ readonly extra_content?: {
597
+ readonly google: {
598
+ readonly thought_signature: string;
599
+ };
600
+ } | undefined;
596
601
  }[] | undefined;
597
602
  readonly reasoning_details?: unknown;
598
603
  } | {
@@ -970,12 +975,17 @@ export declare const routes: (import("../route/client.js").Route<{
970
975
  readonly ttl?: string | undefined;
971
976
  } | undefined;
972
977
  readonly tool_calls?: readonly {
973
- readonly id: string;
974
- readonly type: "function";
975
978
  readonly function: {
976
979
  readonly name: string;
977
980
  readonly arguments: string;
978
981
  };
982
+ readonly id: string;
983
+ readonly type: "function";
984
+ readonly extra_content?: {
985
+ readonly google: {
986
+ readonly thought_signature: string;
987
+ };
988
+ } | undefined;
979
989
  }[] | undefined;
980
990
  readonly reasoning_details?: unknown;
981
991
  } | {
@@ -72,12 +72,17 @@ export declare const route: Route<{
72
72
  readonly ttl?: string | undefined;
73
73
  } | undefined;
74
74
  readonly tool_calls?: readonly {
75
- readonly id: string;
76
- readonly type: "function";
77
75
  readonly function: {
78
76
  readonly name: string;
79
77
  readonly arguments: string;
80
78
  };
79
+ readonly id: string;
80
+ readonly type: "function";
81
+ readonly extra_content?: {
82
+ readonly google: {
83
+ readonly thought_signature: string;
84
+ };
85
+ } | undefined;
81
86
  }[] | undefined;
82
87
  readonly reasoning_details?: unknown;
83
88
  } | {
@@ -183,12 +188,17 @@ export declare const routes: Route<{
183
188
  readonly ttl?: string | undefined;
184
189
  } | undefined;
185
190
  readonly tool_calls?: readonly {
186
- readonly id: string;
187
- readonly type: "function";
188
191
  readonly function: {
189
192
  readonly name: string;
190
193
  readonly arguments: string;
191
194
  };
195
+ readonly id: string;
196
+ readonly type: "function";
197
+ readonly extra_content?: {
198
+ readonly google: {
199
+ readonly thought_signature: string;
200
+ };
201
+ } | undefined;
192
202
  }[] | undefined;
193
203
  readonly reasoning_details?: unknown;
194
204
  } | {
@@ -68,12 +68,17 @@ export declare const route: Route<{
68
68
  readonly ttl?: string | undefined;
69
69
  } | undefined;
70
70
  readonly tool_calls?: readonly {
71
- readonly id: string;
72
- readonly type: "function";
73
71
  readonly function: {
74
72
  readonly name: string;
75
73
  readonly arguments: string;
76
74
  };
75
+ readonly id: string;
76
+ readonly type: "function";
77
+ readonly extra_content?: {
78
+ readonly google: {
79
+ readonly thought_signature: string;
80
+ };
81
+ } | undefined;
77
82
  }[] | undefined;
78
83
  readonly reasoning_details?: unknown;
79
84
  } | {
@@ -179,12 +184,17 @@ export declare const routes: Route<{
179
184
  readonly ttl?: string | undefined;
180
185
  } | undefined;
181
186
  readonly tool_calls?: readonly {
182
- readonly id: string;
183
- readonly type: "function";
184
187
  readonly function: {
185
188
  readonly name: string;
186
189
  readonly arguments: string;
187
190
  };
191
+ readonly id: string;
192
+ readonly type: "function";
193
+ readonly extra_content?: {
194
+ readonly google: {
195
+ readonly thought_signature: string;
196
+ };
197
+ } | undefined;
188
198
  }[] | undefined;
189
199
  readonly reasoning_details?: unknown;
190
200
  } | {
@@ -68,12 +68,17 @@ export declare const route: Route<{
68
68
  readonly ttl?: string | undefined;
69
69
  } | undefined;
70
70
  readonly tool_calls?: readonly {
71
- readonly id: string;
72
- readonly type: "function";
73
71
  readonly function: {
74
72
  readonly name: string;
75
73
  readonly arguments: string;
76
74
  };
75
+ readonly id: string;
76
+ readonly type: "function";
77
+ readonly extra_content?: {
78
+ readonly google: {
79
+ readonly thought_signature: string;
80
+ };
81
+ } | undefined;
77
82
  }[] | undefined;
78
83
  readonly reasoning_details?: unknown;
79
84
  } | {
@@ -179,12 +184,17 @@ export declare const routes: Route<{
179
184
  readonly ttl?: string | undefined;
180
185
  } | undefined;
181
186
  readonly tool_calls?: readonly {
182
- readonly id: string;
183
- readonly type: "function";
184
187
  readonly function: {
185
188
  readonly name: string;
186
189
  readonly arguments: string;
187
190
  };
191
+ readonly id: string;
192
+ readonly type: "function";
193
+ readonly extra_content?: {
194
+ readonly google: {
195
+ readonly thought_signature: string;
196
+ };
197
+ } | undefined;
188
198
  }[] | undefined;
189
199
  readonly reasoning_details?: unknown;
190
200
  } | {
@@ -1,6 +1,7 @@
1
1
  import type { ProviderAuthOption } from "../route/auth-options.js";
2
2
  import { type HttpOptions, type ModelID } from "../schema/index.js";
3
3
  export type { ElevenLabsOutputFormat, ElevenLabsSpeechOptions } from "../protocols/elevenlabs-speech.js";
4
+ export type { ElevenLabsTranscriptionOptions } from "../protocols/elevenlabs-transcription.js";
4
5
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
5
6
  export type Config = ProviderAuthOption<"optional"> & {
6
7
  readonly baseURL?: string;
@@ -10,15 +11,19 @@ export type Config = ProviderAuthOption<"optional"> & {
10
11
  export declare const configure: (input?: Config) => {
11
12
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
12
13
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/elevenlabs-speech.js").ElevenLabsSpeechOptions>;
14
+ transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/elevenlabs-transcription.js").ElevenLabsTranscriptionOptions>;
13
15
  configure: (input?: Config) => /*elided*/ any;
14
16
  };
15
17
  export declare const provider: {
16
18
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
17
19
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/elevenlabs-speech.js").ElevenLabsSpeechOptions>;
20
+ transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/elevenlabs-transcription.js").ElevenLabsTranscriptionOptions>;
18
21
  configure: (input?: Config) => {
19
22
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
20
23
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/elevenlabs-speech.js").ElevenLabsSpeechOptions>;
24
+ transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/elevenlabs-transcription.js").ElevenLabsTranscriptionOptions>;
21
25
  configure: /*elided*/ any;
22
26
  };
23
27
  };
24
28
  export declare const speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/elevenlabs-speech.js").ElevenLabsSpeechOptions>;
29
+ export declare const transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/elevenlabs-transcription.js").ElevenLabsTranscriptionOptions>;
@@ -2,6 +2,7 @@ import { Auth } from "../route/auth.js";
2
2
  import { MediaRoute } from "../route/media.js";
3
3
  import { ProviderID } from "../schema/index.js";
4
4
  import { ElevenLabsSpeech } from "../protocols/elevenlabs-speech.js";
5
+ import { ElevenLabsTranscription } from "../protocols/elevenlabs-transcription.js";
5
6
  export const id = ProviderID.make("elevenlabs");
6
7
  const auth = (options) => {
7
8
  if ("auth" in options && options.auth)
@@ -13,11 +14,14 @@ const auth = (options) => {
13
14
  export const configure = (input = {}) => {
14
15
  const media = MediaRoute.deployment(input, auth(input));
15
16
  const speech = (modelID) => ElevenLabsSpeech.model({ ...media, id: modelID });
17
+ const transcription = (modelID) => ElevenLabsTranscription.model({ ...media, id: modelID });
16
18
  return {
17
19
  id,
18
20
  speech,
21
+ transcription,
19
22
  configure,
20
23
  };
21
24
  };
22
25
  export const provider = configure();
23
26
  export const speech = provider.speech;
27
+ export const transcription = provider.transcription;
@@ -68,12 +68,17 @@ export declare const route: Route<{
68
68
  readonly ttl?: string | undefined;
69
69
  } | undefined;
70
70
  readonly tool_calls?: readonly {
71
- readonly id: string;
72
- readonly type: "function";
73
71
  readonly function: {
74
72
  readonly name: string;
75
73
  readonly arguments: string;
76
74
  };
75
+ readonly id: string;
76
+ readonly type: "function";
77
+ readonly extra_content?: {
78
+ readonly google: {
79
+ readonly thought_signature: string;
80
+ };
81
+ } | undefined;
77
82
  }[] | undefined;
78
83
  readonly reasoning_details?: unknown;
79
84
  } | {
@@ -179,12 +184,17 @@ export declare const routes: Route<{
179
184
  readonly ttl?: string | undefined;
180
185
  } | undefined;
181
186
  readonly tool_calls?: readonly {
182
- readonly id: string;
183
- readonly type: "function";
184
187
  readonly function: {
185
188
  readonly name: string;
186
189
  readonly arguments: string;
187
190
  };
191
+ readonly id: string;
192
+ readonly type: "function";
193
+ readonly extra_content?: {
194
+ readonly google: {
195
+ readonly thought_signature: string;
196
+ };
197
+ } | undefined;
188
198
  }[] | undefined;
189
199
  readonly reasoning_details?: unknown;
190
200
  } | {
@@ -73,12 +73,17 @@ export declare const routes: Route<{
73
73
  readonly ttl?: string | undefined;
74
74
  } | undefined;
75
75
  readonly tool_calls?: readonly {
76
- readonly id: string;
77
- readonly type: "function";
78
76
  readonly function: {
79
77
  readonly name: string;
80
78
  readonly arguments: string;
81
79
  };
80
+ readonly id: string;
81
+ readonly type: "function";
82
+ readonly extra_content?: {
83
+ readonly google: {
84
+ readonly thought_signature: string;
85
+ };
86
+ } | undefined;
82
87
  }[] | undefined;
83
88
  readonly reasoning_details?: unknown;
84
89
  } | {
@@ -77,12 +77,17 @@ export declare const protocol: Protocol<{
77
77
  readonly ttl?: string | undefined;
78
78
  } | undefined;
79
79
  readonly tool_calls?: readonly {
80
- readonly id: string;
81
- readonly type: "function";
82
80
  readonly function: {
83
81
  readonly name: string;
84
82
  readonly arguments: string;
85
83
  };
84
+ readonly id: string;
85
+ readonly type: "function";
86
+ readonly extra_content?: {
87
+ readonly google: {
88
+ readonly thought_signature: string;
89
+ };
90
+ } | undefined;
86
91
  }[] | undefined;
87
92
  readonly reasoning_details?: unknown;
88
93
  } | {
@@ -178,6 +183,7 @@ export declare const protocol: Protocol<{
178
183
  } | null | undefined;
179
184
  readonly id?: string | null | undefined;
180
185
  readonly index?: number | null | undefined;
186
+ readonly extra_content?: unknown;
181
187
  }[] | null | undefined;
182
188
  readonly reasoning_details?: unknown;
183
189
  } | null | undefined;
@@ -260,12 +266,17 @@ export declare const route: Route<{
260
266
  readonly ttl?: string | undefined;
261
267
  } | undefined;
262
268
  readonly tool_calls?: readonly {
263
- readonly id: string;
264
- readonly type: "function";
265
269
  readonly function: {
266
270
  readonly name: string;
267
271
  readonly arguments: string;
268
272
  };
273
+ readonly id: string;
274
+ readonly type: "function";
275
+ readonly extra_content?: {
276
+ readonly google: {
277
+ readonly thought_signature: string;
278
+ };
279
+ } | undefined;
269
280
  }[] | undefined;
270
281
  readonly reasoning_details?: unknown;
271
282
  } | {
@@ -94,12 +94,17 @@ export declare const routes: (Route<{
94
94
  readonly ttl?: string | undefined;
95
95
  } | undefined;
96
96
  readonly tool_calls?: readonly {
97
- readonly id: string;
98
- readonly type: "function";
99
97
  readonly function: {
100
98
  readonly name: string;
101
99
  readonly arguments: string;
102
100
  };
101
+ readonly id: string;
102
+ readonly type: "function";
103
+ readonly extra_content?: {
104
+ readonly google: {
105
+ readonly thought_signature: string;
106
+ };
107
+ } | undefined;
103
108
  }[] | undefined;
104
109
  readonly reasoning_details?: unknown;
105
110
  } | {
@@ -526,12 +526,17 @@ export declare const routes: (Route<{
526
526
  readonly ttl?: string | undefined;
527
527
  } | undefined;
528
528
  readonly tool_calls?: readonly {
529
- readonly id: string;
530
- readonly type: "function";
531
529
  readonly function: {
532
530
  readonly name: string;
533
531
  readonly arguments: string;
534
532
  };
533
+ readonly id: string;
534
+ readonly type: "function";
535
+ readonly extra_content?: {
536
+ readonly google: {
537
+ readonly thought_signature: string;
538
+ };
539
+ } | undefined;
535
540
  }[] | undefined;
536
541
  readonly reasoning_details?: unknown;
537
542
  } | {
@@ -524,12 +524,17 @@ export declare const routes: (Route<{
524
524
  readonly ttl?: string | undefined;
525
525
  } | undefined;
526
526
  readonly tool_calls?: readonly {
527
- readonly id: string;
528
- readonly type: "function";
529
527
  readonly function: {
530
528
  readonly name: string;
531
529
  readonly arguments: string;
532
530
  };
531
+ readonly id: string;
532
+ readonly type: "function";
533
+ readonly extra_content?: {
534
+ readonly google: {
535
+ readonly thought_signature: string;
536
+ };
537
+ } | undefined;
533
538
  }[] | undefined;
534
539
  readonly reasoning_details?: unknown;
535
540
  } | {
@@ -70,12 +70,17 @@ export declare const routes: import("../route/client.js").Route<{
70
70
  readonly ttl?: string | undefined;
71
71
  } | undefined;
72
72
  readonly tool_calls?: readonly {
73
- readonly id: string;
74
- readonly type: "function";
75
73
  readonly function: {
76
74
  readonly name: string;
77
75
  readonly arguments: string;
78
76
  };
77
+ readonly id: string;
78
+ readonly type: "function";
79
+ readonly extra_content?: {
80
+ readonly google: {
81
+ readonly thought_signature: string;
82
+ };
83
+ } | undefined;
79
84
  }[] | undefined;
80
85
  readonly reasoning_details?: unknown;
81
86
  } | {
@@ -65,12 +65,17 @@ export declare const routes: (Route<{
65
65
  readonly ttl?: string | undefined;
66
66
  } | undefined;
67
67
  readonly tool_calls?: readonly {
68
- readonly id: string;
69
- readonly type: "function";
70
68
  readonly function: {
71
69
  readonly name: string;
72
70
  readonly arguments: string;
73
71
  };
72
+ readonly id: string;
73
+ readonly type: "function";
74
+ readonly extra_content?: {
75
+ readonly google: {
76
+ readonly thought_signature: string;
77
+ };
78
+ } | undefined;
74
79
  }[] | undefined;
75
80
  readonly reasoning_details?: unknown;
76
81
  } | {