@opencode/ai 2.0.21 → 2.0.23

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 (113) hide show
  1. package/README.md +61 -1
  2. package/dist/cache-policy.js +10 -2
  3. package/dist/llm.d.ts +4 -0
  4. package/dist/promise.d.ts +8 -0
  5. package/dist/protocols/alibaba-chat.d.ts +7 -3
  6. package/dist/protocols/alibaba-chat.js +2 -1
  7. package/dist/protocols/alibaba-responses.d.ts +16 -12
  8. package/dist/protocols/alibaba-responses.js +3 -5
  9. package/dist/protocols/anthropic-messages.js +58 -51
  10. package/dist/protocols/bedrock-converse.js +33 -4
  11. package/dist/protocols/cartesia-speech.js +3 -3
  12. package/dist/protocols/cohere-chat.d.ts +178 -0
  13. package/dist/protocols/cohere-chat.js +299 -0
  14. package/dist/protocols/elevenlabs-speech.js +3 -3
  15. package/dist/protocols/gemini.d.ts +2 -2
  16. package/dist/protocols/gemini.js +3 -3
  17. package/dist/protocols/google-interactions.d.ts +236 -0
  18. package/dist/protocols/google-interactions.js +478 -0
  19. package/dist/protocols/google-speech.js +1 -1
  20. package/dist/protocols/google-transcription.js +1 -1
  21. package/dist/protocols/index.d.ts +2 -0
  22. package/dist/protocols/index.js +2 -0
  23. package/dist/protocols/meta-responses.d.ts +31 -58
  24. package/dist/protocols/meta-responses.js +8 -27
  25. package/dist/protocols/mistral-chat.d.ts +24 -9
  26. package/dist/protocols/mistral-chat.js +22 -10
  27. package/dist/protocols/open-responses.d.ts +410 -91
  28. package/dist/protocols/open-responses.js +25 -15
  29. package/dist/protocols/openai-chat.d.ts +409 -5
  30. package/dist/protocols/openai-chat.js +27 -26
  31. package/dist/protocols/openai-compatible-chat.d.ts +1 -1
  32. package/dist/protocols/openai-compatible-responses.d.ts +16 -4
  33. package/dist/protocols/openai-images.js +2 -2
  34. package/dist/protocols/openai-responses.d.ts +87 -223
  35. package/dist/protocols/openai-responses.js +10 -16
  36. package/dist/protocols/openai-speech.js +1 -1
  37. package/dist/protocols/openai-transcription.js +1 -1
  38. package/dist/protocols/shared.js +2 -2
  39. package/dist/protocols/stability-images.js +1 -1
  40. package/dist/protocols/utils/bedrock-media.js +2 -2
  41. package/dist/protocols/utils/cache.d.ts +5 -0
  42. package/dist/protocols/utils/cache.js +9 -1
  43. package/dist/protocols/utils/responses-checkpoint.js +2 -2
  44. package/dist/protocols/utils/responses-hosted-tools.js +1 -1
  45. package/dist/protocols/utils/tool-stream.d.ts +12 -0
  46. package/dist/protocols/utils/tool-stream.js +15 -7
  47. package/dist/protocols/venice-chat.d.ts +280 -0
  48. package/dist/protocols/venice-chat.js +283 -0
  49. package/dist/protocols/xai-responses.d.ts +18 -21
  50. package/dist/protocols/xai-responses.js +2 -8
  51. package/dist/protocols/zai-chat.d.ts +7 -3
  52. package/dist/protocols/zai-chat.js +6 -3
  53. package/dist/provider-error.js +27 -7
  54. package/dist/providers/alibaba.d.ts +17 -13
  55. package/dist/providers/amazon-bedrock/mantle/messages.d.ts +2 -0
  56. package/dist/providers/amazon-bedrock/mantle/messages.js +1 -0
  57. package/dist/providers/amazon-bedrock-mantle.d.ts +301 -9
  58. package/dist/providers/amazon-bedrock-mantle.js +28 -3
  59. package/dist/providers/azure.d.ts +13 -61
  60. package/dist/providers/baseten.d.ts +2 -2
  61. package/dist/providers/cerebras.d.ts +2 -2
  62. package/dist/providers/cloudflare-ai-gateway.d.ts +14 -62
  63. package/dist/providers/cloudflare-workers-ai.d.ts +2 -2
  64. package/dist/providers/cohere/chat.d.ts +4 -0
  65. package/dist/providers/cohere/chat.js +8 -0
  66. package/dist/providers/cohere.d.ts +395 -0
  67. package/dist/providers/cohere.js +48 -0
  68. package/dist/providers/deepinfra.d.ts +2 -2
  69. package/dist/providers/deepseek.d.ts +2 -2
  70. package/dist/providers/digitalocean.d.ts +469 -0
  71. package/dist/providers/digitalocean.js +53 -0
  72. package/dist/providers/fireworks.d.ts +2 -2
  73. package/dist/providers/google/interactions.d.ts +7 -0
  74. package/dist/providers/google/interactions.js +8 -0
  75. package/dist/providers/google-vertex-chat.d.ts +1 -1
  76. package/dist/providers/google-vertex-messages.js +1 -1
  77. package/dist/providers/google-vertex-responses.d.ts +16 -4
  78. package/dist/providers/google-vertex.d.ts +1 -1
  79. package/dist/providers/google.d.ts +95 -4
  80. package/dist/providers/google.js +8 -1
  81. package/dist/providers/groq.d.ts +8 -4
  82. package/dist/providers/groq.js +1 -1
  83. package/dist/providers/index.d.ts +3 -0
  84. package/dist/providers/index.js +3 -0
  85. package/dist/providers/meta.d.ts +15 -28
  86. package/dist/providers/minimax.d.ts +17 -5
  87. package/dist/providers/mistral.d.ts +10 -4
  88. package/dist/providers/moonshot.d.ts +17 -5
  89. package/dist/providers/openai-compatible-responses.d.ts +16 -4
  90. package/dist/providers/openai-compatible.d.ts +1 -1
  91. package/dist/providers/openai-options.d.ts +1 -1
  92. package/dist/providers/openai.d.ts +7 -31
  93. package/dist/providers/openrouter.d.ts +9 -5
  94. package/dist/providers/openrouter.js +1 -13
  95. package/dist/providers/togetherai.d.ts +2 -2
  96. package/dist/providers/venice.d.ts +183 -0
  97. package/dist/providers/venice.js +38 -0
  98. package/dist/providers/xai.d.ts +1 -1
  99. package/dist/providers/zai-coding-plan.d.ts +17 -5
  100. package/dist/providers/zai.d.ts +1 -1
  101. package/dist/route/client.d.ts +4 -0
  102. package/dist/route/client.js +2 -5
  103. package/dist/route/executor.js +13 -6
  104. package/dist/route/framing.js +23 -23
  105. package/dist/route/transport/http.d.ts +2 -1
  106. package/dist/route/transport/http.js +28 -6
  107. package/dist/schema/events.d.ts +176 -0
  108. package/dist/schema/events.js +4 -0
  109. package/dist/schema/options.d.ts +11 -0
  110. package/dist/schema/options.js +15 -2
  111. package/dist/testing.d.ts +32 -0
  112. package/dist/tool-history.js +17 -3
  113. package/package.json +3 -3
@@ -1,5 +1,13 @@
1
- // Shared counter and TTL mapping for provider cache-marker lowering.
2
1
  export const newBreakpoints = (cap) => ({ remaining: cap, dropped: 0 });
3
2
  // Requests of at least one hour use the explicit `"1h"` bucket; shorter
4
3
  // requests omit the wire TTL and use the provider default.
5
4
  export const ttlBucket = (ttlSeconds) => ttlSeconds !== undefined && ttlSeconds >= 3600 ? "1h" : undefined;
5
+ export const cacheControl = () => {
6
+ const breakpoints = newBreakpoints(4);
7
+ return (cache) => {
8
+ if (cache === undefined || breakpoints.remaining === 0)
9
+ return undefined;
10
+ breakpoints.remaining -= 1;
11
+ return { type: "ephemeral", ttl: ttlBucket(cache.ttlSeconds) };
12
+ };
13
+ };
@@ -4,7 +4,7 @@ import { Protocol } from "../../route/protocol.js";
4
4
  import { CompactionCheckpointResponse, LLMEvent, LLMRequest } from "../../schema/index.js";
5
5
  import { OpenResponses } from "../open-responses.js";
6
6
  import { ProviderShared } from "../shared.js";
7
- const onOutputItem = Effect.fn("ResponsesCheckpoint.onOutputItem")(function* (state, input) {
7
+ const onOutputItem = Effect.fnUntraced(function* (state, input) {
8
8
  const event = OpenResponses.normalize(state.parser, input);
9
9
  const item = event.item;
10
10
  if (!item)
@@ -49,7 +49,7 @@ export const make = (body) => Effect.fn("ResponsesCheckpoint.execute")(function*
49
49
  checkpoints: {},
50
50
  }),
51
51
  terminal: OpenResponses.terminal,
52
- step: Effect.fn("ResponsesCheckpoint.step")(function* (state, event) {
52
+ step: Effect.fnUntraced(function* (state, event) {
53
53
  if (event.response?.id && state.responseID && event.response.id !== state.responseID)
54
54
  return yield* ProviderShared.eventError(source.id, "Compaction response ID changed during execution");
55
55
  if (event.type === "response.created")
@@ -3,7 +3,7 @@ import { LLMEvent } from "../../schema/index.js";
3
3
  import { OpenResponses } from "../open-responses.js";
4
4
  import { Lifecycle } from "./lifecycle.js";
5
5
  export const isItem = (item, tools) => item.type in tools;
6
- export const onDone = Effect.fn("ResponsesHostedTools.onDone")(function* (state, item, tools) {
6
+ export const onDone = Effect.fnUntraced(function* (state, item, tools) {
7
7
  const tool = tools[item.type];
8
8
  if (!tool)
9
9
  return [state, []];
@@ -258,6 +258,8 @@ export declare const finish: <K extends StreamKey>(route: string, tools: State<K
258
258
  readonly reason: {
259
259
  readonly normalized: "length" | "stop" | "tool-calls" | "content-filter" | "error" | "unknown";
260
260
  readonly raw?: string | undefined;
261
+ readonly category?: string | undefined;
262
+ readonly explanation?: string | undefined;
261
263
  };
262
264
  readonly index: number;
263
265
  readonly providerMetadata?: {
@@ -271,6 +273,8 @@ export declare const finish: <K extends StreamKey>(route: string, tools: State<K
271
273
  readonly reason: {
272
274
  readonly normalized: "length" | "stop" | "tool-calls" | "content-filter" | "error" | "unknown";
273
275
  readonly raw?: string | undefined;
276
+ readonly category?: string | undefined;
277
+ readonly explanation?: string | undefined;
274
278
  };
275
279
  readonly providerMetadata?: {
276
280
  readonly [x: string]: {
@@ -481,6 +485,8 @@ export declare const finishWithInput: <K extends StreamKey>(route: string, tools
481
485
  readonly reason: {
482
486
  readonly normalized: "length" | "stop" | "tool-calls" | "content-filter" | "error" | "unknown";
483
487
  readonly raw?: string | undefined;
488
+ readonly category?: string | undefined;
489
+ readonly explanation?: string | undefined;
484
490
  };
485
491
  readonly index: number;
486
492
  readonly providerMetadata?: {
@@ -494,6 +500,8 @@ export declare const finishWithInput: <K extends StreamKey>(route: string, tools
494
500
  readonly reason: {
495
501
  readonly normalized: "length" | "stop" | "tool-calls" | "content-filter" | "error" | "unknown";
496
502
  readonly raw?: string | undefined;
503
+ readonly category?: string | undefined;
504
+ readonly explanation?: string | undefined;
497
505
  };
498
506
  readonly providerMetadata?: {
499
507
  readonly [x: string]: {
@@ -701,6 +709,8 @@ export declare const finishAll: <K extends StreamKey>(route: string, tools: Stat
701
709
  readonly reason: {
702
710
  readonly normalized: "length" | "stop" | "tool-calls" | "content-filter" | "error" | "unknown";
703
711
  readonly raw?: string | undefined;
712
+ readonly category?: string | undefined;
713
+ readonly explanation?: string | undefined;
704
714
  };
705
715
  readonly index: number;
706
716
  readonly providerMetadata?: {
@@ -714,6 +724,8 @@ export declare const finishAll: <K extends StreamKey>(route: string, tools: Stat
714
724
  readonly reason: {
715
725
  readonly normalized: "length" | "stop" | "tool-calls" | "content-filter" | "error" | "unknown";
716
726
  readonly raw?: string | undefined;
727
+ readonly category?: string | undefined;
728
+ readonly explanation?: string | undefined;
717
729
  };
718
730
  readonly providerMetadata?: {
719
731
  readonly [x: string]: {
@@ -20,13 +20,21 @@ const inputStart = (tool) => LLMEvent.toolInputStart({
20
20
  providerExecuted: tool.providerExecuted ? true : undefined,
21
21
  providerMetadata: tool.providerMetadata,
22
22
  });
23
- const inputDelta = (tool, text) => LLMEvent.toolInputDelta({
24
- id: tool.id,
25
- name: tool.name,
26
- namespace: tool.namespace,
27
- text,
28
- input: Option.getOrElse(parsePartialInput(tool.input), () => ({})),
29
- });
23
+ const inputDelta = (tool, text) => {
24
+ const raw = tool.input;
25
+ let parsed;
26
+ return {
27
+ ...LLMEvent.toolInputDelta({
28
+ id: tool.id,
29
+ name: tool.name,
30
+ namespace: tool.namespace,
31
+ text,
32
+ }),
33
+ get input() {
34
+ return (parsed ??= Option.getOrElse(parsePartialInput(raw), () => ({})));
35
+ },
36
+ };
37
+ };
30
38
  const toolCall = (route, tool, inputOverride) => {
31
39
  const raw = inputOverride ?? tool.input;
32
40
  return parseToolInput(route, tool.name, raw).pipe(Effect.catch((error) => tool.providerExecuted
@@ -0,0 +1,280 @@
1
+ import { Schema } from "effect";
2
+ import { Protocol } from "../route/protocol.js";
3
+ import { OpenAIChat } from "./openai-chat.js";
4
+ export type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | (string & {});
5
+ declare const Parameters: Schema.Struct<{
6
+ readonly enableWebSearch: Schema.optional<Schema.String>;
7
+ readonly enableWebScraping: Schema.optional<Schema.Boolean>;
8
+ readonly enableWebCitations: Schema.optional<Schema.Boolean>;
9
+ readonly enableXSearch: Schema.optional<Schema.Boolean>;
10
+ readonly stripThinkingResponse: Schema.optional<Schema.Boolean>;
11
+ readonly disableThinking: Schema.optional<Schema.Boolean>;
12
+ readonly includeVeniceSystemPrompt: Schema.optional<Schema.Boolean>;
13
+ readonly characterSlug: Schema.optional<Schema.String>;
14
+ readonly includeSearchResultsInStream: Schema.optional<Schema.Boolean>;
15
+ readonly returnSearchResultsAsDocuments: Schema.optional<Schema.Boolean>;
16
+ }>;
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
+ };
42
+ interface State {
43
+ readonly shared: OpenAIChat.ParserState;
44
+ readonly pending: string;
45
+ readonly reasoning: string;
46
+ readonly encrypted: boolean;
47
+ readonly signature?: string;
48
+ readonly tools: Readonly<Record<string, string>>;
49
+ }
50
+ export declare const compatibility: {
51
+ maxTokensField: "max_completion_tokens";
52
+ supportsStore: false;
53
+ supportsPromptCacheKey: true;
54
+ };
55
+ export declare const protocol: Protocol<{
56
+ readonly model: string;
57
+ readonly messages: readonly ({
58
+ readonly role: "system";
59
+ readonly content: string | readonly ({
60
+ readonly type: "text";
61
+ readonly text: string;
62
+ readonly cache_control?: {
63
+ readonly type: "ephemeral";
64
+ readonly ttl?: string | undefined;
65
+ } | undefined;
66
+ } | {
67
+ readonly type: "image_url";
68
+ readonly image_url: {
69
+ readonly url: string;
70
+ };
71
+ } | {
72
+ readonly type: "file";
73
+ readonly file: {
74
+ readonly filename: string;
75
+ readonly file_data: string;
76
+ };
77
+ })[];
78
+ } | {
79
+ readonly role: "user";
80
+ readonly content: string | readonly ({
81
+ readonly type: "text";
82
+ readonly text: string;
83
+ readonly cache_control?: {
84
+ readonly type: "ephemeral";
85
+ readonly ttl?: string | undefined;
86
+ } | undefined;
87
+ } | {
88
+ readonly type: "image_url";
89
+ readonly image_url: {
90
+ readonly url: string;
91
+ };
92
+ } | {
93
+ readonly type: "file";
94
+ readonly file: {
95
+ readonly filename: string;
96
+ readonly file_data: string;
97
+ };
98
+ })[];
99
+ } | {
100
+ readonly role: "tool";
101
+ readonly tool_call_id: string;
102
+ readonly content: string | readonly {
103
+ readonly type: "text";
104
+ readonly text: string;
105
+ readonly cache_control?: {
106
+ readonly type: "ephemeral";
107
+ readonly ttl?: string | undefined;
108
+ } | undefined;
109
+ }[];
110
+ } | {
111
+ readonly [x: string]: unknown;
112
+ readonly content: string | readonly {
113
+ readonly type: "text";
114
+ readonly text: string;
115
+ readonly cache_control?: {
116
+ readonly type: "ephemeral";
117
+ readonly ttl?: string | undefined;
118
+ } | undefined;
119
+ }[] | null;
120
+ readonly role: "assistant";
121
+ readonly reasoning?: string | undefined;
122
+ readonly reasoning_content?: string | undefined;
123
+ readonly reasoning_text?: string | undefined;
124
+ readonly tool_calls?: readonly {
125
+ readonly function: {
126
+ readonly name: string;
127
+ readonly arguments: string;
128
+ };
129
+ readonly id: string;
130
+ readonly type: "function";
131
+ readonly thought_signature?: string | undefined;
132
+ readonly extra_content?: {
133
+ readonly google: {
134
+ readonly thought_signature: string;
135
+ };
136
+ } | undefined;
137
+ }[] | undefined;
138
+ readonly thought_signature?: string | undefined;
139
+ readonly reasoning_details?: unknown;
140
+ })[];
141
+ readonly stream: true;
142
+ readonly venice_parameters: {
143
+ readonly [x: string]: string | boolean;
144
+ };
145
+ readonly reasoning?: {
146
+ readonly enabled?: boolean | undefined;
147
+ readonly summary?: string | undefined;
148
+ readonly effort?: string | undefined;
149
+ } | undefined;
150
+ readonly max_completion_tokens?: number | undefined;
151
+ readonly max_tokens?: number | undefined;
152
+ readonly tools?: readonly {
153
+ readonly function: {
154
+ readonly description: string;
155
+ readonly name: string;
156
+ readonly parameters: {
157
+ readonly [x: string]: unknown;
158
+ };
159
+ readonly strict?: boolean | undefined;
160
+ };
161
+ readonly type: "function";
162
+ readonly cache_control?: {
163
+ readonly type: "ephemeral";
164
+ readonly ttl?: string | undefined;
165
+ } | undefined;
166
+ }[] | undefined;
167
+ readonly stop?: readonly string[] | undefined;
168
+ readonly user?: string | undefined;
169
+ readonly temperature?: number | undefined;
170
+ readonly seed?: number | undefined;
171
+ readonly tool_choice?: "required" | "auto" | "none" | {
172
+ readonly type: "function";
173
+ readonly function: {
174
+ readonly name: string;
175
+ };
176
+ } | undefined;
177
+ readonly top_p?: number | undefined;
178
+ readonly top_k?: number | undefined;
179
+ readonly frequency_penalty?: number | undefined;
180
+ readonly presence_penalty?: number | undefined;
181
+ readonly store?: boolean | undefined;
182
+ readonly prompt_cache_key?: string | undefined;
183
+ readonly parallel_tool_calls?: boolean | undefined;
184
+ readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
185
+ readonly stream_options?: {
186
+ readonly include_usage: boolean;
187
+ } | undefined;
188
+ readonly tool_stream?: boolean | undefined;
189
+ readonly top_logprobs?: number | undefined;
190
+ readonly prompt_cache_retention?: string | undefined;
191
+ readonly repetition_penalty?: number | undefined;
192
+ readonly response_format?: {
193
+ readonly [x: string]: unknown;
194
+ } | undefined;
195
+ readonly logprobs?: boolean | undefined;
196
+ readonly min_p?: number | undefined;
197
+ readonly stop_token_ids?: readonly number[] | undefined;
198
+ readonly max_temp?: number | undefined;
199
+ readonly min_temp?: number | undefined;
200
+ }, string, "[DONE]" | {
201
+ readonly [x: string]: unknown;
202
+ readonly error?: string | {
203
+ readonly [x: string]: unknown;
204
+ readonly message: string;
205
+ readonly code?: string | number | null | undefined;
206
+ } | null | undefined;
207
+ readonly usage?: {
208
+ readonly [x: string]: unknown;
209
+ readonly cache_read_input_tokens?: number | null | undefined;
210
+ readonly cached_tokens?: number | null | undefined;
211
+ readonly total_tokens?: number | null | undefined;
212
+ readonly prompt_tokens?: number | null | undefined;
213
+ readonly completion_tokens?: number | null | undefined;
214
+ readonly prompt_tokens_details?: {
215
+ readonly [x: string]: unknown;
216
+ readonly cache_creation_input_tokens?: number | null | undefined;
217
+ readonly cached_tokens?: number | null | undefined;
218
+ readonly cache_write_tokens?: number | null | undefined;
219
+ } | null | undefined;
220
+ readonly prompt_cache_hit_tokens?: number | null | undefined;
221
+ readonly cache_created_input_tokens?: number | null | undefined;
222
+ readonly completion_tokens_details?: {
223
+ readonly [x: string]: unknown;
224
+ readonly reasoning_tokens?: number | null | undefined;
225
+ readonly accepted_prediction_tokens?: number | null | undefined;
226
+ readonly rejected_prediction_tokens?: number | null | undefined;
227
+ } | null | undefined;
228
+ } | null | undefined;
229
+ readonly choices?: readonly {
230
+ readonly [x: string]: unknown;
231
+ readonly delta?: {
232
+ readonly [x: string]: unknown;
233
+ readonly reasoning?: string | null | undefined;
234
+ readonly reasoning_content?: string | null | undefined;
235
+ readonly reasoning_text?: string | null | undefined;
236
+ readonly content?: string | null | undefined;
237
+ readonly refusal?: string | null | undefined;
238
+ readonly tool_calls?: readonly {
239
+ readonly function?: {
240
+ readonly name?: string | null | undefined;
241
+ readonly arguments?: string | null | undefined;
242
+ } | null | undefined;
243
+ readonly id?: string | null | undefined;
244
+ readonly index?: number | null | undefined;
245
+ readonly thought_signature?: string | null | undefined;
246
+ readonly extra_content?: unknown;
247
+ }[] | null | undefined;
248
+ readonly thought_signature?: string | null | undefined;
249
+ readonly reasoning_details?: unknown;
250
+ } | null | undefined;
251
+ readonly usage?: {
252
+ readonly [x: string]: unknown;
253
+ readonly cache_read_input_tokens?: number | null | undefined;
254
+ readonly cached_tokens?: number | null | undefined;
255
+ readonly total_tokens?: number | null | undefined;
256
+ readonly prompt_tokens?: number | null | undefined;
257
+ readonly completion_tokens?: number | null | undefined;
258
+ readonly prompt_tokens_details?: {
259
+ readonly [x: string]: unknown;
260
+ readonly cached_tokens?: number | null | undefined;
261
+ readonly cache_write_tokens?: number | null | undefined;
262
+ } | null | undefined;
263
+ readonly prompt_cache_hit_tokens?: number | null | undefined;
264
+ readonly cache_created_input_tokens?: number | null | undefined;
265
+ readonly completion_tokens_details?: {
266
+ readonly [x: string]: unknown;
267
+ readonly reasoning_tokens?: number | null | undefined;
268
+ readonly accepted_prediction_tokens?: number | null | undefined;
269
+ readonly rejected_prediction_tokens?: number | null | undefined;
270
+ } | null | undefined;
271
+ } | null | undefined;
272
+ readonly finish_reason?: string | null | undefined;
273
+ readonly native_finish_reason?: string | null | undefined;
274
+ }[] | null | undefined;
275
+ readonly issues?: readonly {
276
+ readonly message: string;
277
+ readonly path?: readonly (string | number)[] | undefined;
278
+ }[] | undefined;
279
+ }, State>;
280
+ export * as VeniceChat from "./venice-chat.js";