@opencode/ai 2.1.4 → 2.2.1

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 (354) hide show
  1. package/README.md +339 -166
  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 +50 -14
  22. package/dist/image-client.js +0 -1
  23. package/dist/image.d.ts +6 -176
  24. package/dist/image.js +4 -11
  25. package/dist/index.d.ts +1444 -34
  26. package/dist/index.js +139 -24
  27. package/dist/llm.d.ts +16 -1
  28. package/dist/llm.js +34 -0
  29. package/dist/media-client.d.ts +3 -1
  30. package/dist/media-client.js +1 -0
  31. package/dist/media-model.d.ts +3 -0
  32. package/dist/media-model.js +4 -1
  33. package/dist/media.d.ts +0 -7
  34. package/dist/media.js +0 -6
  35. package/dist/protocols/alibaba-chat.d.ts +59 -4
  36. package/dist/protocols/alibaba-images.d.ts +22 -0
  37. package/dist/protocols/alibaba-images.js +77 -0
  38. package/dist/protocols/alibaba-messages.d.ts +52 -17
  39. package/dist/protocols/alibaba-responses.d.ts +26 -6
  40. package/dist/protocols/anthropic-messages.d.ts +160 -54
  41. package/dist/protocols/anthropic-messages.js +44 -13
  42. package/dist/protocols/bedrock-converse.d.ts +110 -15
  43. package/dist/protocols/bedrock-converse.js +112 -15
  44. package/dist/protocols/bedrock-event-stream.js +1 -0
  45. package/dist/protocols/cartesia-speech.d.ts +0 -18
  46. package/dist/protocols/cloudflare-run-decisions.d.ts +9 -0
  47. package/dist/protocols/cloudflare-run-decisions.js +36 -0
  48. package/dist/protocols/cloudflare-workers-ai-images.d.ts +23 -0
  49. package/dist/protocols/cloudflare-workers-ai-images.js +80 -0
  50. package/dist/protocols/deepgram-speech.d.ts +0 -18
  51. package/dist/protocols/elevenlabs-speech.d.ts +0 -18
  52. package/dist/protocols/gemini.d.ts +3 -0
  53. package/dist/protocols/gemini.js +11 -6
  54. package/dist/protocols/google-images.d.ts +2 -2
  55. package/dist/protocols/google-images.js +10 -37
  56. package/dist/protocols/google-interactions.d.ts +4 -0
  57. package/dist/protocols/google-interactions.js +12 -5
  58. package/dist/protocols/google-speech.d.ts +0 -18
  59. package/dist/protocols/google-speech.js +0 -1
  60. package/dist/protocols/google-transcription.d.ts +0 -18
  61. package/dist/protocols/google-transcription.js +0 -1
  62. package/dist/protocols/google-video.d.ts +1 -1
  63. package/dist/protocols/google-video.js +2 -7
  64. package/dist/protocols/index.d.ts +3 -0
  65. package/dist/protocols/index.js +3 -0
  66. package/dist/protocols/meta-images.d.ts +7 -1
  67. package/dist/protocols/meta-images.js +10 -8
  68. package/dist/protocols/meta-messages.d.ts +52 -17
  69. package/dist/protocols/meta-messages.js +14 -1
  70. package/dist/protocols/meta-responses.d.ts +46 -6
  71. package/dist/protocols/meta-responses.js +29 -1
  72. package/dist/protocols/minimax-images.d.ts +25 -0
  73. package/dist/protocols/minimax-images.js +150 -0
  74. package/dist/protocols/open-responses.d.ts +212 -27
  75. package/dist/protocols/open-responses.js +116 -54
  76. package/dist/protocols/openai-chat.d.ts +1135 -31
  77. package/dist/protocols/openai-chat.js +155 -60
  78. package/dist/protocols/openai-compatible-chat.d.ts +57 -5
  79. package/dist/protocols/openai-compatible-responses.d.ts +28 -8
  80. package/dist/protocols/openai-decisions.d.ts +22 -0
  81. package/dist/protocols/openai-decisions.js +128 -0
  82. package/dist/protocols/openai-freeform.d.ts +47 -0
  83. package/dist/protocols/openai-freeform.js +54 -0
  84. package/dist/protocols/openai-images.d.ts +36 -24
  85. package/dist/protocols/openai-images.js +137 -39
  86. package/dist/protocols/openai-responses.d.ts +202 -42
  87. package/dist/protocols/openai-responses.js +49 -10
  88. package/dist/protocols/openai-speech.d.ts +0 -18
  89. package/dist/protocols/openai-speech.js +15 -5
  90. package/dist/protocols/openai-transcription.d.ts +0 -18
  91. package/dist/protocols/openai-transcription.js +3 -4
  92. package/dist/protocols/runway-video.d.ts +1 -1
  93. package/dist/protocols/runway-video.js +1 -1
  94. package/dist/protocols/shared.d.ts +9 -1
  95. package/dist/protocols/shared.js +13 -2
  96. package/dist/protocols/system-one.d.ts +101 -0
  97. package/dist/protocols/system-one.js +230 -0
  98. package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
  99. package/dist/protocols/utils/bedrock-cache.js +7 -6
  100. package/dist/protocols/utils/cache.d.ts +14 -3
  101. package/dist/protocols/utils/cache.js +11 -4
  102. package/dist/protocols/utils/gemini-generate-content.d.ts +3 -3
  103. package/dist/protocols/utils/gemini-generate-content.js +10 -16
  104. package/dist/protocols/utils/gemini-json-schema.d.ts +5 -0
  105. package/dist/protocols/utils/gemini-json-schema.js +3 -3
  106. package/dist/protocols/utils/image-sizing.d.ts +31 -0
  107. package/dist/protocols/utils/image-sizing.js +73 -0
  108. package/dist/protocols/utils/media-input.d.ts +4 -5
  109. package/dist/protocols/utils/media-input.js +8 -5
  110. package/dist/protocols/utils/speech-stream.d.ts +0 -1
  111. package/dist/protocols/utils/speech-stream.js +0 -1
  112. package/dist/protocols/utils/tool-schema.js +15 -5
  113. package/dist/protocols/utils/tool-stream.d.ts +9 -0
  114. package/dist/protocols/venice-chat.d.ts +58 -4
  115. package/dist/protocols/venice-chat.js +2 -2
  116. package/dist/protocols/xai-images.d.ts +7 -2
  117. package/dist/protocols/xai-images.js +11 -5
  118. package/dist/protocols/xai-responses.d.ts +30 -3
  119. package/dist/protocols/xai-responses.js +30 -3
  120. package/dist/protocols/xai-video.d.ts +1 -1
  121. package/dist/protocols/xai-video.js +11 -8
  122. package/dist/protocols/zai-chat.d.ts +60 -4
  123. package/dist/protocols/zai-images.d.ts +3 -1
  124. package/dist/protocols/zai-images.js +12 -11
  125. package/dist/protocols/zai-messages.d.ts +52 -17
  126. package/dist/provider-error.js +23 -7
  127. package/dist/provider-package.d.ts +2 -0
  128. package/dist/providers/alibaba/images.d.ts +2 -0
  129. package/dist/providers/alibaba/images.js +1 -0
  130. package/dist/providers/alibaba.d.ts +137 -28
  131. package/dist/providers/alibaba.js +16 -8
  132. package/dist/providers/amazon-bedrock-mantle.d.ts +259 -145
  133. package/dist/providers/amazon-bedrock-mantle.js +1 -1
  134. package/dist/providers/amazon-bedrock.d.ts +34 -14
  135. package/dist/providers/amazon-bedrock.js +11 -11
  136. package/dist/providers/anthropic-compatible.d.ts +53 -18
  137. package/dist/providers/anthropic.d.ts +53 -18
  138. package/dist/providers/anthropic.js +1 -1
  139. package/dist/providers/azure/images.d.ts +2 -0
  140. package/dist/providers/azure/images.js +1 -0
  141. package/dist/providers/azure.d.ts +129 -24
  142. package/dist/providers/azure.js +19 -1
  143. package/dist/providers/baseten/decisions.d.ts +2 -0
  144. package/dist/providers/baseten/decisions.js +1 -0
  145. package/dist/providers/baseten.d.ts +124 -12
  146. package/dist/providers/baseten.js +41 -8
  147. package/dist/providers/cerebras.d.ts +115 -11
  148. package/dist/providers/cerebras.js +1 -1
  149. package/dist/providers/cloudflare-ai-gateway/decisions.d.ts +2 -0
  150. package/dist/providers/cloudflare-ai-gateway/decisions.js +1 -0
  151. package/dist/providers/cloudflare-ai-gateway.d.ts +290 -60
  152. package/dist/providers/cloudflare-ai-gateway.js +32 -4
  153. package/dist/providers/cloudflare-workers-ai/decisions.d.ts +2 -0
  154. package/dist/providers/cloudflare-workers-ai/decisions.js +1 -0
  155. package/dist/providers/cloudflare-workers-ai/images.d.ts +2 -0
  156. package/dist/providers/cloudflare-workers-ai/images.js +1 -0
  157. package/dist/providers/cloudflare-workers-ai.d.ts +128 -12
  158. package/dist/providers/cloudflare-workers-ai.js +45 -9
  159. package/dist/providers/cohere/chat.d.ts +1 -1
  160. package/dist/providers/cohere/chat.js +1 -1
  161. package/dist/providers/cohere.d.ts +115 -11
  162. package/dist/providers/cohere.js +1 -1
  163. package/dist/providers/deepinfra.d.ts +115 -11
  164. package/dist/providers/deepinfra.js +1 -1
  165. package/dist/providers/deepseek.d.ts +115 -11
  166. package/dist/providers/deepseek.js +1 -1
  167. package/dist/providers/digitalocean/decisions.d.ts +2 -0
  168. package/dist/providers/digitalocean/decisions.js +1 -0
  169. package/dist/providers/digitalocean/images.d.ts +2 -0
  170. package/dist/providers/digitalocean/images.js +1 -0
  171. package/dist/providers/digitalocean/responses.d.ts +4 -0
  172. package/dist/providers/digitalocean/responses.js +1 -0
  173. package/dist/providers/digitalocean.d.ts +390 -20
  174. package/dist/providers/digitalocean.js +53 -11
  175. package/dist/providers/fireworks.d.ts +115 -11
  176. package/dist/providers/fireworks.js +1 -1
  177. package/dist/providers/google/images.d.ts +2 -0
  178. package/dist/providers/google/images.js +1 -0
  179. package/dist/providers/google/interactions.d.ts +1 -1
  180. package/dist/providers/google/interactions.js +1 -1
  181. package/dist/providers/google-vertex/images.d.ts +2 -0
  182. package/dist/providers/google-vertex/images.js +1 -0
  183. package/dist/providers/google-vertex-chat.d.ts +57 -5
  184. package/dist/providers/google-vertex-chat.js +1 -1
  185. package/dist/providers/google-vertex-interactions.d.ts +1 -1
  186. package/dist/providers/google-vertex-interactions.js +1 -1
  187. package/dist/providers/google-vertex-messages.d.ts +53 -18
  188. package/dist/providers/google-vertex-messages.js +1 -1
  189. package/dist/providers/google-vertex-mistral.d.ts +1 -1
  190. package/dist/providers/google-vertex-mistral.js +1 -1
  191. package/dist/providers/google-vertex-responses.d.ts +24 -4
  192. package/dist/providers/google-vertex-responses.js +1 -1
  193. package/dist/providers/google-vertex.d.ts +4 -2
  194. package/dist/providers/google-vertex.js +30 -13
  195. package/dist/providers/google.d.ts +6 -5
  196. package/dist/providers/google.js +15 -8
  197. package/dist/providers/groq.d.ts +119 -15
  198. package/dist/providers/groq.js +1 -7
  199. package/dist/providers/index.d.ts +0 -4
  200. package/dist/providers/index.js +0 -4
  201. package/dist/providers/meta/images.d.ts +2 -0
  202. package/dist/providers/meta/images.js +1 -0
  203. package/dist/providers/meta.d.ts +254 -146
  204. package/dist/providers/meta.js +2 -1
  205. package/dist/providers/minimax/chat.d.ts +1 -1
  206. package/dist/providers/minimax/chat.js +1 -1
  207. package/dist/providers/minimax/images.d.ts +3 -0
  208. package/dist/providers/minimax/images.js +1 -0
  209. package/dist/providers/minimax/responses.d.ts +1 -1
  210. package/dist/providers/minimax/responses.js +1 -1
  211. package/dist/providers/minimax.d.ts +139 -26
  212. package/dist/providers/minimax.js +22 -9
  213. package/dist/providers/mistral.d.ts +3 -3
  214. package/dist/providers/mistral.js +1 -1
  215. package/dist/providers/moonshot/messages.d.ts +1 -1
  216. package/dist/providers/moonshot/messages.js +1 -1
  217. package/dist/providers/moonshot/responses.d.ts +1 -1
  218. package/dist/providers/moonshot/responses.js +1 -1
  219. package/dist/providers/moonshot.d.ts +132 -25
  220. package/dist/providers/moonshot.js +1 -1
  221. package/dist/providers/openai/images.d.ts +2 -0
  222. package/dist/providers/openai/images.js +1 -0
  223. package/dist/providers/openai-compatible/images.d.ts +2 -0
  224. package/dist/providers/openai-compatible/images.js +1 -0
  225. package/dist/providers/openai-compatible-responses.d.ts +24 -4
  226. package/dist/providers/openai-compatible.d.ts +62 -8
  227. package/dist/providers/openai-compatible.js +29 -10
  228. package/dist/providers/openai-options.d.ts +3 -1
  229. package/dist/providers/openai.d.ts +103 -18
  230. package/dist/providers/openai.js +23 -5
  231. package/dist/providers/opencode/decisions.d.ts +2 -0
  232. package/dist/providers/opencode/decisions.js +1 -0
  233. package/dist/providers/opencode.d.ts +11 -12
  234. package/dist/providers/opencode.js +10 -8
  235. package/dist/providers/openrouter/decisions.d.ts +2 -0
  236. package/dist/providers/openrouter/decisions.js +1 -0
  237. package/dist/providers/openrouter/images.d.ts +2 -0
  238. package/dist/providers/openrouter/images.js +1 -0
  239. package/dist/providers/openrouter/responses.d.ts +4 -0
  240. package/dist/providers/openrouter/responses.js +1 -0
  241. package/dist/providers/openrouter.d.ts +446 -35
  242. package/dist/providers/openrouter.js +78 -27
  243. package/dist/providers/togetherai.d.ts +115 -11
  244. package/dist/providers/togetherai.js +1 -1
  245. package/dist/providers/typesafe-ai/decisions.d.ts +2 -0
  246. package/dist/providers/typesafe-ai/decisions.js +1 -0
  247. package/dist/providers/typesafe-ai.d.ts +11 -12
  248. package/dist/providers/typesafe-ai.js +10 -8
  249. package/dist/providers/venice/responses.d.ts +4 -0
  250. package/dist/providers/venice/responses.js +1 -0
  251. package/dist/providers/venice.d.ts +261 -9
  252. package/dist/providers/venice.js +33 -17
  253. package/dist/providers/vercel-ai-gateway/decisions.d.ts +2 -0
  254. package/dist/providers/vercel-ai-gateway/decisions.js +1 -0
  255. package/dist/providers/vercel-ai-gateway/images.d.ts +2 -0
  256. package/dist/providers/vercel-ai-gateway/images.js +1 -0
  257. package/dist/providers/vercel-ai-gateway.d.ts +16 -22
  258. package/dist/providers/vercel-ai-gateway.js +41 -85
  259. package/dist/providers/xai/images.d.ts +2 -0
  260. package/dist/providers/xai/images.js +1 -0
  261. package/dist/providers/xai.d.ts +66 -12
  262. package/dist/providers/xai.js +15 -8
  263. package/dist/providers/zai/images.d.ts +2 -0
  264. package/dist/providers/zai/images.js +1 -0
  265. package/dist/providers/zai-coding-plan/messages.d.ts +1 -1
  266. package/dist/providers/zai-coding-plan/messages.js +1 -1
  267. package/dist/providers/zai-coding-plan/responses.d.ts +1 -1
  268. package/dist/providers/zai-coding-plan/responses.js +1 -1
  269. package/dist/providers/zai-coding-plan.d.ts +132 -25
  270. package/dist/providers/zai-coding-plan.js +1 -1
  271. package/dist/providers/zai.d.ts +62 -9
  272. package/dist/providers/zai.js +15 -8
  273. package/dist/route/auth.d.ts +1 -1
  274. package/dist/route/client.d.ts +2 -2
  275. package/dist/route/client.js +26 -4
  276. package/dist/route/decision.d.ts +58 -0
  277. package/dist/route/decision.js +75 -0
  278. package/dist/route/executor.d.ts +1 -1
  279. package/dist/route/framing.d.ts +2 -0
  280. package/dist/route/index.d.ts +3 -0
  281. package/dist/route/index.js +3 -0
  282. package/dist/route/media-protocol.d.ts +3 -4
  283. package/dist/route/media-protocol.js +12 -8
  284. package/dist/route/media.d.ts +6 -2
  285. package/dist/route/media.js +8 -6
  286. package/dist/route/transport/http.js +1 -0
  287. package/dist/route/transport/index.d.ts +1 -0
  288. package/dist/schema/events.d.ts +148 -6
  289. package/dist/schema/events.js +20 -0
  290. package/dist/schema/messages.d.ts +41 -3
  291. package/dist/schema/messages.js +23 -0
  292. package/dist/schema/options.d.ts +5 -3
  293. package/dist/schema/options.js +8 -3
  294. package/dist/speech-client.d.ts +53 -14
  295. package/dist/speech-client.js +0 -1
  296. package/dist/speech.d.ts +0 -135
  297. package/dist/speech.js +2 -4
  298. package/dist/testing/decision.d.ts +16 -0
  299. package/dist/testing/decision.js +20 -0
  300. package/dist/testing/image.d.ts +14 -0
  301. package/dist/testing/image.js +12 -0
  302. package/dist/testing/media.d.ts +18 -0
  303. package/dist/testing/media.js +36 -0
  304. package/dist/testing/script.d.ts +28 -0
  305. package/dist/testing/script.js +60 -0
  306. package/dist/testing/speech.d.ts +14 -0
  307. package/dist/testing/speech.js +12 -0
  308. package/dist/testing/transcription.d.ts +14 -0
  309. package/dist/testing/transcription.js +12 -0
  310. package/dist/testing/video.d.ts +14 -0
  311. package/dist/testing/video.js +12 -0
  312. package/dist/testing.d.ts +35 -45
  313. package/dist/testing.js +14 -75
  314. package/dist/tool.d.ts +12 -1
  315. package/dist/tool.js +10 -2
  316. package/dist/transcription-client.d.ts +69 -14
  317. package/dist/transcription.d.ts +0 -135
  318. package/dist/transcription.js +1 -1
  319. package/dist/utils/media-type.js +22 -1
  320. package/dist/video-client.d.ts +46 -14
  321. package/dist/video-client.js +0 -1
  322. package/dist/video.d.ts +1 -136
  323. package/dist/video.js +3 -5
  324. package/package.json +497 -11
  325. package/dist/experimental/evaluation-client.d.ts +0 -21
  326. package/dist/experimental/evaluation-client.js +0 -64
  327. package/dist/experimental/evaluation.d.ts +0 -242
  328. package/dist/experimental/evaluation.js +0 -108
  329. package/dist/experimental/system-one.d.ts +0 -16
  330. package/dist/experimental/system-one.js +0 -135
  331. package/dist/promise.d.ts +0 -1021
  332. package/dist/promise.js +0 -101
  333. package/dist/protocols/bfl-images.d.ts +0 -38
  334. package/dist/protocols/bfl-images.js +0 -153
  335. package/dist/protocols/fal-images.d.ts +0 -25
  336. package/dist/protocols/fal-images.js +0 -104
  337. package/dist/protocols/fal-video.d.ts +0 -29
  338. package/dist/protocols/fal-video.js +0 -73
  339. package/dist/protocols/replicate-images.d.ts +0 -28
  340. package/dist/protocols/replicate-images.js +0 -127
  341. package/dist/protocols/stability-images.d.ts +0 -39
  342. package/dist/protocols/stability-images.js +0 -136
  343. package/dist/protocols/utils/fal-queue.d.ts +0 -26
  344. package/dist/protocols/utils/fal-queue.js +0 -67
  345. package/dist/provider.d.ts +0 -23
  346. package/dist/provider.js +0 -2
  347. package/dist/providers/black-forest-labs.d.ts +0 -21
  348. package/dist/providers/black-forest-labs.js +0 -23
  349. package/dist/providers/fal.d.ts +0 -24
  350. package/dist/providers/fal.js +0 -26
  351. package/dist/providers/replicate.d.ts +0 -21
  352. package/dist/providers/replicate.js +0 -17
  353. package/dist/providers/stability.d.ts +0 -23
  354. package/dist/providers/stability.js +0 -18
@@ -2,9 +2,10 @@ import { Schema } from "effect";
2
2
  import { Route, type RouteDefaultsInput } from "../route/client.js";
3
3
  import { Protocol } from "../route/protocol.js";
4
4
  import { type ProviderAuthOption } from "../route/auth-options.js";
5
- import { type ModelID, type OpenString } from "../schema/index.js";
5
+ import { type ModelID, type OpenString, type ProviderOptions } from "../schema/index.js";
6
6
  import type { ProviderPackage } from "../provider-package.js";
7
7
  import { OpenAIChat } from "../protocols/openai-chat.js";
8
+ import type { OpenResponsesProviderOptionsInput } from "./open-responses-options.js";
8
9
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
9
10
  export interface OpenRouterProviderRouting {
10
11
  readonly [key: string]: unknown;
@@ -72,18 +73,18 @@ export interface OpenRouterOptions {
72
73
  }>;
73
74
  }
74
75
  export type OpenRouterProviderOptionsInput = OpenRouterOptions;
75
- export interface OpenRouterEvaluationOptions {
76
+ export interface OpenRouterDecisionOptions {
76
77
  readonly [key: string]: unknown;
77
78
  readonly provider?: OpenRouterProviderRouting;
78
79
  readonly session_id?: string;
79
80
  readonly trace?: Readonly<Record<string, unknown>>;
80
81
  readonly user?: string;
81
82
  }
82
- export type LanguageModelOptions = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
83
+ export type Config = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
83
84
  readonly baseURL?: string;
84
- readonly providerOptions?: OpenRouterProviderOptionsInput;
85
+ readonly providerOptions?: OpenRouterProviderOptionsInput | OpenResponsesProviderOptionsInput;
85
86
  };
86
- export type Settings = ProviderPackage.Settings & OpenRouterProviderOptionsInput & {
87
+ export type Settings<Options = OpenRouterProviderOptionsInput> = ProviderPackage.Settings & Options & {
87
88
  readonly apiKey?: string;
88
89
  readonly baseURL?: string;
89
90
  };
@@ -103,6 +104,11 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
103
104
  readonly image_url: Schema.Struct<{
104
105
  readonly url: Schema.String;
105
106
  }>;
107
+ }>, Schema.Struct<{
108
+ readonly type: Schema.Literal<"video_url">;
109
+ readonly video_url: Schema.Struct<{
110
+ readonly url: Schema.String;
111
+ }>;
106
112
  }>, Schema.Struct<{
107
113
  readonly type: Schema.Literal<"file">;
108
114
  readonly file: Schema.Struct<{
@@ -124,6 +130,11 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
124
130
  readonly image_url: Schema.Struct<{
125
131
  readonly url: Schema.String;
126
132
  }>;
133
+ }>, Schema.Struct<{
134
+ readonly type: Schema.Literal<"video_url">;
135
+ readonly video_url: Schema.Struct<{
136
+ readonly url: Schema.String;
137
+ }>;
127
138
  }>, Schema.Struct<{
128
139
  readonly type: Schema.Literal<"file">;
129
140
  readonly file: Schema.Struct<{
@@ -141,7 +152,7 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
141
152
  readonly ttl: Schema.optional<Schema.String>;
142
153
  }>>;
143
154
  }>>]>>;
144
- readonly tool_calls: Schema.optional<Schema.$Array<Schema.Struct<{
155
+ readonly tool_calls: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
145
156
  readonly id: Schema.String;
146
157
  readonly type: Schema.tag<"function">;
147
158
  readonly function: Schema.Struct<{
@@ -153,7 +164,14 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
153
164
  readonly thought_signature: Schema.String;
154
165
  }>;
155
166
  }>>;
156
- }>>>;
167
+ }>, Schema.Struct<{
168
+ readonly id: Schema.String;
169
+ readonly type: Schema.tag<"custom">;
170
+ readonly custom: Schema.Struct<{
171
+ readonly name: Schema.String;
172
+ readonly input: Schema.String;
173
+ }>;
174
+ }>]>>>;
157
175
  readonly reasoning_content: Schema.optional<Schema.String>;
158
176
  readonly reasoning: Schema.optional<Schema.String>;
159
177
  readonly reasoning_text: Schema.optional<Schema.String>;
@@ -170,7 +188,7 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
170
188
  }>>;
171
189
  }>>]>;
172
190
  }>]>>;
173
- readonly tools: Schema.optional<Schema.$Array<Schema.Struct<{
191
+ readonly tools: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
174
192
  readonly type: Schema.tag<"function">;
175
193
  readonly function: Schema.Struct<{
176
194
  readonly name: Schema.String;
@@ -182,12 +200,36 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
182
200
  readonly type: Schema.Literal<"ephemeral">;
183
201
  readonly ttl: Schema.optional<Schema.String>;
184
202
  }>>;
185
- }>>>;
203
+ }>, Schema.Struct<{
204
+ readonly type: Schema.tag<"custom">;
205
+ readonly custom: Schema.Struct<{
206
+ readonly name: Schema.String;
207
+ readonly description: Schema.String;
208
+ readonly format: Schema.Union<readonly [Schema.Struct<{
209
+ readonly type: Schema.tag<"text">;
210
+ }>, Schema.Struct<{
211
+ readonly type: Schema.tag<"grammar">;
212
+ readonly grammar: Schema.Struct<{
213
+ readonly syntax: Schema.Literals<readonly ["lark", "regex"]>;
214
+ readonly definition: Schema.String;
215
+ }>;
216
+ }>]>;
217
+ }>;
218
+ readonly cache_control: Schema.optional<Schema.Struct<{
219
+ readonly type: Schema.Literal<"ephemeral">;
220
+ readonly ttl: Schema.optional<Schema.String>;
221
+ }>>;
222
+ }>]>>>;
186
223
  readonly tool_choice: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
187
224
  readonly type: Schema.tag<"function">;
188
225
  readonly function: Schema.Struct<{
189
226
  readonly name: Schema.String;
190
227
  }>;
228
+ }>, Schema.Struct<{
229
+ readonly type: Schema.tag<"custom">;
230
+ readonly custom: Schema.Struct<{
231
+ readonly name: Schema.String;
232
+ }>;
191
233
  }>]>>;
192
234
  readonly stream: Schema.Literal<true>;
193
235
  readonly stream_options: Schema.optional<Schema.Struct<{
@@ -195,7 +237,16 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
195
237
  }>>;
196
238
  readonly store: Schema.optional<Schema.Boolean>;
197
239
  readonly prompt_cache_key: Schema.optional<Schema.String>;
240
+ readonly prompt_cache_retention: Schema.optional<Schema.String>;
241
+ readonly prompt_cache_options: Schema.optional<Schema.Struct<{
242
+ readonly ttl: Schema.optional<Schema.String>;
243
+ }>>;
198
244
  readonly reasoning_effort: Schema.optional<Schema.declare<import("../schema/options.js").ReasoningEffort, import("../schema/options.js").ReasoningEffort>>;
245
+ readonly verbosity: Schema.optional<Schema.declare<OpenString<"high" | "low" | "medium">, OpenString<"high" | "low" | "medium">>>;
246
+ readonly service_tier: Schema.optional<Schema.declare<OpenString<"auto" | "default" | "flex" | "priority">, OpenString<"auto" | "default" | "flex" | "priority">>>;
247
+ readonly parallel_tool_calls: Schema.optional<Schema.Boolean>;
248
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
249
+ readonly safety_identifier: Schema.optional<Schema.String>;
199
250
  readonly tool_stream: Schema.optional<Schema.Boolean>;
200
251
  readonly max_completion_tokens: Schema.optional<Schema.Number>;
201
252
  readonly max_tokens: Schema.optional<Schema.Number>;
@@ -224,6 +275,11 @@ export declare const protocol: Protocol<{
224
275
  readonly image_url: {
225
276
  readonly url: string;
226
277
  };
278
+ } | {
279
+ readonly type: "video_url";
280
+ readonly video_url: {
281
+ readonly url: string;
282
+ };
227
283
  } | {
228
284
  readonly type: "file";
229
285
  readonly file: {
@@ -245,6 +301,11 @@ export declare const protocol: Protocol<{
245
301
  readonly image_url: {
246
302
  readonly url: string;
247
303
  };
304
+ } | {
305
+ readonly type: "video_url";
306
+ readonly video_url: {
307
+ readonly url: string;
308
+ };
248
309
  } | {
249
310
  readonly type: "file";
250
311
  readonly file: {
@@ -281,7 +342,14 @@ export declare const protocol: Protocol<{
281
342
  readonly ttl?: string | undefined;
282
343
  } | undefined;
283
344
  }[] | null;
284
- readonly tool_calls?: readonly {
345
+ readonly tool_calls?: readonly ({
346
+ readonly id: string;
347
+ readonly type: "custom";
348
+ readonly custom: {
349
+ readonly name: string;
350
+ readonly input: string;
351
+ };
352
+ } | {
285
353
  readonly id: string;
286
354
  readonly type: "function";
287
355
  readonly function: {
@@ -293,13 +361,13 @@ export declare const protocol: Protocol<{
293
361
  readonly thought_signature: string;
294
362
  };
295
363
  } | undefined;
296
- }[] | undefined;
364
+ })[] | undefined;
297
365
  readonly reasoning_content?: string | undefined;
298
366
  readonly reasoning?: string | undefined;
299
367
  readonly reasoning_text?: string | undefined;
300
368
  readonly reasoning_details?: unknown;
301
369
  })[];
302
- tools?: readonly {
370
+ tools?: readonly ({
303
371
  readonly type: "function";
304
372
  readonly function: {
305
373
  readonly name: string;
@@ -313,12 +381,36 @@ export declare const protocol: Protocol<{
313
381
  readonly type: "ephemeral";
314
382
  readonly ttl?: string | undefined;
315
383
  } | undefined;
316
- }[] | undefined;
384
+ } | {
385
+ readonly type: "custom";
386
+ readonly custom: {
387
+ readonly name: string;
388
+ readonly description: string;
389
+ readonly format: {
390
+ readonly type: "text";
391
+ } | {
392
+ readonly type: "grammar";
393
+ readonly grammar: {
394
+ readonly syntax: "lark" | "regex";
395
+ readonly definition: string;
396
+ };
397
+ };
398
+ };
399
+ readonly cache_control?: {
400
+ readonly type: "ephemeral";
401
+ readonly ttl?: string | undefined;
402
+ } | undefined;
403
+ })[] | undefined;
317
404
  tool_choice?: "auto" | "none" | "required" | {
318
405
  readonly type: "function";
319
406
  readonly function: {
320
407
  readonly name: string;
321
408
  };
409
+ } | {
410
+ readonly type: "custom";
411
+ readonly custom: {
412
+ readonly name: string;
413
+ };
322
414
  } | undefined;
323
415
  stream: true;
324
416
  stream_options?: {
@@ -326,7 +418,18 @@ export declare const protocol: Protocol<{
326
418
  } | undefined;
327
419
  store?: boolean | undefined;
328
420
  prompt_cache_key?: string | undefined;
421
+ prompt_cache_retention?: string | undefined;
422
+ prompt_cache_options?: {
423
+ readonly ttl?: string | undefined;
424
+ } | undefined;
329
425
  reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
426
+ verbosity?: OpenString<"high" | "low" | "medium"> | undefined;
427
+ service_tier?: OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
428
+ parallel_tool_calls?: boolean | undefined;
429
+ metadata?: {
430
+ readonly [x: string]: string;
431
+ } | undefined;
432
+ safety_identifier?: string | undefined;
330
433
  tool_stream?: boolean | undefined;
331
434
  max_completion_tokens?: number | undefined;
332
435
  max_tokens?: number | undefined;
@@ -373,6 +476,10 @@ export declare const protocol: Protocol<{
373
476
  readonly name?: string | null | undefined;
374
477
  readonly arguments?: string | null | undefined;
375
478
  } | null | undefined;
479
+ readonly custom?: {
480
+ readonly name?: string | null | undefined;
481
+ readonly input?: string | null | undefined;
482
+ } | null | undefined;
376
483
  readonly extra_content?: unknown;
377
484
  }[] | null | undefined;
378
485
  } | null | undefined;
@@ -436,6 +543,11 @@ export declare const route: Route<{
436
543
  readonly image_url: {
437
544
  readonly url: string;
438
545
  };
546
+ } | {
547
+ readonly type: "video_url";
548
+ readonly video_url: {
549
+ readonly url: string;
550
+ };
439
551
  } | {
440
552
  readonly type: "file";
441
553
  readonly file: {
@@ -457,6 +569,11 @@ export declare const route: Route<{
457
569
  readonly image_url: {
458
570
  readonly url: string;
459
571
  };
572
+ } | {
573
+ readonly type: "video_url";
574
+ readonly video_url: {
575
+ readonly url: string;
576
+ };
460
577
  } | {
461
578
  readonly type: "file";
462
579
  readonly file: {
@@ -493,7 +610,14 @@ export declare const route: Route<{
493
610
  readonly ttl?: string | undefined;
494
611
  } | undefined;
495
612
  }[] | null;
496
- readonly tool_calls?: readonly {
613
+ readonly tool_calls?: readonly ({
614
+ readonly id: string;
615
+ readonly type: "custom";
616
+ readonly custom: {
617
+ readonly name: string;
618
+ readonly input: string;
619
+ };
620
+ } | {
497
621
  readonly id: string;
498
622
  readonly type: "function";
499
623
  readonly function: {
@@ -505,13 +629,13 @@ export declare const route: Route<{
505
629
  readonly thought_signature: string;
506
630
  };
507
631
  } | undefined;
508
- }[] | undefined;
632
+ })[] | undefined;
509
633
  readonly reasoning_content?: string | undefined;
510
634
  readonly reasoning?: string | undefined;
511
635
  readonly reasoning_text?: string | undefined;
512
636
  readonly reasoning_details?: unknown;
513
637
  })[];
514
- tools?: readonly {
638
+ tools?: readonly ({
515
639
  readonly type: "function";
516
640
  readonly function: {
517
641
  readonly name: string;
@@ -525,12 +649,36 @@ export declare const route: Route<{
525
649
  readonly type: "ephemeral";
526
650
  readonly ttl?: string | undefined;
527
651
  } | undefined;
528
- }[] | undefined;
652
+ } | {
653
+ readonly type: "custom";
654
+ readonly custom: {
655
+ readonly name: string;
656
+ readonly description: string;
657
+ readonly format: {
658
+ readonly type: "text";
659
+ } | {
660
+ readonly type: "grammar";
661
+ readonly grammar: {
662
+ readonly syntax: "lark" | "regex";
663
+ readonly definition: string;
664
+ };
665
+ };
666
+ };
667
+ readonly cache_control?: {
668
+ readonly type: "ephemeral";
669
+ readonly ttl?: string | undefined;
670
+ } | undefined;
671
+ })[] | undefined;
529
672
  tool_choice?: "auto" | "none" | "required" | {
530
673
  readonly type: "function";
531
674
  readonly function: {
532
675
  readonly name: string;
533
676
  };
677
+ } | {
678
+ readonly type: "custom";
679
+ readonly custom: {
680
+ readonly name: string;
681
+ };
534
682
  } | undefined;
535
683
  stream: true;
536
684
  stream_options?: {
@@ -538,7 +686,18 @@ export declare const route: Route<{
538
686
  } | undefined;
539
687
  store?: boolean | undefined;
540
688
  prompt_cache_key?: string | undefined;
689
+ prompt_cache_retention?: string | undefined;
690
+ prompt_cache_options?: {
691
+ readonly ttl?: string | undefined;
692
+ } | undefined;
541
693
  reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
694
+ verbosity?: OpenString<"high" | "low" | "medium"> | undefined;
695
+ service_tier?: OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
696
+ parallel_tool_calls?: boolean | undefined;
697
+ metadata?: {
698
+ readonly [x: string]: string;
699
+ } | undefined;
700
+ safety_identifier?: string | undefined;
542
701
  tool_stream?: boolean | undefined;
543
702
  max_completion_tokens?: number | undefined;
544
703
  max_tokens?: number | undefined;
@@ -567,7 +726,204 @@ export declare const route: Route<{
567
726
  user?: string | undefined;
568
727
  reasoning?: Record<string, unknown> | undefined;
569
728
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
570
- export declare const routes: Route<{
729
+ export declare const routes: (Route<{
730
+ readonly model: string;
731
+ readonly input: readonly ({
732
+ readonly type: "configuration_update";
733
+ readonly reasoning: {
734
+ readonly effort: import("../schema/options.js").ReasoningEffort;
735
+ };
736
+ } | {
737
+ readonly type: "message";
738
+ readonly role: "system";
739
+ readonly content: string;
740
+ } | {
741
+ readonly type: "message";
742
+ readonly role: "developer";
743
+ readonly content: string;
744
+ } | {
745
+ readonly type: "custom_tool_call_output" | "function_call_output";
746
+ readonly call_id: string;
747
+ readonly output: string | readonly ({
748
+ readonly type: "input_text";
749
+ readonly text: string;
750
+ } | {
751
+ readonly type: "input_video";
752
+ readonly video_url: string;
753
+ } | {
754
+ readonly type: "input_image";
755
+ readonly image_url: string;
756
+ readonly detail?: string | undefined;
757
+ } | {
758
+ readonly type: "input_file";
759
+ readonly filename: string;
760
+ readonly detail?: string | undefined;
761
+ readonly file_data?: string | undefined;
762
+ readonly file_url?: string | undefined;
763
+ })[];
764
+ } | {
765
+ readonly type: "reasoning";
766
+ readonly id?: string | undefined;
767
+ readonly summary: readonly {
768
+ readonly type: "summary_text";
769
+ readonly text: string;
770
+ }[];
771
+ readonly encrypted_content?: string | null | undefined;
772
+ } | {
773
+ readonly type: "compaction";
774
+ readonly id?: string | null | undefined;
775
+ readonly encrypted_content: string;
776
+ } | {
777
+ readonly type: "message";
778
+ readonly role: "user";
779
+ readonly content: readonly ({
780
+ readonly type: "input_text";
781
+ readonly text: string;
782
+ } | {
783
+ readonly type: "input_video";
784
+ readonly video_url: string;
785
+ } | {
786
+ readonly type: "input_image";
787
+ readonly image_url: string;
788
+ readonly detail?: string | undefined;
789
+ } | {
790
+ readonly type: "input_file";
791
+ readonly filename: string;
792
+ readonly detail?: string | undefined;
793
+ readonly file_data?: string | undefined;
794
+ readonly file_url?: string | undefined;
795
+ })[];
796
+ readonly id?: string | undefined;
797
+ readonly status?: string | undefined;
798
+ } | {
799
+ readonly type: "message";
800
+ readonly id?: string | undefined;
801
+ readonly role: "assistant";
802
+ readonly content: readonly {
803
+ readonly type: "output_text";
804
+ readonly text: string;
805
+ }[];
806
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
807
+ readonly status?: string | undefined;
808
+ } | {
809
+ readonly type: "function_call";
810
+ readonly id?: string | undefined;
811
+ readonly call_id: string;
812
+ readonly name: string;
813
+ readonly namespace?: string | undefined;
814
+ readonly arguments: string;
815
+ } | {
816
+ readonly type: "custom_tool_call";
817
+ readonly id?: string | undefined;
818
+ readonly call_id: string;
819
+ readonly name: string;
820
+ readonly input: string;
821
+ } | {
822
+ readonly [x: string]: unknown;
823
+ readonly type: "web_search_call";
824
+ readonly id: string;
825
+ readonly status?: string | undefined;
826
+ readonly action?: {
827
+ readonly [x: string]: unknown;
828
+ } | null | undefined;
829
+ } | {
830
+ readonly [x: string]: unknown;
831
+ readonly type: "file_search_call";
832
+ readonly id: string;
833
+ readonly status?: string | undefined;
834
+ readonly queries?: readonly string[] | undefined;
835
+ readonly results?: readonly {
836
+ readonly [x: string]: unknown;
837
+ }[] | null | undefined;
838
+ } | {
839
+ readonly [x: string]: unknown;
840
+ readonly type: "code_interpreter_call";
841
+ readonly id: string;
842
+ readonly status?: string | undefined;
843
+ readonly code?: string | null | undefined;
844
+ readonly container_id?: string | null | undefined;
845
+ readonly outputs?: readonly {
846
+ readonly [x: string]: unknown;
847
+ }[] | null | undefined;
848
+ } | {
849
+ readonly [x: string]: unknown;
850
+ readonly type: "mcp_call";
851
+ readonly id: string;
852
+ readonly status?: string | undefined;
853
+ readonly server_label?: string | undefined;
854
+ readonly name?: string | undefined;
855
+ readonly arguments?: string | undefined;
856
+ readonly output?: string | null | undefined;
857
+ readonly error?: unknown;
858
+ } | {
859
+ readonly [x: string]: unknown;
860
+ readonly type: string;
861
+ readonly id: string;
862
+ })[];
863
+ readonly instructions?: string | undefined;
864
+ readonly tools?: readonly ({
865
+ readonly type: "custom";
866
+ readonly name: string;
867
+ readonly description: string;
868
+ readonly format: {
869
+ readonly type: "text";
870
+ } | {
871
+ readonly type: "grammar";
872
+ readonly syntax: "lark" | "regex";
873
+ readonly definition: string;
874
+ };
875
+ } | {
876
+ readonly type: "function";
877
+ readonly name: string;
878
+ readonly description: string;
879
+ readonly parameters: {
880
+ readonly [x: string]: unknown;
881
+ };
882
+ readonly strict?: boolean | undefined;
883
+ } | {
884
+ readonly [x: string]: unknown;
885
+ readonly type: string;
886
+ })[] | undefined;
887
+ readonly tool_choice?: "auto" | "none" | "required" | {
888
+ readonly type: "custom" | "function";
889
+ readonly name: string;
890
+ } | {
891
+ readonly type: "allowed_tools";
892
+ readonly mode: "auto" | "none" | "required";
893
+ readonly tools: readonly {
894
+ readonly type: "custom" | "function";
895
+ readonly name: string;
896
+ }[];
897
+ } | undefined;
898
+ readonly store?: boolean | undefined;
899
+ readonly metadata?: {
900
+ readonly [x: string]: string;
901
+ } | undefined;
902
+ readonly safety_identifier?: string | undefined;
903
+ readonly stream_options?: {
904
+ readonly include_obfuscation?: boolean | undefined;
905
+ } | undefined;
906
+ readonly top_logprobs?: number | undefined;
907
+ readonly truncation?: "auto" | "disabled" | undefined;
908
+ readonly service_tier?: OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
909
+ readonly prompt_cache_key?: string | undefined;
910
+ readonly include?: readonly OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
911
+ readonly reasoning?: {
912
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
913
+ readonly summary?: "auto" | "concise" | "detailed" | undefined;
914
+ } | undefined;
915
+ readonly text?: {
916
+ readonly verbosity?: OpenString<"high" | "low" | "medium"> | undefined;
917
+ } | undefined;
918
+ readonly max_output_tokens?: number | undefined;
919
+ readonly max_tool_calls?: number | undefined;
920
+ readonly parallel_tool_calls?: boolean | undefined;
921
+ readonly temperature?: number | undefined;
922
+ readonly top_p?: number | undefined;
923
+ readonly presence_penalty?: number | undefined;
924
+ readonly frequency_penalty?: number | undefined;
925
+ readonly stream: true;
926
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
571
927
  model: string;
572
928
  messages: readonly ({
573
929
  readonly role: "system";
@@ -576,6 +932,11 @@ export declare const routes: Route<{
576
932
  readonly image_url: {
577
933
  readonly url: string;
578
934
  };
935
+ } | {
936
+ readonly type: "video_url";
937
+ readonly video_url: {
938
+ readonly url: string;
939
+ };
579
940
  } | {
580
941
  readonly type: "file";
581
942
  readonly file: {
@@ -597,6 +958,11 @@ export declare const routes: Route<{
597
958
  readonly image_url: {
598
959
  readonly url: string;
599
960
  };
961
+ } | {
962
+ readonly type: "video_url";
963
+ readonly video_url: {
964
+ readonly url: string;
965
+ };
600
966
  } | {
601
967
  readonly type: "file";
602
968
  readonly file: {
@@ -633,7 +999,14 @@ export declare const routes: Route<{
633
999
  readonly ttl?: string | undefined;
634
1000
  } | undefined;
635
1001
  }[] | null;
636
- readonly tool_calls?: readonly {
1002
+ readonly tool_calls?: readonly ({
1003
+ readonly id: string;
1004
+ readonly type: "custom";
1005
+ readonly custom: {
1006
+ readonly name: string;
1007
+ readonly input: string;
1008
+ };
1009
+ } | {
637
1010
  readonly id: string;
638
1011
  readonly type: "function";
639
1012
  readonly function: {
@@ -645,13 +1018,13 @@ export declare const routes: Route<{
645
1018
  readonly thought_signature: string;
646
1019
  };
647
1020
  } | undefined;
648
- }[] | undefined;
1021
+ })[] | undefined;
649
1022
  readonly reasoning_content?: string | undefined;
650
1023
  readonly reasoning?: string | undefined;
651
1024
  readonly reasoning_text?: string | undefined;
652
1025
  readonly reasoning_details?: unknown;
653
1026
  })[];
654
- tools?: readonly {
1027
+ tools?: readonly ({
655
1028
  readonly type: "function";
656
1029
  readonly function: {
657
1030
  readonly name: string;
@@ -665,12 +1038,36 @@ export declare const routes: Route<{
665
1038
  readonly type: "ephemeral";
666
1039
  readonly ttl?: string | undefined;
667
1040
  } | undefined;
668
- }[] | undefined;
1041
+ } | {
1042
+ readonly type: "custom";
1043
+ readonly custom: {
1044
+ readonly name: string;
1045
+ readonly description: string;
1046
+ readonly format: {
1047
+ readonly type: "text";
1048
+ } | {
1049
+ readonly type: "grammar";
1050
+ readonly grammar: {
1051
+ readonly syntax: "lark" | "regex";
1052
+ readonly definition: string;
1053
+ };
1054
+ };
1055
+ };
1056
+ readonly cache_control?: {
1057
+ readonly type: "ephemeral";
1058
+ readonly ttl?: string | undefined;
1059
+ } | undefined;
1060
+ })[] | undefined;
669
1061
  tool_choice?: "auto" | "none" | "required" | {
670
1062
  readonly type: "function";
671
1063
  readonly function: {
672
1064
  readonly name: string;
673
1065
  };
1066
+ } | {
1067
+ readonly type: "custom";
1068
+ readonly custom: {
1069
+ readonly name: string;
1070
+ };
674
1071
  } | undefined;
675
1072
  stream: true;
676
1073
  stream_options?: {
@@ -678,7 +1075,18 @@ export declare const routes: Route<{
678
1075
  } | undefined;
679
1076
  store?: boolean | undefined;
680
1077
  prompt_cache_key?: string | undefined;
1078
+ prompt_cache_retention?: string | undefined;
1079
+ prompt_cache_options?: {
1080
+ readonly ttl?: string | undefined;
1081
+ } | undefined;
681
1082
  reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
1083
+ verbosity?: OpenString<"high" | "low" | "medium"> | undefined;
1084
+ service_tier?: OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
1085
+ parallel_tool_calls?: boolean | undefined;
1086
+ metadata?: {
1087
+ readonly [x: string]: string;
1088
+ } | undefined;
1089
+ safety_identifier?: string | undefined;
682
1090
  tool_stream?: boolean | undefined;
683
1091
  max_completion_tokens?: number | undefined;
684
1092
  max_tokens?: number | undefined;
@@ -706,25 +1114,28 @@ export declare const routes: Route<{
706
1114
  } | undefined;
707
1115
  user?: string | undefined;
708
1116
  reasoning?: Record<string, unknown> | undefined;
709
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
710
- export declare const configure: (input?: LanguageModelOptions) => {
1117
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
1118
+ export declare const configure: (input?: Config) => {
711
1119
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
712
1120
  model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterOptions, import("../route/client.js").CompactionOperations | undefined>;
713
- experimental: {
714
- evaluation: (modelID: string | ModelID) => import("../experimental.js").EvaluationModel<OpenRouterEvaluationOptions>;
715
- };
1121
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
1122
+ image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
1123
+ decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<OpenRouterDecisionOptions>;
716
1124
  configure: typeof configure;
717
1125
  };
718
1126
  export declare const provider: {
719
1127
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
720
1128
  model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterOptions, import("../route/client.js").CompactionOperations | undefined>;
721
- experimental: {
722
- evaluation: (modelID: string | ModelID) => import("../experimental.js").EvaluationModel<OpenRouterEvaluationOptions>;
723
- };
1129
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
1130
+ image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
1131
+ decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<OpenRouterDecisionOptions>;
724
1132
  configure: typeof configure;
725
1133
  };
726
- export declare const experimental: {
727
- evaluation: (modelID: string | ModelID) => import("../experimental.js").EvaluationModel<OpenRouterEvaluationOptions>;
728
- };
729
- export declare const model: ProviderPackage.Definition<Settings, OpenRouterProviderOptionsInput>["model"];
730
- export {};
1134
+ export declare const decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<OpenRouterDecisionOptions>;
1135
+ export declare const image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
1136
+ export declare const responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
1137
+ export declare const model: ProviderPackage.Model<Settings, OpenRouterProviderOptionsInput>;
1138
+ export declare const responsesModel: ProviderPackage.Model<Settings<OpenResponsesProviderOptionsInput>, OpenResponsesProviderOptionsInput>;
1139
+ export declare const imageModel: (modelID: string, settings?: Settings) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
1140
+ export declare const decisionModel: (modelID: string, settings?: Settings) => import("../decision.js").DecisionModel<OpenRouterDecisionOptions>;
1141
+ export * as OpenRouter from "./openrouter.js";