@opencode/ai 2.1.3 → 2.2.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.
Files changed (288) hide show
  1. package/README.md +283 -114
  2. package/dist/ai-client.d.ts +2 -2
  3. package/dist/ai-client.js +2 -1
  4. package/dist/cache-policy.d.ts +4 -0
  5. package/dist/cache-policy.js +20 -6
  6. package/dist/decision-client.d.ts +21 -0
  7. package/dist/decision-client.js +55 -0
  8. package/dist/decision.d.ts +472 -0
  9. package/dist/decision.js +158 -0
  10. package/dist/effect.d.ts +38 -0
  11. package/dist/effect.js +27 -0
  12. package/dist/effort-updates.d.ts +2 -2
  13. package/dist/experimental/cloudflare-run-extraction.d.ts +13 -0
  14. package/dist/experimental/cloudflare-run-extraction.js +83 -0
  15. package/dist/experimental/extraction.d.ts +183 -0
  16. package/dist/experimental/extraction.js +102 -0
  17. package/dist/experimental/realtime.d.ts +7 -2
  18. package/dist/experimental/realtime.js +5 -5
  19. package/dist/experimental.d.ts +2 -3
  20. package/dist/experimental.js +1 -2
  21. package/dist/image-client.d.ts +13 -22
  22. package/dist/image-client.js +0 -1
  23. package/dist/image.d.ts +154 -324
  24. package/dist/image.js +4 -11
  25. package/dist/index.d.ts +1426 -34
  26. package/dist/index.js +127 -24
  27. package/dist/llm.d.ts +16 -1
  28. package/dist/llm.js +34 -0
  29. package/dist/media-client.d.ts +2 -1
  30. package/dist/media-model.d.ts +3 -0
  31. package/dist/media-model.js +4 -1
  32. package/dist/media.d.ts +0 -7
  33. package/dist/media.js +0 -6
  34. package/dist/protocols/alibaba-chat.d.ts +32 -12
  35. package/dist/protocols/alibaba-images.d.ts +22 -0
  36. package/dist/protocols/alibaba-images.js +77 -0
  37. package/dist/protocols/alibaba-messages.d.ts +62 -27
  38. package/dist/protocols/alibaba-responses.d.ts +41 -38
  39. package/dist/protocols/anthropic-messages.d.ts +196 -94
  40. package/dist/protocols/anthropic-messages.js +47 -16
  41. package/dist/protocols/bedrock-converse.d.ts +140 -47
  42. package/dist/protocols/bedrock-converse.js +114 -18
  43. package/dist/protocols/bedrock-event-stream.js +1 -0
  44. package/dist/protocols/bfl-images.d.ts +9 -0
  45. package/dist/protocols/bfl-images.js +17 -15
  46. package/dist/protocols/cartesia-speech.d.ts +32 -50
  47. package/dist/protocols/cloudflare-run-decisions.d.ts +9 -0
  48. package/dist/protocols/cloudflare-run-decisions.js +36 -0
  49. package/dist/protocols/cloudflare-workers-ai-images.d.ts +23 -0
  50. package/dist/protocols/cloudflare-workers-ai-images.js +80 -0
  51. package/dist/protocols/cohere-chat.d.ts +7 -8
  52. package/dist/protocols/deepgram-speech.d.ts +32 -50
  53. package/dist/protocols/elevenlabs-speech.d.ts +32 -50
  54. package/dist/protocols/fal-images.d.ts +10 -1
  55. package/dist/protocols/fal-images.js +16 -25
  56. package/dist/protocols/fal-video.js +1 -1
  57. package/dist/protocols/gemini.d.ts +37 -34
  58. package/dist/protocols/gemini.js +13 -8
  59. package/dist/protocols/google-images.d.ts +2 -2
  60. package/dist/protocols/google-images.js +8 -37
  61. package/dist/protocols/google-interactions.d.ts +18 -14
  62. package/dist/protocols/google-interactions.js +14 -7
  63. package/dist/protocols/google-speech.d.ts +32 -50
  64. package/dist/protocols/google-speech.js +0 -1
  65. package/dist/protocols/google-transcription.d.ts +32 -50
  66. package/dist/protocols/google-transcription.js +0 -1
  67. package/dist/protocols/google-video.d.ts +1 -1
  68. package/dist/protocols/google-video.js +2 -7
  69. package/dist/protocols/index.d.ts +3 -0
  70. package/dist/protocols/index.js +3 -0
  71. package/dist/protocols/meta-images.d.ts +7 -1
  72. package/dist/protocols/meta-images.js +10 -8
  73. package/dist/protocols/meta-messages.d.ts +73 -38
  74. package/dist/protocols/meta-messages.js +14 -1
  75. package/dist/protocols/meta-responses.d.ts +84 -78
  76. package/dist/protocols/meta-responses.js +29 -1
  77. package/dist/protocols/mistral-chat.d.ts +81 -78
  78. package/dist/protocols/mistral-chat.js +2 -1
  79. package/dist/protocols/open-responses-channel.js +47 -46
  80. package/dist/protocols/open-responses-continuation.d.ts +8 -2
  81. package/dist/protocols/open-responses-continuation.js +3 -1
  82. package/dist/protocols/open-responses.d.ts +426 -396
  83. package/dist/protocols/open-responses.js +16 -25
  84. package/dist/protocols/openai-chat.d.ts +764 -52
  85. package/dist/protocols/openai-chat.js +38 -25
  86. package/dist/protocols/openai-compatible-chat.d.ts +35 -15
  87. package/dist/protocols/openai-compatible-responses.d.ts +44 -42
  88. package/dist/protocols/openai-decisions.d.ts +22 -0
  89. package/dist/protocols/openai-decisions.js +128 -0
  90. package/dist/protocols/openai-images.d.ts +53 -56
  91. package/dist/protocols/openai-images.js +100 -34
  92. package/dist/protocols/openai-responses.d.ts +322 -264
  93. package/dist/protocols/openai-responses.js +33 -3
  94. package/dist/protocols/openai-speech.d.ts +32 -50
  95. package/dist/protocols/openai-speech.js +15 -5
  96. package/dist/protocols/openai-transcription.d.ts +32 -50
  97. package/dist/protocols/openai-transcription.js +15 -11
  98. package/dist/protocols/replicate-images.js +1 -1
  99. package/dist/protocols/runway-video.d.ts +1 -1
  100. package/dist/protocols/runway-video.js +1 -1
  101. package/dist/protocols/shared.d.ts +9 -1
  102. package/dist/protocols/shared.js +13 -2
  103. package/dist/protocols/stability-images.d.ts +5 -0
  104. package/dist/protocols/stability-images.js +4 -9
  105. package/dist/protocols/system-one.d.ts +101 -0
  106. package/dist/protocols/system-one.js +230 -0
  107. package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
  108. package/dist/protocols/utils/bedrock-cache.js +7 -6
  109. package/dist/protocols/utils/cache.d.ts +14 -3
  110. package/dist/protocols/utils/cache.js +11 -4
  111. package/dist/protocols/utils/gemini-generate-content.d.ts +3 -3
  112. package/dist/protocols/utils/gemini-generate-content.js +10 -16
  113. package/dist/protocols/utils/gemini-json-schema.d.ts +5 -0
  114. package/dist/protocols/utils/gemini-json-schema.js +3 -3
  115. package/dist/protocols/utils/image-sizing.d.ts +31 -0
  116. package/dist/protocols/utils/image-sizing.js +73 -0
  117. package/dist/protocols/utils/media-input.d.ts +4 -5
  118. package/dist/protocols/utils/media-input.js +8 -5
  119. package/dist/protocols/utils/partial-json-options.d.ts +0 -1
  120. package/dist/protocols/utils/partial-json-options.js +0 -1
  121. package/dist/protocols/utils/speech-stream.d.ts +0 -1
  122. package/dist/protocols/utils/speech-stream.js +0 -1
  123. package/dist/protocols/utils/tool-schema.js +15 -5
  124. package/dist/protocols/utils/tool-stream.d.ts +10 -1
  125. package/dist/protocols/venice-chat.d.ts +71 -53
  126. package/dist/protocols/venice-chat.js +7 -6
  127. package/dist/protocols/xai-images.d.ts +1 -2
  128. package/dist/protocols/xai-images.js +9 -2
  129. package/dist/protocols/xai-responses.d.ts +88 -78
  130. package/dist/protocols/xai-responses.js +28 -2
  131. package/dist/protocols/xai-video.d.ts +1 -1
  132. package/dist/protocols/xai-video.js +11 -8
  133. package/dist/protocols/zai-chat.d.ts +54 -30
  134. package/dist/protocols/zai-chat.js +8 -3
  135. package/dist/protocols/zai-images.d.ts +3 -1
  136. package/dist/protocols/zai-images.js +12 -11
  137. package/dist/protocols/zai-messages.d.ts +72 -35
  138. package/dist/protocols/zai-messages.js +3 -2
  139. package/dist/provider-error.js +24 -7
  140. package/dist/providers/alibaba/images.d.ts +2 -0
  141. package/dist/providers/alibaba/images.js +1 -0
  142. package/dist/providers/alibaba.d.ts +146 -85
  143. package/dist/providers/alibaba.js +16 -8
  144. package/dist/providers/amazon-bedrock-mantle.d.ts +277 -218
  145. package/dist/providers/amazon-bedrock.d.ts +48 -28
  146. package/dist/providers/amazon-bedrock.js +11 -11
  147. package/dist/providers/anthropic-compatible.d.ts +64 -29
  148. package/dist/providers/anthropic.d.ts +64 -29
  149. package/dist/providers/azure/images.d.ts +2 -0
  150. package/dist/providers/azure/images.js +1 -0
  151. package/dist/providers/azure.d.ts +156 -115
  152. package/dist/providers/azure.js +19 -1
  153. package/dist/providers/baseten/decisions.d.ts +2 -0
  154. package/dist/providers/baseten/decisions.js +1 -0
  155. package/dist/providers/baseten.d.ts +75 -25
  156. package/dist/providers/baseten.js +41 -8
  157. package/dist/providers/cerebras.d.ts +66 -24
  158. package/dist/providers/cloudflare-ai-gateway/decisions.d.ts +2 -0
  159. package/dist/providers/cloudflare-ai-gateway/decisions.js +1 -0
  160. package/dist/providers/cloudflare-ai-gateway.d.ts +409 -272
  161. package/dist/providers/cloudflare-ai-gateway.js +33 -6
  162. package/dist/providers/cloudflare-workers-ai/decisions.d.ts +2 -0
  163. package/dist/providers/cloudflare-workers-ai/decisions.js +1 -0
  164. package/dist/providers/cloudflare-workers-ai/images.d.ts +2 -0
  165. package/dist/providers/cloudflare-workers-ai/images.js +1 -0
  166. package/dist/providers/cloudflare-workers-ai.d.ts +79 -25
  167. package/dist/providers/cloudflare-workers-ai.js +45 -9
  168. package/dist/providers/cohere.d.ts +117 -75
  169. package/dist/providers/deepinfra.d.ts +66 -24
  170. package/dist/providers/deepseek.d.ts +66 -24
  171. package/dist/providers/digitalocean/decisions.d.ts +2 -0
  172. package/dist/providers/digitalocean/decisions.js +1 -0
  173. package/dist/providers/digitalocean/images.d.ts +2 -0
  174. package/dist/providers/digitalocean/images.js +1 -0
  175. package/dist/providers/digitalocean.d.ts +108 -37
  176. package/dist/providers/digitalocean.js +39 -8
  177. package/dist/providers/fireworks.d.ts +66 -24
  178. package/dist/providers/google/images.d.ts +2 -0
  179. package/dist/providers/google/images.js +1 -0
  180. package/dist/providers/google-vertex/images.d.ts +2 -0
  181. package/dist/providers/google-vertex/images.js +1 -0
  182. package/dist/providers/google-vertex-chat.d.ts +33 -12
  183. package/dist/providers/google-vertex-messages.d.ts +64 -29
  184. package/dist/providers/google-vertex-mistral.d.ts +17 -17
  185. package/dist/providers/google-vertex-responses.d.ts +38 -35
  186. package/dist/providers/google-vertex.d.ts +20 -18
  187. package/dist/providers/google-vertex.js +32 -15
  188. package/dist/providers/google.d.ts +22 -21
  189. package/dist/providers/google.js +15 -8
  190. package/dist/providers/groq.d.ts +66 -28
  191. package/dist/providers/groq.js +0 -6
  192. package/dist/providers/meta.d.ts +144 -85
  193. package/dist/providers/minimax.d.ts +145 -86
  194. package/dist/providers/mistral.d.ts +28 -28
  195. package/dist/providers/moonshot.d.ts +277 -218
  196. package/dist/providers/open-responses-options.d.ts +0 -1
  197. package/dist/providers/open-responses-options.js +1 -1
  198. package/dist/providers/openai/images.d.ts +2 -0
  199. package/dist/providers/openai/images.js +1 -0
  200. package/dist/providers/openai-compatible/images.d.ts +2 -0
  201. package/dist/providers/openai-compatible/images.js +1 -0
  202. package/dist/providers/openai-compatible-responses.d.ts +38 -35
  203. package/dist/providers/openai-compatible.d.ts +36 -13
  204. package/dist/providers/openai-compatible.js +22 -10
  205. package/dist/providers/openai-options.d.ts +3 -2
  206. package/dist/providers/openai-options.js +0 -1
  207. package/dist/providers/openai.d.ts +146 -109
  208. package/dist/providers/openai.js +20 -4
  209. package/dist/providers/opencode/decisions.d.ts +2 -0
  210. package/dist/providers/opencode/decisions.js +1 -0
  211. package/dist/providers/opencode.d.ts +9 -10
  212. package/dist/providers/opencode.js +10 -8
  213. package/dist/providers/openrouter/decisions.d.ts +2 -0
  214. package/dist/providers/openrouter/decisions.js +1 -0
  215. package/dist/providers/openrouter/images.d.ts +2 -0
  216. package/dist/providers/openrouter/images.js +1 -0
  217. package/dist/providers/openrouter.d.ts +128 -47
  218. package/dist/providers/openrouter.js +38 -16
  219. package/dist/providers/togetherai.d.ts +66 -24
  220. package/dist/providers/typesafe-ai/decisions.d.ts +2 -0
  221. package/dist/providers/typesafe-ai/decisions.js +1 -0
  222. package/dist/providers/typesafe-ai.d.ts +9 -10
  223. package/dist/providers/typesafe-ai.js +10 -8
  224. package/dist/providers/venice.d.ts +214 -20
  225. package/dist/providers/vercel-ai-gateway/decisions.d.ts +2 -0
  226. package/dist/providers/vercel-ai-gateway/decisions.js +1 -0
  227. package/dist/providers/vercel-ai-gateway/images.d.ts +2 -0
  228. package/dist/providers/vercel-ai-gateway/images.js +1 -0
  229. package/dist/providers/vercel-ai-gateway.d.ts +10 -16
  230. package/dist/providers/vercel-ai-gateway.js +31 -85
  231. package/dist/providers/xai/images.d.ts +2 -0
  232. package/dist/providers/xai/images.js +1 -0
  233. package/dist/providers/xai.d.ts +40 -17
  234. package/dist/providers/xai.js +15 -8
  235. package/dist/providers/zai/images.d.ts +2 -0
  236. package/dist/providers/zai/images.js +1 -0
  237. package/dist/providers/zai-coding-plan.d.ts +224 -85
  238. package/dist/providers/zai.d.ts +110 -23
  239. package/dist/providers/zai.js +15 -8
  240. package/dist/route/auth-options.d.ts +0 -3
  241. package/dist/route/auth.d.ts +0 -2
  242. package/dist/route/auth.js +0 -2
  243. package/dist/route/client.d.ts +2 -4
  244. package/dist/route/client.js +29 -8
  245. package/dist/route/decision.d.ts +58 -0
  246. package/dist/route/decision.js +75 -0
  247. package/dist/route/executor-service.js +1 -1
  248. package/dist/route/executor.d.ts +1 -1
  249. package/dist/route/framing.d.ts +2 -0
  250. package/dist/route/index.d.ts +3 -0
  251. package/dist/route/index.js +3 -0
  252. package/dist/route/media-protocol.d.ts +1 -0
  253. package/dist/route/media-protocol.js +12 -8
  254. package/dist/route/media.d.ts +5 -1
  255. package/dist/route/media.js +6 -2
  256. package/dist/route/transport/http.js +1 -0
  257. package/dist/route/transport/index.d.ts +1 -0
  258. package/dist/schema/events.d.ts +148 -6
  259. package/dist/schema/events.js +20 -0
  260. package/dist/schema/messages.d.ts +6 -2
  261. package/dist/schema/messages.js +3 -0
  262. package/dist/schema/options.d.ts +5 -3
  263. package/dist/schema/options.js +8 -3
  264. package/dist/speech-client.d.ts +13 -22
  265. package/dist/speech-client.js +0 -1
  266. package/dist/speech.d.ts +148 -283
  267. package/dist/speech.js +2 -4
  268. package/dist/testing.d.ts +25 -24
  269. package/dist/testing.js +3 -21
  270. package/dist/transcription-client.d.ts +13 -22
  271. package/dist/transcription.d.ts +148 -283
  272. package/dist/transcription.js +1 -1
  273. package/dist/utils/media-type.js +22 -1
  274. package/dist/video-client.d.ts +13 -22
  275. package/dist/video-client.js +0 -1
  276. package/dist/video.d.ts +115 -250
  277. package/dist/video.js +3 -5
  278. package/package.json +516 -13
  279. package/dist/experimental/evaluation-client.d.ts +0 -21
  280. package/dist/experimental/evaluation-client.js +0 -64
  281. package/dist/experimental/evaluation.d.ts +0 -242
  282. package/dist/experimental/evaluation.js +0 -115
  283. package/dist/experimental/system-one.d.ts +0 -16
  284. package/dist/experimental/system-one.js +0 -135
  285. package/dist/promise.d.ts +0 -1021
  286. package/dist/promise.js +0 -101
  287. package/dist/provider.d.ts +0 -23
  288. package/dist/provider.js +0 -2
@@ -10,7 +10,6 @@ export declare const DEFAULT_BASE_URL = "https://api.anthropic.com/v1";
10
10
  export declare const PATH = "/messages";
11
11
  export declare const DEFAULT_MAX_TOKENS = 32000;
12
12
  export declare const framing: Framing.Definition<string>;
13
- export type ThinkingBlockBinding = typeof AnthropicThinkingBlockBinding.Type;
14
13
  export type ThinkingInput = typeof Thinking.Encoded;
15
14
  /** Caller-facing provider options; unknown keys are accepted and ignored. `Options.Type` is the wire-ready form. */
16
15
  export type OptionsInput = ProviderOptions & typeof Options.Encoded;
@@ -27,9 +26,6 @@ export declare const ContextManagement: Schema.Struct<{
27
26
  }>>;
28
27
  }>;
29
28
  export type ContextManagement = typeof ContextManagement.Type;
30
- declare const AnthropicThinkingBlockBinding: Schema.Struct<{
31
- readonly prefix_mismatch_behavior: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"drop_block" | "error">, import("../schema/options.js").OpenString<"drop_block" | "error">>>;
32
- }>;
33
29
  declare const Thinking: Schema.Union<readonly [Schema.decodeTo<Schema.Struct<{
34
30
  readonly display: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"omitted" | "summarized">, import("../schema/options.js").OpenString<"omitted" | "summarized">>>;
35
31
  readonly block_binding: Schema.optional<Schema.Struct<{
@@ -106,6 +102,7 @@ declare const Options: Schema.Struct<{
106
102
  readonly effort: Schema.optional<Schema.String>;
107
103
  readonly service_tier: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"auto" | "standard_only">, import("../schema/options.js").OpenString<"auto" | "standard_only">>>;
108
104
  readonly serviceTier: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"auto" | "standard_only">, import("../schema/options.js").OpenString<"auto" | "standard_only">>>;
105
+ readonly speed: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"fast" | "standard">, import("../schema/options.js").OpenString<"fast" | "standard">>>;
109
106
  readonly metadata: Schema.optional<Schema.Struct<{
110
107
  readonly user_id: Schema.optional<Schema.NullOr<Schema.String>>;
111
108
  }>>;
@@ -117,11 +114,11 @@ declare const Options: Schema.Struct<{
117
114
  readonly inferenceGeo: Schema.optional<Schema.NullOr<Schema.String>>;
118
115
  readonly cache_control: Schema.optional<Schema.Struct<{
119
116
  readonly type: Schema.tag<"ephemeral">;
120
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
117
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
121
118
  }>>;
122
119
  readonly cacheControl: Schema.optional<Schema.Struct<{
123
120
  readonly type: Schema.tag<"ephemeral">;
124
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
121
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
125
122
  }>>;
126
123
  readonly output_config: Schema.optional<Schema.Struct<{
127
124
  readonly effort: Schema.optional<Schema.NullOr<Schema.String>>;
@@ -156,7 +153,7 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
156
153
  readonly text: Schema.String;
157
154
  readonly cache_control: Schema.optional<Schema.Struct<{
158
155
  readonly type: Schema.tag<"ephemeral">;
159
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
156
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
160
157
  }>>;
161
158
  }>>>;
162
159
  messages: Schema.$Array<Schema.toTaggedUnion<"role", readonly [Schema.Struct<{
@@ -166,7 +163,7 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
166
163
  readonly text: Schema.String;
167
164
  readonly cache_control: Schema.optional<Schema.Struct<{
168
165
  readonly type: Schema.tag<"ephemeral">;
169
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
166
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
170
167
  }>>;
171
168
  }>, Schema.Struct<{
172
169
  readonly type: Schema.tag<"image">;
@@ -183,7 +180,7 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
183
180
  }>]>;
184
181
  readonly cache_control: Schema.optional<Schema.Struct<{
185
182
  readonly type: Schema.tag<"ephemeral">;
186
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
183
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
187
184
  }>>;
188
185
  readonly transformations: Schema.optional<Schema.Struct<{
189
186
  readonly oversized_image: Schema.optional<Schema.Literals<readonly ["downsize", "error"]>>;
@@ -207,13 +204,30 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
207
204
  }>]>;
208
205
  readonly cache_control: Schema.optional<Schema.Struct<{
209
206
  readonly type: Schema.tag<"ephemeral">;
210
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
207
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
211
208
  }>>;
212
209
  readonly title: Schema.optional<Schema.String>;
213
210
  readonly context: Schema.optional<Schema.String>;
214
211
  readonly citations: Schema.optional<Schema.Struct<{
215
212
  readonly enabled: Schema.Boolean;
216
213
  }>>;
214
+ }>, Schema.Struct<{
215
+ readonly type: Schema.tag<"video">;
216
+ readonly source: Schema.Union<readonly [Schema.Struct<{
217
+ readonly type: Schema.tag<"base64">;
218
+ readonly media_type: Schema.String;
219
+ readonly data: Schema.String;
220
+ }>, Schema.Struct<{
221
+ readonly type: Schema.tag<"url">;
222
+ readonly url: Schema.String;
223
+ }>, Schema.Struct<{
224
+ readonly type: Schema.tag<"file">;
225
+ readonly file_id: Schema.String;
226
+ }>]>;
227
+ readonly cache_control: Schema.optional<Schema.Struct<{
228
+ readonly type: Schema.tag<"ephemeral">;
229
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
230
+ }>>;
217
231
  }>, Schema.Struct<{
218
232
  readonly type: Schema.tag<"tool_result">;
219
233
  readonly tool_use_id: Schema.String;
@@ -222,7 +236,7 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
222
236
  readonly text: Schema.String;
223
237
  readonly cache_control: Schema.optional<Schema.Struct<{
224
238
  readonly type: Schema.tag<"ephemeral">;
225
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
239
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
226
240
  }>>;
227
241
  }>, Schema.Struct<{
228
242
  readonly type: Schema.tag<"image">;
@@ -239,7 +253,7 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
239
253
  }>]>;
240
254
  readonly cache_control: Schema.optional<Schema.Struct<{
241
255
  readonly type: Schema.tag<"ephemeral">;
242
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
256
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
243
257
  }>>;
244
258
  readonly transformations: Schema.optional<Schema.Struct<{
245
259
  readonly oversized_image: Schema.optional<Schema.Literals<readonly ["downsize", "error"]>>;
@@ -263,18 +277,35 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
263
277
  }>]>;
264
278
  readonly cache_control: Schema.optional<Schema.Struct<{
265
279
  readonly type: Schema.tag<"ephemeral">;
266
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
280
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
267
281
  }>>;
268
282
  readonly title: Schema.optional<Schema.String>;
269
283
  readonly context: Schema.optional<Schema.String>;
270
284
  readonly citations: Schema.optional<Schema.Struct<{
271
285
  readonly enabled: Schema.Boolean;
272
286
  }>>;
287
+ }>, Schema.Struct<{
288
+ readonly type: Schema.tag<"video">;
289
+ readonly source: Schema.Union<readonly [Schema.Struct<{
290
+ readonly type: Schema.tag<"base64">;
291
+ readonly media_type: Schema.String;
292
+ readonly data: Schema.String;
293
+ }>, Schema.Struct<{
294
+ readonly type: Schema.tag<"url">;
295
+ readonly url: Schema.String;
296
+ }>, Schema.Struct<{
297
+ readonly type: Schema.tag<"file">;
298
+ readonly file_id: Schema.String;
299
+ }>]>;
300
+ readonly cache_control: Schema.optional<Schema.Struct<{
301
+ readonly type: Schema.tag<"ephemeral">;
302
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
303
+ }>>;
273
304
  }>]>>]>;
274
305
  readonly is_error: Schema.optional<Schema.Boolean>;
275
306
  readonly cache_control: Schema.optional<Schema.Struct<{
276
307
  readonly type: Schema.tag<"ephemeral">;
277
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
308
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
278
309
  }>>;
279
310
  }>]>>;
280
311
  }>, Schema.Struct<{
@@ -287,7 +318,7 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
287
318
  readonly text: Schema.String;
288
319
  readonly cache_control: Schema.optional<Schema.Struct<{
289
320
  readonly type: Schema.tag<"ephemeral">;
290
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
321
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
291
322
  }>>;
292
323
  }>, Schema.Struct<{
293
324
  readonly type: Schema.tag<"thinking">;
@@ -295,14 +326,14 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
295
326
  readonly signature: Schema.String;
296
327
  readonly cache_control: Schema.optional<Schema.Struct<{
297
328
  readonly type: Schema.tag<"ephemeral">;
298
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
329
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
299
330
  }>>;
300
331
  }>, Schema.Struct<{
301
332
  readonly type: Schema.tag<"redacted_thinking">;
302
333
  readonly data: Schema.String;
303
334
  readonly cache_control: Schema.optional<Schema.Struct<{
304
335
  readonly type: Schema.tag<"ephemeral">;
305
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
336
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
306
337
  }>>;
307
338
  }>, Schema.Struct<{
308
339
  readonly type: Schema.tag<"tool_use">;
@@ -311,7 +342,7 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
311
342
  readonly input: Schema.Unknown;
312
343
  readonly cache_control: Schema.optional<Schema.Struct<{
313
344
  readonly type: Schema.tag<"ephemeral">;
314
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
345
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
315
346
  }>>;
316
347
  }>, Schema.Struct<{
317
348
  readonly type: Schema.tag<"server_tool_use">;
@@ -320,7 +351,7 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
320
351
  readonly input: Schema.Unknown;
321
352
  readonly cache_control: Schema.optional<Schema.Struct<{
322
353
  readonly type: Schema.tag<"ephemeral">;
323
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
354
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
324
355
  }>>;
325
356
  }>, Schema.Struct<{
326
357
  readonly type: Schema.Literals<readonly ["web_search_tool_result", "code_execution_tool_result", "web_fetch_tool_result"]>;
@@ -328,7 +359,7 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
328
359
  readonly content: Schema.Unknown;
329
360
  readonly cache_control: Schema.optional<Schema.Struct<{
330
361
  readonly type: Schema.tag<"ephemeral">;
331
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
362
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
332
363
  }>>;
333
364
  }>]>>;
334
365
  }>, Schema.Struct<{
@@ -338,7 +369,7 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
338
369
  readonly text: Schema.String;
339
370
  readonly cache_control: Schema.optional<Schema.Struct<{
340
371
  readonly type: Schema.tag<"ephemeral">;
341
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
372
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
342
373
  }>>;
343
374
  }>>;
344
375
  readonly output_config: Schema.optional<Schema.Struct<{
@@ -351,7 +382,7 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
351
382
  readonly input_schema: Schema.$Record<Schema.String, Schema.Unknown>;
352
383
  readonly cache_control: Schema.optional<Schema.Struct<{
353
384
  readonly type: Schema.tag<"ephemeral">;
354
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
385
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
355
386
  }>>;
356
387
  }>>>;
357
388
  tool_choice: Schema.optional<Schema.Union<readonly [Schema.Struct<{
@@ -393,7 +424,7 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
393
424
  }>>;
394
425
  cache_control: Schema.optional<Schema.Struct<{
395
426
  readonly type: Schema.tag<"ephemeral">;
396
- readonly ttl: Schema.optional<Schema.Literals<readonly ["5m", "1h"]>>;
427
+ readonly ttl: Schema.optional<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>;
397
428
  }>>;
398
429
  container: Schema.optional<Schema.NullOr<Schema.Union<readonly [Schema.String, Schema.Struct<{
399
430
  readonly id: Schema.optional<Schema.NullOr<Schema.String>>;
@@ -404,6 +435,7 @@ export declare const AnthropicMessagesBody: Schema.Struct<{
404
435
  readonly user_id: Schema.optional<Schema.NullOr<Schema.String>>;
405
436
  }>>;
406
437
  service_tier: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"auto" | "standard_only">, import("../schema/options.js").OpenString<"auto" | "standard_only">>>;
438
+ speed: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"fast" | "standard">, import("../schema/options.js").OpenString<"fast" | "standard">>>;
407
439
  }>;
408
440
  export type AnthropicMessagesBody = Schema.Schema.Type<typeof AnthropicMessagesBody>;
409
441
  /**
@@ -429,7 +461,7 @@ export declare const protocol: Protocol<{
429
461
  readonly text: string;
430
462
  readonly cache_control?: {
431
463
  readonly type: "ephemeral";
432
- readonly ttl?: "1h" | "5m" | undefined;
464
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
433
465
  } | undefined;
434
466
  }[] | undefined;
435
467
  readonly messages: readonly ({
@@ -439,7 +471,7 @@ export declare const protocol: Protocol<{
439
471
  readonly text: string;
440
472
  readonly cache_control?: {
441
473
  readonly type: "ephemeral";
442
- readonly ttl?: "1h" | "5m" | undefined;
474
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
443
475
  } | undefined;
444
476
  } | {
445
477
  readonly type: "image";
@@ -456,11 +488,28 @@ export declare const protocol: Protocol<{
456
488
  };
457
489
  readonly cache_control?: {
458
490
  readonly type: "ephemeral";
459
- readonly ttl?: "1h" | "5m" | undefined;
491
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
460
492
  } | undefined;
461
493
  readonly transformations?: {
462
494
  readonly oversized_image?: "downsize" | "error" | undefined;
463
495
  } | undefined;
496
+ } | {
497
+ readonly type: "video";
498
+ readonly source: {
499
+ readonly type: "base64";
500
+ readonly media_type: string;
501
+ readonly data: string;
502
+ } | {
503
+ readonly type: "url";
504
+ readonly url: string;
505
+ } | {
506
+ readonly type: "file";
507
+ readonly file_id: string;
508
+ };
509
+ readonly cache_control?: {
510
+ readonly type: "ephemeral";
511
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
512
+ } | undefined;
464
513
  } | {
465
514
  readonly type: "document";
466
515
  readonly source: {
@@ -480,7 +529,7 @@ export declare const protocol: Protocol<{
480
529
  };
481
530
  readonly cache_control?: {
482
531
  readonly type: "ephemeral";
483
- readonly ttl?: "1h" | "5m" | undefined;
532
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
484
533
  } | undefined;
485
534
  readonly title?: string | undefined;
486
535
  readonly context?: string | undefined;
@@ -495,7 +544,7 @@ export declare const protocol: Protocol<{
495
544
  readonly text: string;
496
545
  readonly cache_control?: {
497
546
  readonly type: "ephemeral";
498
- readonly ttl?: "1h" | "5m" | undefined;
547
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
499
548
  } | undefined;
500
549
  } | {
501
550
  readonly type: "image";
@@ -512,11 +561,28 @@ export declare const protocol: Protocol<{
512
561
  };
513
562
  readonly cache_control?: {
514
563
  readonly type: "ephemeral";
515
- readonly ttl?: "1h" | "5m" | undefined;
564
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
516
565
  } | undefined;
517
566
  readonly transformations?: {
518
567
  readonly oversized_image?: "downsize" | "error" | undefined;
519
568
  } | undefined;
569
+ } | {
570
+ readonly type: "video";
571
+ readonly source: {
572
+ readonly type: "base64";
573
+ readonly media_type: string;
574
+ readonly data: string;
575
+ } | {
576
+ readonly type: "url";
577
+ readonly url: string;
578
+ } | {
579
+ readonly type: "file";
580
+ readonly file_id: string;
581
+ };
582
+ readonly cache_control?: {
583
+ readonly type: "ephemeral";
584
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
585
+ } | undefined;
520
586
  } | {
521
587
  readonly type: "document";
522
588
  readonly source: {
@@ -536,7 +602,7 @@ export declare const protocol: Protocol<{
536
602
  };
537
603
  readonly cache_control?: {
538
604
  readonly type: "ephemeral";
539
- readonly ttl?: "1h" | "5m" | undefined;
605
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
540
606
  } | undefined;
541
607
  readonly title?: string | undefined;
542
608
  readonly context?: string | undefined;
@@ -547,17 +613,35 @@ export declare const protocol: Protocol<{
547
613
  readonly is_error?: boolean | undefined;
548
614
  readonly cache_control?: {
549
615
  readonly type: "ephemeral";
550
- readonly ttl?: "1h" | "5m" | undefined;
616
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
551
617
  } | undefined;
552
618
  })[];
553
619
  } | {
554
620
  readonly role: "assistant";
555
621
  readonly content: readonly ({
622
+ readonly type: "compaction";
623
+ readonly content: string | null;
624
+ } | {
556
625
  readonly type: "text";
557
626
  readonly text: string;
558
627
  readonly cache_control?: {
559
628
  readonly type: "ephemeral";
560
- readonly ttl?: "1h" | "5m" | undefined;
629
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
630
+ } | undefined;
631
+ } | {
632
+ readonly type: "thinking";
633
+ readonly thinking: string;
634
+ readonly signature: string;
635
+ readonly cache_control?: {
636
+ readonly type: "ephemeral";
637
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
638
+ } | undefined;
639
+ } | {
640
+ readonly type: "redacted_thinking";
641
+ readonly data: string;
642
+ readonly cache_control?: {
643
+ readonly type: "ephemeral";
644
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
561
645
  } | undefined;
562
646
  } | {
563
647
  readonly type: "tool_use";
@@ -566,7 +650,7 @@ export declare const protocol: Protocol<{
566
650
  readonly input: unknown;
567
651
  readonly cache_control?: {
568
652
  readonly type: "ephemeral";
569
- readonly ttl?: "1h" | "5m" | undefined;
653
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
570
654
  } | undefined;
571
655
  } | {
572
656
  readonly type: "server_tool_use";
@@ -575,7 +659,7 @@ export declare const protocol: Protocol<{
575
659
  readonly input: unknown;
576
660
  readonly cache_control?: {
577
661
  readonly type: "ephemeral";
578
- readonly ttl?: "1h" | "5m" | undefined;
662
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
579
663
  } | undefined;
580
664
  } | {
581
665
  readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
@@ -583,25 +667,7 @@ export declare const protocol: Protocol<{
583
667
  readonly content: unknown;
584
668
  readonly cache_control?: {
585
669
  readonly type: "ephemeral";
586
- readonly ttl?: "1h" | "5m" | undefined;
587
- } | undefined;
588
- } | {
589
- readonly type: "compaction";
590
- readonly content: string | null;
591
- } | {
592
- readonly type: "thinking";
593
- readonly thinking: string;
594
- readonly signature: string;
595
- readonly cache_control?: {
596
- readonly type: "ephemeral";
597
- readonly ttl?: "1h" | "5m" | undefined;
598
- } | undefined;
599
- } | {
600
- readonly type: "redacted_thinking";
601
- readonly data: string;
602
- readonly cache_control?: {
603
- readonly type: "ephemeral";
604
- readonly ttl?: "1h" | "5m" | undefined;
670
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
605
671
  } | undefined;
606
672
  })[];
607
673
  } | {
@@ -611,7 +677,7 @@ export declare const protocol: Protocol<{
611
677
  readonly text: string;
612
678
  readonly cache_control?: {
613
679
  readonly type: "ephemeral";
614
- readonly ttl?: "1h" | "5m" | undefined;
680
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
615
681
  } | undefined;
616
682
  }[];
617
683
  readonly output_config?: {
@@ -626,7 +692,7 @@ export declare const protocol: Protocol<{
626
692
  };
627
693
  readonly cache_control?: {
628
694
  readonly type: "ephemeral";
629
- readonly ttl?: "1h" | "5m" | undefined;
695
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
630
696
  } | undefined;
631
697
  }[] | undefined;
632
698
  readonly tool_choice?: {
@@ -644,6 +710,8 @@ export declare const protocol: Protocol<{
644
710
  readonly top_k?: number | undefined;
645
711
  readonly stop_sequences?: readonly string[] | undefined;
646
712
  readonly thinking?: {
713
+ readonly type: "between_tools" | "disabled";
714
+ } | {
647
715
  readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
648
716
  readonly block_binding?: {
649
717
  readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
@@ -656,8 +724,6 @@ export declare const protocol: Protocol<{
656
724
  readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
657
725
  } | undefined;
658
726
  readonly type: "adaptive";
659
- } | {
660
- readonly type: "between_tools" | "disabled";
661
727
  } | undefined;
662
728
  readonly output_config?: {
663
729
  readonly effort?: string | undefined;
@@ -670,7 +736,7 @@ export declare const protocol: Protocol<{
670
736
  } | undefined;
671
737
  readonly cache_control?: {
672
738
  readonly type: "ephemeral";
673
- readonly ttl?: "1h" | "5m" | undefined;
739
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
674
740
  } | undefined;
675
741
  readonly container?: string | {
676
742
  readonly id?: string | null | undefined;
@@ -683,6 +749,7 @@ export declare const protocol: Protocol<{
683
749
  readonly user_id?: string | null | undefined;
684
750
  } | undefined;
685
751
  readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
752
+ readonly speed?: import("../schema/options.js").OpenString<"fast" | "standard"> | undefined;
686
753
  }, string, {
687
754
  readonly [x: string]: unknown;
688
755
  readonly type: string;
@@ -765,7 +832,7 @@ export declare const protocol: Protocol<{
765
832
  reasoningSignatures: {};
766
833
  lifecycle: Lifecycle.State;
767
834
  }>;
768
- export declare const transport: <Body extends Pick<AnthropicMessagesBody, "messages" | "context_management" | "thinking">>() => {
835
+ export declare const transport: <Body extends Pick<AnthropicMessagesBody, "messages" | "context_management" | "thinking" | "speed">>() => {
769
836
  with: (patch: Partial<HttpTransport.HttpJsonInput<Body, string>>) => HttpTransport.HttpJsonTransport<Body, string>;
770
837
  id: string;
771
838
  execute: (prepared: HttpTransport.HttpPrepared<string>, request: LLMRequest, runtime: import("../route/transport/index.js").TransportRuntime, options?: import("../route/transport/index.js").TransportExecuteOptions) => Effect.Effect<import("../route/transport/index.js").TransportExecution<string>, AIError, import("effect/Scope").Scope>;
@@ -789,7 +856,7 @@ export declare const route: Route<{
789
856
  readonly text: string;
790
857
  readonly cache_control?: {
791
858
  readonly type: "ephemeral";
792
- readonly ttl?: "1h" | "5m" | undefined;
859
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
793
860
  } | undefined;
794
861
  }[] | undefined;
795
862
  readonly messages: readonly ({
@@ -799,7 +866,7 @@ export declare const route: Route<{
799
866
  readonly text: string;
800
867
  readonly cache_control?: {
801
868
  readonly type: "ephemeral";
802
- readonly ttl?: "1h" | "5m" | undefined;
869
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
803
870
  } | undefined;
804
871
  } | {
805
872
  readonly type: "image";
@@ -816,11 +883,28 @@ export declare const route: Route<{
816
883
  };
817
884
  readonly cache_control?: {
818
885
  readonly type: "ephemeral";
819
- readonly ttl?: "1h" | "5m" | undefined;
886
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
820
887
  } | undefined;
821
888
  readonly transformations?: {
822
889
  readonly oversized_image?: "downsize" | "error" | undefined;
823
890
  } | undefined;
891
+ } | {
892
+ readonly type: "video";
893
+ readonly source: {
894
+ readonly type: "base64";
895
+ readonly media_type: string;
896
+ readonly data: string;
897
+ } | {
898
+ readonly type: "url";
899
+ readonly url: string;
900
+ } | {
901
+ readonly type: "file";
902
+ readonly file_id: string;
903
+ };
904
+ readonly cache_control?: {
905
+ readonly type: "ephemeral";
906
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
907
+ } | undefined;
824
908
  } | {
825
909
  readonly type: "document";
826
910
  readonly source: {
@@ -840,7 +924,7 @@ export declare const route: Route<{
840
924
  };
841
925
  readonly cache_control?: {
842
926
  readonly type: "ephemeral";
843
- readonly ttl?: "1h" | "5m" | undefined;
927
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
844
928
  } | undefined;
845
929
  readonly title?: string | undefined;
846
930
  readonly context?: string | undefined;
@@ -855,7 +939,7 @@ export declare const route: Route<{
855
939
  readonly text: string;
856
940
  readonly cache_control?: {
857
941
  readonly type: "ephemeral";
858
- readonly ttl?: "1h" | "5m" | undefined;
942
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
859
943
  } | undefined;
860
944
  } | {
861
945
  readonly type: "image";
@@ -872,11 +956,28 @@ export declare const route: Route<{
872
956
  };
873
957
  readonly cache_control?: {
874
958
  readonly type: "ephemeral";
875
- readonly ttl?: "1h" | "5m" | undefined;
959
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
876
960
  } | undefined;
877
961
  readonly transformations?: {
878
962
  readonly oversized_image?: "downsize" | "error" | undefined;
879
963
  } | undefined;
964
+ } | {
965
+ readonly type: "video";
966
+ readonly source: {
967
+ readonly type: "base64";
968
+ readonly media_type: string;
969
+ readonly data: string;
970
+ } | {
971
+ readonly type: "url";
972
+ readonly url: string;
973
+ } | {
974
+ readonly type: "file";
975
+ readonly file_id: string;
976
+ };
977
+ readonly cache_control?: {
978
+ readonly type: "ephemeral";
979
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
980
+ } | undefined;
880
981
  } | {
881
982
  readonly type: "document";
882
983
  readonly source: {
@@ -896,7 +997,7 @@ export declare const route: Route<{
896
997
  };
897
998
  readonly cache_control?: {
898
999
  readonly type: "ephemeral";
899
- readonly ttl?: "1h" | "5m" | undefined;
1000
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
900
1001
  } | undefined;
901
1002
  readonly title?: string | undefined;
902
1003
  readonly context?: string | undefined;
@@ -907,17 +1008,35 @@ export declare const route: Route<{
907
1008
  readonly is_error?: boolean | undefined;
908
1009
  readonly cache_control?: {
909
1010
  readonly type: "ephemeral";
910
- readonly ttl?: "1h" | "5m" | undefined;
1011
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
911
1012
  } | undefined;
912
1013
  })[];
913
1014
  } | {
914
1015
  readonly role: "assistant";
915
1016
  readonly content: readonly ({
1017
+ readonly type: "compaction";
1018
+ readonly content: string | null;
1019
+ } | {
916
1020
  readonly type: "text";
917
1021
  readonly text: string;
918
1022
  readonly cache_control?: {
919
1023
  readonly type: "ephemeral";
920
- readonly ttl?: "1h" | "5m" | undefined;
1024
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
1025
+ } | undefined;
1026
+ } | {
1027
+ readonly type: "thinking";
1028
+ readonly thinking: string;
1029
+ readonly signature: string;
1030
+ readonly cache_control?: {
1031
+ readonly type: "ephemeral";
1032
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
1033
+ } | undefined;
1034
+ } | {
1035
+ readonly type: "redacted_thinking";
1036
+ readonly data: string;
1037
+ readonly cache_control?: {
1038
+ readonly type: "ephemeral";
1039
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
921
1040
  } | undefined;
922
1041
  } | {
923
1042
  readonly type: "tool_use";
@@ -926,7 +1045,7 @@ export declare const route: Route<{
926
1045
  readonly input: unknown;
927
1046
  readonly cache_control?: {
928
1047
  readonly type: "ephemeral";
929
- readonly ttl?: "1h" | "5m" | undefined;
1048
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
930
1049
  } | undefined;
931
1050
  } | {
932
1051
  readonly type: "server_tool_use";
@@ -935,7 +1054,7 @@ export declare const route: Route<{
935
1054
  readonly input: unknown;
936
1055
  readonly cache_control?: {
937
1056
  readonly type: "ephemeral";
938
- readonly ttl?: "1h" | "5m" | undefined;
1057
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
939
1058
  } | undefined;
940
1059
  } | {
941
1060
  readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
@@ -943,25 +1062,7 @@ export declare const route: Route<{
943
1062
  readonly content: unknown;
944
1063
  readonly cache_control?: {
945
1064
  readonly type: "ephemeral";
946
- readonly ttl?: "1h" | "5m" | undefined;
947
- } | undefined;
948
- } | {
949
- readonly type: "compaction";
950
- readonly content: string | null;
951
- } | {
952
- readonly type: "thinking";
953
- readonly thinking: string;
954
- readonly signature: string;
955
- readonly cache_control?: {
956
- readonly type: "ephemeral";
957
- readonly ttl?: "1h" | "5m" | undefined;
958
- } | undefined;
959
- } | {
960
- readonly type: "redacted_thinking";
961
- readonly data: string;
962
- readonly cache_control?: {
963
- readonly type: "ephemeral";
964
- readonly ttl?: "1h" | "5m" | undefined;
1065
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
965
1066
  } | undefined;
966
1067
  })[];
967
1068
  } | {
@@ -971,7 +1072,7 @@ export declare const route: Route<{
971
1072
  readonly text: string;
972
1073
  readonly cache_control?: {
973
1074
  readonly type: "ephemeral";
974
- readonly ttl?: "1h" | "5m" | undefined;
1075
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
975
1076
  } | undefined;
976
1077
  }[];
977
1078
  readonly output_config?: {
@@ -986,7 +1087,7 @@ export declare const route: Route<{
986
1087
  };
987
1088
  readonly cache_control?: {
988
1089
  readonly type: "ephemeral";
989
- readonly ttl?: "1h" | "5m" | undefined;
1090
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
990
1091
  } | undefined;
991
1092
  }[] | undefined;
992
1093
  readonly tool_choice?: {
@@ -1004,6 +1105,8 @@ export declare const route: Route<{
1004
1105
  readonly top_k?: number | undefined;
1005
1106
  readonly stop_sequences?: readonly string[] | undefined;
1006
1107
  readonly thinking?: {
1108
+ readonly type: "between_tools" | "disabled";
1109
+ } | {
1007
1110
  readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
1008
1111
  readonly block_binding?: {
1009
1112
  readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
@@ -1016,8 +1119,6 @@ export declare const route: Route<{
1016
1119
  readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
1017
1120
  } | undefined;
1018
1121
  readonly type: "adaptive";
1019
- } | {
1020
- readonly type: "between_tools" | "disabled";
1021
1122
  } | undefined;
1022
1123
  readonly output_config?: {
1023
1124
  readonly effort?: string | undefined;
@@ -1030,7 +1131,7 @@ export declare const route: Route<{
1030
1131
  } | undefined;
1031
1132
  readonly cache_control?: {
1032
1133
  readonly type: "ephemeral";
1033
- readonly ttl?: "1h" | "5m" | undefined;
1134
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
1034
1135
  } | undefined;
1035
1136
  readonly container?: string | {
1036
1137
  readonly id?: string | null | undefined;
@@ -1043,5 +1144,6 @@ export declare const route: Route<{
1043
1144
  readonly user_id?: string | null | undefined;
1044
1145
  } | undefined;
1045
1146
  readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
1147
+ readonly speed?: import("../schema/options.js").OpenString<"fast" | "standard"> | undefined;
1046
1148
  }, HttpTransport.HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
1047
1149
  export * as AnthropicMessages from "./anthropic-messages.js";