@arcships/aimux 0.3.0 → 0.6.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 (295) hide show
  1. package/README.md +92 -0
  2. package/dist/error.d.ts +28 -69
  3. package/dist/error.js +72 -160
  4. package/dist/generated/ops.d.ts +75 -0
  5. package/dist/generated/ops.js +80 -0
  6. package/dist/generated/types.d.ts +5607 -0
  7. package/dist/{types/CallOptions.js → generated/types.js} +1 -0
  8. package/dist/index.d.ts +144 -184
  9. package/dist/index.js +314 -295
  10. package/dist/native.d.ts +30 -0
  11. package/dist/native.js +116 -0
  12. package/dist/types.d.ts +1 -139
  13. package/dist/types.js +0 -3
  14. package/index.d.ts +21 -469
  15. package/index.js +57 -107
  16. package/package.json +20 -17
  17. package/dist/types/AiMuxError.d.ts +0 -48
  18. package/dist/types/AiMuxError.js +0 -2
  19. package/dist/types/ApiCallError.d.ts +0 -65
  20. package/dist/types/ApiCallError.js +0 -3
  21. package/dist/types/AspectRatio.d.ts +0 -11
  22. package/dist/types/AspectRatio.js +0 -3
  23. package/dist/types/AudioChunk.d.ts +0 -8
  24. package/dist/types/AudioChunk.js +0 -3
  25. package/dist/types/AudioData.d.ts +0 -11
  26. package/dist/types/AudioData.js +0 -3
  27. package/dist/types/AudioInput.d.ts +0 -8
  28. package/dist/types/AudioInput.js +0 -3
  29. package/dist/types/BreakKind.d.ts +0 -1
  30. package/dist/types/BreakKind.js +0 -3
  31. package/dist/types/CallOptions.d.ts +0 -117
  32. package/dist/types/CatalogueSource.d.ts +0 -4
  33. package/dist/types/CatalogueSource.js +0 -3
  34. package/dist/types/ChatCompletion.d.ts +0 -16
  35. package/dist/types/ChatCompletion.js +0 -2
  36. package/dist/types/ChatCompletionChoice.d.ts +0 -8
  37. package/dist/types/ChatCompletionChoice.js +0 -2
  38. package/dist/types/ChatCompletionChunk.d.ts +0 -15
  39. package/dist/types/ChatCompletionChunk.js +0 -2
  40. package/dist/types/ChatCompletionChunkChoice.d.ts +0 -8
  41. package/dist/types/ChatCompletionChunkChoice.js +0 -2
  42. package/dist/types/ChatCompletionChunkFunction.d.ts +0 -4
  43. package/dist/types/ChatCompletionChunkFunction.js +0 -3
  44. package/dist/types/ChatCompletionChunkToolCall.d.ts +0 -7
  45. package/dist/types/ChatCompletionChunkToolCall.js +0 -2
  46. package/dist/types/ChatCompletionDelta.d.ts +0 -7
  47. package/dist/types/ChatCompletionDelta.js +0 -2
  48. package/dist/types/ChatCompletionFunction.d.ts +0 -4
  49. package/dist/types/ChatCompletionFunction.js +0 -3
  50. package/dist/types/ChatCompletionMessage.d.ts +0 -9
  51. package/dist/types/ChatCompletionMessage.js +0 -2
  52. package/dist/types/ChatCompletionToolCall.d.ts +0 -6
  53. package/dist/types/ChatCompletionToolCall.js +0 -2
  54. package/dist/types/ChatCompletionUsage.d.ts +0 -9
  55. package/dist/types/ChatCompletionUsage.js +0 -2
  56. package/dist/types/CompletionTokensDetails.d.ts +0 -3
  57. package/dist/types/CompletionTokensDetails.js +0 -3
  58. package/dist/types/ContentPart.d.ts +0 -106
  59. package/dist/types/ContentPart.js +0 -2
  60. package/dist/types/EmbeddingCallOptions.d.ts +0 -24
  61. package/dist/types/EmbeddingCallOptions.js +0 -2
  62. package/dist/types/EmbeddingResponse.d.ts +0 -16
  63. package/dist/types/EmbeddingResponse.js +0 -2
  64. package/dist/types/EmbeddingResult.d.ts +0 -33
  65. package/dist/types/EmbeddingResult.js +0 -2
  66. package/dist/types/EmbeddingUsage.d.ts +0 -9
  67. package/dist/types/EmbeddingUsage.js +0 -3
  68. package/dist/types/FileBytes.d.ts +0 -12
  69. package/dist/types/FileBytes.js +0 -3
  70. package/dist/types/FileData.d.ts +0 -25
  71. package/dist/types/FileData.js +0 -2
  72. package/dist/types/FilePart.d.ts +0 -8
  73. package/dist/types/FilePart.js +0 -2
  74. package/dist/types/Fingerprint.d.ts +0 -21
  75. package/dist/types/Fingerprint.js +0 -3
  76. package/dist/types/FinishReason.d.ts +0 -14
  77. package/dist/types/FinishReason.js +0 -2
  78. package/dist/types/FinishReasonUnified.d.ts +0 -4
  79. package/dist/types/FinishReasonUnified.js +0 -3
  80. package/dist/types/FunctionTool.d.ts +0 -35
  81. package/dist/types/FunctionTool.js +0 -2
  82. package/dist/types/GenerateContent.d.ts +0 -77
  83. package/dist/types/GenerateContent.js +0 -2
  84. package/dist/types/GenerateObjectResult.d.ts +0 -48
  85. package/dist/types/GenerateObjectResult.js +0 -2
  86. package/dist/types/GenerateResult.d.ts +0 -45
  87. package/dist/types/GenerateResult.js +0 -2
  88. package/dist/types/GenerateTextOptions.d.ts +0 -62
  89. package/dist/types/GenerateTextOptions.js +0 -2
  90. package/dist/types/GenerateTextResult.d.ts +0 -81
  91. package/dist/types/GenerateTextResult.js +0 -2
  92. package/dist/types/HttpExchange.d.ts +0 -23
  93. package/dist/types/HttpExchange.js +0 -2
  94. package/dist/types/HttpRecord.d.ts +0 -12
  95. package/dist/types/HttpRecord.js +0 -3
  96. package/dist/types/ImageCallOptions.d.ts +0 -54
  97. package/dist/types/ImageCallOptions.js +0 -2
  98. package/dist/types/ImageFile.d.ts +0 -25
  99. package/dist/types/ImageFile.js +0 -2
  100. package/dist/types/ImageFileData.d.ts +0 -8
  101. package/dist/types/ImageFileData.js +0 -3
  102. package/dist/types/ImageOutputs.d.ts +0 -14
  103. package/dist/types/ImageOutputs.js +0 -3
  104. package/dist/types/ImageResponse.d.ts +0 -19
  105. package/dist/types/ImageResponse.js +0 -3
  106. package/dist/types/ImageResult.d.ts +0 -34
  107. package/dist/types/ImageResult.js +0 -2
  108. package/dist/types/ImageUsage.d.ts +0 -19
  109. package/dist/types/ImageUsage.js +0 -3
  110. package/dist/types/InputAudioFormat.d.ts +0 -13
  111. package/dist/types/InputAudioFormat.js +0 -3
  112. package/dist/types/InputRecord.d.ts +0 -16
  113. package/dist/types/InputRecord.js +0 -2
  114. package/dist/types/LanguageModelPromptMessage.d.ts +0 -20
  115. package/dist/types/LanguageModelPromptMessage.js +0 -2
  116. package/dist/types/MessageContent.d.ts +0 -5
  117. package/dist/types/MessageContent.js +0 -2
  118. package/dist/types/Modality.d.ts +0 -4
  119. package/dist/types/Modality.js +0 -3
  120. package/dist/types/ModelCapabilities.d.ts +0 -21
  121. package/dist/types/ModelCapabilities.js +0 -3
  122. package/dist/types/ModelCost.d.ts +0 -10
  123. package/dist/types/ModelCost.js +0 -3
  124. package/dist/types/ModelId.d.ts +0 -7
  125. package/dist/types/ModelId.js +0 -3
  126. package/dist/types/ModelLimits.d.ts +0 -17
  127. package/dist/types/ModelLimits.js +0 -3
  128. package/dist/types/ModelMessage.d.ts +0 -9
  129. package/dist/types/ModelMessage.js +0 -2
  130. package/dist/types/ModelModalities.d.ts +0 -8
  131. package/dist/types/ModelModalities.js +0 -2
  132. package/dist/types/ModelPrompt.d.ts +0 -7
  133. package/dist/types/ModelPrompt.js +0 -2
  134. package/dist/types/ModelSpec.d.ts +0 -33
  135. package/dist/types/ModelSpec.js +0 -2
  136. package/dist/types/ModelType.d.ts +0 -4
  137. package/dist/types/ModelType.js +0 -3
  138. package/dist/types/OutcomeRecord.d.ts +0 -14
  139. package/dist/types/OutcomeRecord.js +0 -2
  140. package/dist/types/OutcomeStatus.d.ts +0 -4
  141. package/dist/types/OutcomeStatus.js +0 -3
  142. package/dist/types/PrefixBreak.d.ts +0 -11
  143. package/dist/types/PrefixBreak.js +0 -2
  144. package/dist/types/PromptTokensDetails.d.ts +0 -4
  145. package/dist/types/PromptTokensDetails.js +0 -3
  146. package/dist/types/ProviderAuditSpec.d.ts +0 -33
  147. package/dist/types/ProviderAuditSpec.js +0 -2
  148. package/dist/types/ProviderFamily.d.ts +0 -5
  149. package/dist/types/ProviderFamily.js +0 -3
  150. package/dist/types/ProviderName.d.ts +0 -258
  151. package/dist/types/ProviderName.js +0 -262
  152. package/dist/types/ProviderRecord.d.ts +0 -30
  153. package/dist/types/ProviderRecord.js +0 -2
  154. package/dist/types/ProviderTool.d.ts +0 -24
  155. package/dist/types/ProviderTool.js +0 -2
  156. package/dist/types/ReasoningEffort.d.ts +0 -7
  157. package/dist/types/ReasoningEffort.js +0 -3
  158. package/dist/types/ReasoningMode.d.ts +0 -4
  159. package/dist/types/ReasoningMode.js +0 -3
  160. package/dist/types/ReasoningPart.d.ts +0 -9
  161. package/dist/types/ReasoningPart.js +0 -3
  162. package/dist/types/ReasoningSpec.d.ts +0 -39
  163. package/dist/types/ReasoningSpec.js +0 -2
  164. package/dist/types/ReasoningVisibility.d.ts +0 -4
  165. package/dist/types/ReasoningVisibility.js +0 -3
  166. package/dist/types/Recording.d.ts +0 -56
  167. package/dist/types/Recording.js +0 -2
  168. package/dist/types/RequestCacheHints.d.ts +0 -9
  169. package/dist/types/RequestCacheHints.js +0 -3
  170. package/dist/types/RequestInfo.d.ts +0 -12
  171. package/dist/types/RequestInfo.js +0 -2
  172. package/dist/types/RerankingCallOptions.d.ts +0 -33
  173. package/dist/types/RerankingCallOptions.js +0 -2
  174. package/dist/types/RerankingDocuments.d.ts +0 -15
  175. package/dist/types/RerankingDocuments.js +0 -2
  176. package/dist/types/RerankingRank.d.ts +0 -13
  177. package/dist/types/RerankingRank.js +0 -3
  178. package/dist/types/RerankingResponse.d.ts +0 -28
  179. package/dist/types/RerankingResponse.js +0 -2
  180. package/dist/types/RerankingResult.d.ts +0 -31
  181. package/dist/types/RerankingResult.js +0 -2
  182. package/dist/types/ResponseFormat.d.ts +0 -11
  183. package/dist/types/ResponseFormat.js +0 -2
  184. package/dist/types/ResponseInfo.d.ts +0 -30
  185. package/dist/types/ResponseInfo.js +0 -2
  186. package/dist/types/ResponseMetadata.d.ts +0 -8
  187. package/dist/types/ResponseMetadata.js +0 -3
  188. package/dist/types/ResponseRecord.d.ts +0 -13
  189. package/dist/types/ResponseRecord.js +0 -3
  190. package/dist/types/Role.d.ts +0 -4
  191. package/dist/types/Role.js +0 -3
  192. package/dist/types/RuntimeModel.d.ts +0 -22
  193. package/dist/types/RuntimeModel.js +0 -3
  194. package/dist/types/SearchCallOptions.d.ts +0 -46
  195. package/dist/types/SearchCallOptions.js +0 -2
  196. package/dist/types/SearchResponse.d.ts +0 -16
  197. package/dist/types/SearchResponse.js +0 -2
  198. package/dist/types/SearchResult.d.ts +0 -32
  199. package/dist/types/SearchResult.js +0 -2
  200. package/dist/types/SearchResultItem.d.ts +0 -33
  201. package/dist/types/SearchResultItem.js +0 -2
  202. package/dist/types/SessionCall.d.ts +0 -20
  203. package/dist/types/SessionCall.js +0 -3
  204. package/dist/types/SessionChainView.d.ts +0 -10
  205. package/dist/types/SessionChainView.js +0 -2
  206. package/dist/types/SessionSource.d.ts +0 -4
  207. package/dist/types/SessionSource.js +0 -3
  208. package/dist/types/SessionStepStat.d.ts +0 -27
  209. package/dist/types/SessionStepStat.js +0 -2
  210. package/dist/types/SessionView.d.ts +0 -16
  211. package/dist/types/SessionView.js +0 -2
  212. package/dist/types/Size.d.ts +0 -11
  213. package/dist/types/Size.js +0 -3
  214. package/dist/types/SourcePart.d.ts +0 -9
  215. package/dist/types/SourcePart.js +0 -3
  216. package/dist/types/SpeechCallOptions.d.ts +0 -47
  217. package/dist/types/SpeechCallOptions.js +0 -2
  218. package/dist/types/SpeechRequest.d.ts +0 -10
  219. package/dist/types/SpeechRequest.js +0 -2
  220. package/dist/types/SpeechResponse.d.ts +0 -24
  221. package/dist/types/SpeechResponse.js +0 -2
  222. package/dist/types/SpeechResult.d.ts +0 -34
  223. package/dist/types/SpeechResult.js +0 -2
  224. package/dist/types/StreamPart.d.ts +0 -161
  225. package/dist/types/StreamPart.js +0 -2
  226. package/dist/types/StreamTextResultAggregated.d.ts +0 -74
  227. package/dist/types/StreamTextResultAggregated.js +0 -2
  228. package/dist/types/TimeoutConfiguration.d.ts +0 -23
  229. package/dist/types/TimeoutConfiguration.js +0 -3
  230. package/dist/types/TimingRecord.d.ts +0 -7
  231. package/dist/types/TimingRecord.js +0 -3
  232. package/dist/types/TokenUsage.d.ts +0 -29
  233. package/dist/types/TokenUsage.js +0 -3
  234. package/dist/types/Tool.d.ts +0 -12
  235. package/dist/types/Tool.js +0 -2
  236. package/dist/types/ToolCall.d.ts +0 -33
  237. package/dist/types/ToolCall.js +0 -2
  238. package/dist/types/ToolChoice.d.ts +0 -12
  239. package/dist/types/ToolChoice.js +0 -3
  240. package/dist/types/ToolResult.d.ts +0 -22
  241. package/dist/types/ToolResult.js +0 -2
  242. package/dist/types/TraceFilter.d.ts +0 -9
  243. package/dist/types/TraceFilter.js +0 -3
  244. package/dist/types/TraceRecord.d.ts +0 -54
  245. package/dist/types/TraceRecord.js +0 -2
  246. package/dist/types/TraceStats.d.ts +0 -20
  247. package/dist/types/TraceStats.js +0 -3
  248. package/dist/types/TranscriptionCallOptions.d.ts +0 -29
  249. package/dist/types/TranscriptionCallOptions.js +0 -2
  250. package/dist/types/TranscriptionRequest.d.ts +0 -9
  251. package/dist/types/TranscriptionRequest.js +0 -3
  252. package/dist/types/TranscriptionResponse.d.ts +0 -24
  253. package/dist/types/TranscriptionResponse.js +0 -2
  254. package/dist/types/TranscriptionResult.d.ts +0 -46
  255. package/dist/types/TranscriptionResult.js +0 -2
  256. package/dist/types/TranscriptionSegment.d.ts +0 -17
  257. package/dist/types/TranscriptionSegment.js +0 -3
  258. package/dist/types/TranscriptionStreamPart.d.ts +0 -70
  259. package/dist/types/TranscriptionStreamPart.js +0 -2
  260. package/dist/types/UploadFileCallOptions.d.ts +0 -27
  261. package/dist/types/UploadFileCallOptions.js +0 -2
  262. package/dist/types/UploadFileData.d.ts +0 -17
  263. package/dist/types/UploadFileData.js +0 -2
  264. package/dist/types/UploadFileResult.d.ts +0 -35
  265. package/dist/types/UploadFileResult.js +0 -2
  266. package/dist/types/Usage.d.ts +0 -13
  267. package/dist/types/Usage.js +0 -2
  268. package/dist/types/UsageSnapshot.d.ts +0 -18
  269. package/dist/types/UsageSnapshot.js +0 -2
  270. package/dist/types/Verdict.d.ts +0 -23
  271. package/dist/types/Verdict.js +0 -2
  272. package/dist/types/VerdictConfidence.d.ts +0 -4
  273. package/dist/types/VerdictConfidence.js +0 -3
  274. package/dist/types/VerdictKind.d.ts +0 -4
  275. package/dist/types/VerdictKind.js +0 -3
  276. package/dist/types/VideoCallOptions.d.ts +0 -69
  277. package/dist/types/VideoCallOptions.js +0 -2
  278. package/dist/types/VideoData.d.ts +0 -22
  279. package/dist/types/VideoData.js +0 -3
  280. package/dist/types/VideoFile.d.ts +0 -29
  281. package/dist/types/VideoFile.js +0 -2
  282. package/dist/types/VideoFileData.d.ts +0 -8
  283. package/dist/types/VideoFileData.js +0 -3
  284. package/dist/types/VideoFrameImage.d.ts +0 -17
  285. package/dist/types/VideoFrameImage.js +0 -2
  286. package/dist/types/VideoFrameType.d.ts +0 -6
  287. package/dist/types/VideoFrameType.js +0 -3
  288. package/dist/types/VideoResponse.d.ts +0 -19
  289. package/dist/types/VideoResponse.js +0 -3
  290. package/dist/types/VideoResult.d.ts +0 -29
  291. package/dist/types/VideoResult.js +0 -2
  292. package/dist/types/Warning.d.ts +0 -23
  293. package/dist/types/Warning.js +0 -3
  294. package/dist/types/serde_json/JsonValue.d.ts +0 -3
  295. package/dist/types/serde_json/JsonValue.js +0 -3
@@ -1,117 +0,0 @@
1
- import type { LanguageModelPromptMessage } from "./LanguageModelPromptMessage";
2
- import type { ReasoningEffort } from "./ReasoningEffort";
3
- import type { ResponseFormat } from "./ResponseFormat";
4
- import type { TimeoutConfiguration } from "./TimeoutConfiguration";
5
- import type { Tool } from "./Tool";
6
- import type { ToolChoice } from "./ToolChoice";
7
- import type { JsonValue } from "./serde_json/JsonValue";
8
- /**
9
- * Options passed to `LanguageModel::do_generate` / `do_stream`.
10
- *
11
- * This is the **provider-facing** options struct. Users interact with
12
- * `GenerateTextOptions` (user-facing) which is converted to `CallOptions`
13
- * by the `generate_text` / `stream_text` functions.
14
- */
15
- export type CallOptions = {
16
- /**
17
- * The standardized prompt (message array). Required.
18
- */
19
- prompt: Array<LanguageModelPromptMessage>;
20
- /**
21
- * Maximum tokens to generate.
22
- */
23
- max_output_tokens: number | null;
24
- /**
25
- * Sampling temperature.
26
- */
27
- temperature: number | null;
28
- /**
29
- * Stop sequences.
30
- */
31
- stop_sequences: Array<string> | null;
32
- /**
33
- * Nucleus sampling `top_p`.
34
- */
35
- top_p: number | null;
36
- /**
37
- * Top-k sampling.
38
- */
39
- top_k: number | null;
40
- /**
41
- * Presence penalty.
42
- */
43
- presence_penalty: number | null;
44
- /**
45
- * Frequency penalty.
46
- */
47
- frequency_penalty: number | null;
48
- /**
49
- * Response format (text or JSON).
50
- */
51
- response_format: ResponseFormat | null;
52
- /**
53
- * Seed for reproducibility.
54
- */
55
- seed: number | null;
56
- /**
57
- * Tools available to the model (function tools and/or provider-defined tools).
58
- */
59
- tools: Array<Tool> | null;
60
- /**
61
- * How the model should choose tools.
62
- */
63
- tool_choice: ToolChoice;
64
- /**
65
- * Extra HTTP headers.
66
- */
67
- headers: {
68
- [key in string]: string;
69
- } | null;
70
- /**
71
- * Provider-specific options (keyed by provider name).
72
- */
73
- provider_options: {
74
- [key in string]: JsonValue;
75
- } | null;
76
- /**
77
- * Top-level reasoning effort. Maps to OpenAI `reasoning_effort` and
78
- * Anthropic `thinking` config.
79
- */
80
- reasoning: ReasoningEffort | null;
81
- /**
82
- * Per-call request body overrides. Deep-merged into the provider-built
83
- * request body (after any built-in vendor override) before sending.
84
- * `null` values delete the corresponding key. See RFC-0017.
85
- */
86
- body_overrides: JsonValue | null;
87
- /**
88
- * Per-call retry count override. `None` uses the provider's configured
89
- * `RetryConfig.max_retries`. `Some(0)` disables retries.
90
- */
91
- max_retries: number | null;
92
- /**
93
- * Per-call timeout configuration (total / first-chunk / chunk idle).
94
- * `None` = no timeouts (provider defaults still apply at the HTTP layer).
95
- */
96
- timeout: TimeoutConfiguration | null;
97
- /**
98
- * Session identifier, for grouping consecutive calls into a session
99
- * (observability, see RFC-0024). Explicit values take precedence; when
100
- * `None` and the optional session inferer is enabled, one may be inferred.
101
- * Orthogonal to RFC-0019 session-affinity headers: this field is for
102
- * local grouping, while session headers in `headers` are for upstream
103
- * routing — both may share an id value but travel different paths.
104
- */
105
- session_id: string | null;
106
- /**
107
- * Emit raw provider stream chunks as `StreamPart::Raw` (debugging aid).
108
- * When `Some(true)`, streaming providers yield one `Raw` part per JSON
109
- * SSE event, carrying the **parsed JSON payload** of the event, emitted
110
- * before the parsed parts. Excludes the `[DONE]` sentinel; unparsable
111
- * chunks emit only `Error`. `null`/`Some(false)` = off.
112
- * Currently honored by the OpenAI-compatible family (openai / azure /
113
- * openai-compatible registry providers); other provider families ignore
114
- * it for now (RFC-0016 M2).
115
- */
116
- include_raw_chunks: boolean | null;
117
- };
@@ -1,4 +0,0 @@
1
- /**
2
- * Where a [`ModelSpec`] came from.
3
- */
4
- export type CatalogueSource = "Anya2a" | "ModelsDev" | "Manual";
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
1
- import type { ChatCompletionChoice } from "./ChatCompletionChoice";
2
- import type { ChatCompletionUsage } from "./ChatCompletionUsage";
3
- /**
4
- * A complete Chat Completion response (non-streaming).
5
- *
6
- * Mirrors the OpenAI `chat.completion` object.
7
- */
8
- export type ChatCompletion = {
9
- id: string;
10
- object: string;
11
- created: bigint;
12
- model: string;
13
- choices: Array<ChatCompletionChoice>;
14
- usage: ChatCompletionUsage;
15
- system_fingerprint: string | null;
16
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- import type { ChatCompletionMessage } from "./ChatCompletionMessage";
2
- import type { JsonValue } from "./serde_json/JsonValue";
3
- export type ChatCompletionChoice = {
4
- index: number;
5
- message: ChatCompletionMessage;
6
- finish_reason: string | null;
7
- logprobs: JsonValue | null;
8
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,15 +0,0 @@
1
- import type { ChatCompletionChunkChoice } from "./ChatCompletionChunkChoice";
2
- import type { ChatCompletionUsage } from "./ChatCompletionUsage";
3
- /**
4
- * A single Chat Completion chunk (streaming).
5
- *
6
- * Mirrors the OpenAI `chat.completion.chunk` object.
7
- */
8
- export type ChatCompletionChunk = {
9
- id: string;
10
- object: string;
11
- created: bigint;
12
- model: string;
13
- choices: Array<ChatCompletionChunkChoice>;
14
- usage: ChatCompletionUsage | null;
15
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- import type { ChatCompletionDelta } from "./ChatCompletionDelta";
2
- import type { JsonValue } from "./serde_json/JsonValue";
3
- export type ChatCompletionChunkChoice = {
4
- index: number;
5
- delta: ChatCompletionDelta;
6
- finish_reason: string | null;
7
- logprobs: JsonValue | null;
8
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- export type ChatCompletionChunkFunction = {
2
- name: string | null;
3
- arguments: string | null;
4
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- import type { ChatCompletionChunkFunction } from "./ChatCompletionChunkFunction";
2
- export type ChatCompletionChunkToolCall = {
3
- index: number;
4
- id: string | null;
5
- type: string | null;
6
- function: ChatCompletionChunkFunction;
7
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- import type { ChatCompletionChunkToolCall } from "./ChatCompletionChunkToolCall";
2
- export type ChatCompletionDelta = {
3
- role: string | null;
4
- content: string | null;
5
- reasoning_content: string | null;
6
- tool_calls: Array<ChatCompletionChunkToolCall> | null;
7
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- export type ChatCompletionFunction = {
2
- name: string;
3
- arguments: string;
4
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- import type { ChatCompletionToolCall } from "./ChatCompletionToolCall";
2
- import type { JsonValue } from "./serde_json/JsonValue";
3
- export type ChatCompletionMessage = {
4
- role: string;
5
- content: string | null;
6
- reasoning_content: string | null;
7
- tool_calls: Array<ChatCompletionToolCall> | null;
8
- annotations: Array<JsonValue> | null;
9
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- import type { ChatCompletionFunction } from "./ChatCompletionFunction";
2
- export type ChatCompletionToolCall = {
3
- id: string;
4
- type: string;
5
- function: ChatCompletionFunction;
6
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- import type { CompletionTokensDetails } from "./CompletionTokensDetails";
2
- import type { PromptTokensDetails } from "./PromptTokensDetails";
3
- export type ChatCompletionUsage = {
4
- prompt_tokens: number;
5
- completion_tokens: number;
6
- total_tokens: number;
7
- prompt_tokens_details: PromptTokensDetails | null;
8
- completion_tokens_details: CompletionTokensDetails | null;
9
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- export type CompletionTokensDetails = {
2
- reasoning_tokens: number | null;
3
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,106 +0,0 @@
1
- import type { JsonValue } from "./serde_json/JsonValue";
2
- /**
3
- * A part of a multi-part message.
4
- *
5
- * Shared between `ModelMessage` (user-facing) and `LanguageModelPrompt` (provider-facing).
6
- */
7
- export type ContentPart = {
8
- "type": "text";
9
- text: string;
10
- /**
11
- * Provider-specific options for this part (e.g. `openai.promptCacheBreakpoint`).
12
- */
13
- provider_options?: JsonValue | null;
14
- } | {
15
- "type": "image";
16
- image: Array<number>;
17
- media_type: string;
18
- provider_options?: JsonValue | null;
19
- } | {
20
- "type": "file";
21
- data: Array<number>;
22
- media_type: string;
23
- filename?: string | null;
24
- provider_options?: JsonValue | null;
25
- } | {
26
- "type": "file_base64";
27
- data: string;
28
- media_type: string;
29
- filename?: string | null;
30
- provider_options?: JsonValue | null;
31
- } | {
32
- "type": "file_url";
33
- url: string;
34
- media_type: string;
35
- provider_options?: JsonValue | null;
36
- } | {
37
- "type": "file_reference";
38
- media_type: string;
39
- reference: JsonValue;
40
- filename?: string | null;
41
- provider_options?: JsonValue | null;
42
- } | {
43
- "type": "reasoning";
44
- text: string;
45
- signature: string | null;
46
- /**
47
- * Provider-specific options for this part (e.g.
48
- * `anthropic.signature`, `anthropic.redactedData`,
49
- * `anthropic.cacheControl`).
50
- */
51
- provider_options?: JsonValue | null;
52
- } | {
53
- "type": "tool_call";
54
- tool_call_id: string;
55
- tool_name: string;
56
- /**
57
- * Arguments as a JSON value (usually an object).
58
- */
59
- input: JsonValue;
60
- /**
61
- * Provider-assigned thought signature (e.g. Google Gemini
62
- * `thoughtSignature`). Must be echoed back verbatim on the follow-up
63
- * turn when the tool result is sent.
64
- */
65
- thought_signature?: string | null;
66
- /**
67
- * Provider-specific options for this part (e.g.
68
- * `anthropic.cacheControl`).
69
- */
70
- provider_options?: JsonValue | null;
71
- } | {
72
- "type": "tool_result";
73
- tool_call_id: string;
74
- /**
75
- * The tool's output (usually a JSON value or plain text).
76
- *
77
- * Accepts the legacy `output` field name (used by the Vercel AI SDK
78
- * and the 0.1.0 TypeScript bindings) as an alias during deserialization,
79
- * so multi-part tool messages constructed either way round-trip
80
- * correctly. Serialization always emits `result`.
81
- */
82
- result: JsonValue;
83
- /**
84
- * The name of the tool that produced this result (optional on the
85
- * user-input side; providers that need it can look it up from the
86
- * preceding tool call).
87
- */
88
- tool_name?: string | null;
89
- /**
90
- * Whether the result is an error or error message.
91
- */
92
- is_error?: boolean | null;
93
- /**
94
- * Whether the result is preliminary (replaces prior, e.g. image previews).
95
- */
96
- preliminary?: boolean | null;
97
- /**
98
- * Whether the tool is dynamic (defined at runtime, e.g. MCP tools).
99
- */
100
- dynamic?: boolean | null;
101
- /**
102
- * Provider-specific options for this part (e.g.
103
- * `anthropic.cacheControl`).
104
- */
105
- provider_options?: JsonValue | null;
106
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,24 +0,0 @@
1
- import type { JsonValue } from "./serde_json/JsonValue";
2
- /**
3
- * Options passed to [`EmbeddingModel::do_embed`].
4
- *
5
- * Aligned with V4 `EmbeddingModelV4CallOptions`.
6
- */
7
- export type EmbeddingCallOptions = {
8
- /**
9
- * List of text values to generate embeddings for.
10
- */
11
- values: Array<string>;
12
- /**
13
- * Additional provider-specific options, keyed by provider name.
14
- */
15
- provider_options: {
16
- [key in string]: JsonValue;
17
- } | null;
18
- /**
19
- * Additional HTTP headers to send with the request.
20
- */
21
- headers: {
22
- [key in string]: string;
23
- } | null;
24
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
1
- import type { JsonValue } from "./serde_json/JsonValue";
2
- /**
3
- * Debugging response info specific to embedding calls.
4
- */
5
- export type EmbeddingResponse = {
6
- /**
7
- * Response headers.
8
- */
9
- headers: {
10
- [key in string]: string;
11
- } | null;
12
- /**
13
- * The response body (opaque JSON).
14
- */
15
- body: JsonValue | null;
16
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,33 +0,0 @@
1
- import type { EmbeddingResponse } from "./EmbeddingResponse";
2
- import type { EmbeddingUsage } from "./EmbeddingUsage";
3
- import type { Warning } from "./Warning";
4
- import type { JsonValue } from "./serde_json/JsonValue";
5
- /**
6
- * The result of [`EmbeddingModel::do_embed`].
7
- *
8
- * Aligned with V4 `EmbeddingModelV4Result`.
9
- */
10
- export type EmbeddingResult = {
11
- /**
12
- * Generated embeddings, in the same order as the input `values`.
13
- */
14
- embeddings: Array<Array<number>>;
15
- /**
16
- * Token usage (input tokens only).
17
- */
18
- usage: EmbeddingUsage | null;
19
- /**
20
- * Additional provider-specific metadata.
21
- */
22
- provider_metadata: {
23
- [key in string]: JsonValue;
24
- } | null;
25
- /**
26
- * Optional response information for debugging.
27
- */
28
- response: EmbeddingResponse | null;
29
- /**
30
- * Warnings for the call, e.g. unsupported settings.
31
- */
32
- warnings: Array<Warning>;
33
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- /**
2
- * Token usage for an embedding call. Embeddings only report input tokens.
3
- */
4
- export type EmbeddingUsage = {
5
- /**
6
- * Number of input tokens consumed.
7
- */
8
- tokens: number;
9
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +0,0 @@
1
- /**
2
- * Either raw bytes or a base64-encoded string.
3
- *
4
- * Providers should pass file data through without unnecessary conversion: if
5
- * the upstream API returns base64, return [`FileBytes::Base64`]; if it
6
- * returns binary, return [`FileBytes::Binary`].
7
- */
8
- export type FileBytes = {
9
- "Binary": Array<number>;
10
- } | {
11
- "Base64": string;
12
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,25 +0,0 @@
1
- import type { FileBytes } from "./FileBytes";
2
- /**
3
- * File data as a tagged discriminated union.
4
- *
5
- * Aligned with V4 `SharedV4FileData`.
6
- */
7
- export type FileData = {
8
- "Data": {
9
- data: FileBytes;
10
- };
11
- } | {
12
- "Url": {
13
- url: string;
14
- };
15
- } | {
16
- "Reference": {
17
- reference: {
18
- [key in string]: string;
19
- };
20
- };
21
- } | {
22
- "Text": {
23
- text: string;
24
- };
25
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- import type { FileData } from "./FileData";
2
- /**
3
- * A file generated by the model, extracted to the top level (M7).
4
- */
5
- export type FilePart = {
6
- data: FileData;
7
- media_type: string;
8
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,21 +0,0 @@
1
- /**
2
- * Serialized-wire fingerprint stored in a `TraceRecord` (hex strings —
3
- * `u128` is not JSON-serializable).
4
- */
5
- export type Fingerprint = {
6
- /**
7
- * 128-bit hash of the whole denoised body (hex).
8
- */
9
- body_hash: string;
10
- len_bytes: bigint;
11
- block_size: bigint;
12
- /**
13
- * Block-hash chain (hex), one entry per block.
14
- */
15
- block_hashes: Array<string>;
16
- /**
17
- * Token estimate — byte proxy `len_bytes / 4` when no tokenizer is
18
- * attached (RFC-0015 §4.1: W capped at one block in this mode).
19
- */
20
- token_estimate: bigint;
21
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,14 +0,0 @@
1
- import type { FinishReasonUnified } from "./FinishReasonUnified";
2
- /**
3
- * Unified finish reason (why the model stopped generating).
4
- */
5
- export type FinishReason = {
6
- /**
7
- * The unified reason.
8
- */
9
- unified: FinishReasonUnified;
10
- /**
11
- * The raw provider-specific reason string.
12
- */
13
- raw: string | null;
14
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- /**
2
- * Unified finish reason enum (aligned with V4 `LanguageModelV4FinishReason`).
3
- */
4
- export type FinishReasonUnified = "stop" | "length" | "content-filter" | "tool-calls" | "error" | "other";
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });