@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,16 +0,0 @@
1
- import type { LanguageModelPromptMessage } from "./LanguageModelPromptMessage";
2
- import type { JsonValue } from "./serde_json/JsonValue";
3
- /**
4
- * ① 输入侧:完整调用参数,足以重建 generate_text 调用。
5
- */
6
- export type InputRecord = {
7
- /**
8
- * 完整 prompt(消息数组,含 ContentPart::Image 等多模态)。
9
- */
10
- prompt: Array<LanguageModelPromptMessage>;
11
- /**
12
- * 序列化的 CallOptions(abort_signal/call_id 已 serde skip);
13
- * headers/provider_options/body_overrides 已递归脱敏。
14
- */
15
- options: JsonValue;
16
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,20 +0,0 @@
1
- import type { ContentPart } from "./ContentPart";
2
- import type { Role } from "./Role";
3
- import type { JsonValue } from "./serde_json/JsonValue";
4
- /**
5
- * A single provider-facing message.
6
- *
7
- * Unlike `ModelMessage` (which can have string content), this always has
8
- * `content: Vec<ContentPart>` — strings are normalized to `ContentPart::Text`.
9
- */
10
- export type LanguageModelPromptMessage = {
11
- role: Role;
12
- content: Array<ContentPart>;
13
- /**
14
- * Message-level provider-specific options (e.g.
15
- * `anthropic.cacheControl`), applied to the last part of the message when
16
- * converting to a provider prompt. Mirrors the Vercel AI SDK
17
- * `LanguageModelV4Message.providerOptions`.
18
- */
19
- provider_options: JsonValue | null;
20
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- import type { ContentPart } from "./ContentPart";
2
- /**
3
- * Message body: either a simple string or multi-part content.
4
- */
5
- export type MessageContent = string | Array<ContentPart>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- /**
2
- * A single input or output modality.
3
- */
4
- export type Modality = "Text" | "Image" | "Audio" | "Video" | "Pdf" | "Embedding" | "Score" | "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 });
@@ -1,21 +0,0 @@
1
- /**
2
- * Model-level capability flags (more precise than provider-level `supports_*`).
3
- */
4
- export type ModelCapabilities = {
5
- /**
6
- * Supports function/tool calling.
7
- */
8
- tool_call: boolean;
9
- /**
10
- * Supports structured / JSON-schema output.
11
- */
12
- structured_output: boolean;
13
- /**
14
- * Accepts a `temperature` parameter.
15
- */
16
- temperature: boolean;
17
- /**
18
- * Accepts multimodal attachments (image/audio/pdf input).
19
- */
20
- attachment: boolean;
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,10 +0,0 @@
1
- /**
2
- * Pricing (advisory, read-only metadata). Units follow the source catalog
3
- * (anya2a uses USD per 1M tokens).
4
- */
5
- export type ModelCost = {
6
- input?: number | null;
7
- output?: number | null;
8
- cache_read?: number | null;
9
- cache_write?: number | null;
10
- };
@@ -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
- /**
2
- * A model identifier in `"provider/model-name"` format, e.g. `"openai/gpt-4o"`.
3
- */
4
- export type ModelId = {
5
- provider: string;
6
- model: string;
7
- };
@@ -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,17 +0,0 @@
1
- /**
2
- * Token / request limits for a model.
3
- */
4
- export type ModelLimits = {
5
- /**
6
- * Maximum total context window (input + output), in tokens.
7
- */
8
- context?: number | null;
9
- /**
10
- * Maximum output tokens.
11
- */
12
- output?: number | null;
13
- /**
14
- * Maximum input tokens (when distinct from `context`).
15
- */
16
- input?: number | null;
17
- };
@@ -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 { MessageContent } from "./MessageContent";
2
- import type { Role } from "./Role";
3
- /**
4
- * A single user-facing chat message.
5
- */
6
- export type ModelMessage = {
7
- role: Role;
8
- content: MessageContent;
9
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- import type { Modality } from "./Modality";
2
- /**
3
- * Input/output modality sets.
4
- */
5
- export type ModelModalities = {
6
- input?: Array<Modality>;
7
- output?: Array<Modality>;
8
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- import type { ModelMessage } from "./ModelMessage";
2
- /**
3
- * What the user passes as `prompt` to `generate_text` / `stream_text`.
4
- *
5
- * Can be a simple string (converted to a single user message) or a list of messages.
6
- */
7
- export type ModelPrompt = string | Array<ModelMessage>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,33 +0,0 @@
1
- import type { CatalogueSource } from "./CatalogueSource";
2
- import type { ModelCapabilities } from "./ModelCapabilities";
3
- import type { ModelCost } from "./ModelCost";
4
- import type { ModelLimits } from "./ModelLimits";
5
- import type { ModelModalities } from "./ModelModalities";
6
- import type { ModelType } from "./ModelType";
7
- import type { ReasoningSpec } from "./ReasoningSpec";
8
- import type { JsonValue } from "./serde_json/JsonValue";
9
- /**
10
- * The full static portrait for a model, supplemented from community knowledge.
11
- *
12
- * All fields are advisory — aimux never auto-applies them in the request path.
13
- * The caller reads them to decide how to configure `GenerateTextOptions` /
14
- * `bodyOverrides`.
15
- */
16
- export type ModelSpec = {
17
- display_name?: string | null;
18
- type: ModelType;
19
- limits: ModelLimits;
20
- modalities: ModelModalities;
21
- capabilities: ModelCapabilities;
22
- reasoning?: ReasoningSpec | null;
23
- cost?: ModelCost | null;
24
- source: CatalogueSource;
25
- /**
26
- * Provider name (normalized to aimux registry spelling).
27
- */
28
- provider?: string | null;
29
- /**
30
- * Verbatim source entry, preserved for forward compatibility / debugging.
31
- */
32
- raw?: JsonValue | null;
33
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- /**
2
- * Coarse model category, used to route to the right modality surface.
3
- */
4
- export type ModelType = "Chat" | "Completion" | "Embedding" | "Rerank" | "ImageGen" | "ImageEdit" | "Video" | "Audio" | "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 });
@@ -1,14 +0,0 @@
1
- import type { OutcomeStatus } from "./OutcomeStatus";
2
- import type { JsonValue } from "./serde_json/JsonValue";
3
- /**
4
- * 最终结果摘要。
5
- */
6
- export type OutcomeRecord = {
7
- status: OutcomeStatus;
8
- finish_reason: string | null;
9
- error: string | null;
10
- /**
11
- * 序列化的 Usage。
12
- */
13
- usage: JsonValue | null;
14
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- /**
2
- * 调用终结状态。
3
- */
4
- export type OutcomeStatus = "pending" | "success" | "error" | "incomplete" | "cancelled";
@@ -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,11 +0,0 @@
1
- import type { BreakKind } from "./BreakKind";
2
- /**
3
- * A prefix break between two consecutive records of a session.
4
- */
5
- export type PrefixBreak = {
6
- at_record_id: string;
7
- prev_record_id: string;
8
- lcp_bytes: bigint;
9
- expected_break: boolean;
10
- kind: BreakKind;
11
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- export type PromptTokensDetails = {
2
- cached_tokens: number;
3
- cache_write_tokens: number | 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,33 +0,0 @@
1
- import type { ProviderFamily } from "./ProviderFamily";
2
- /**
3
- * Provider audit parameters (RFC-0015 §7 matrix — the part that lives in
4
- * core; display logic belongs to the CLI).
5
- */
6
- export type ProviderAuditSpec = {
7
- /**
8
- * Provider family for family-specific invariants.
9
- */
10
- family: ProviderFamily;
11
- /**
12
- * Token quantization granularity; `None` = no quantization.
13
- */
14
- gran: bigint | null;
15
- /**
16
- * Minimum cache threshold (tokens): below it `claimed` must be 0.
17
- */
18
- threshold: bigint;
19
- /**
20
- * TTL_idle (ms), conservative upper bound.
21
- */
22
- ttl_ms: bigint;
23
- /**
24
- * gpt-5.6+ semantics (no quantization, implicit-breakpoint whitelist,
25
- * write/read equality).
26
- */
27
- model56plus: boolean;
28
- /**
29
- * Claimed-hit ceiling: above this multiple of the client upper bound
30
- * the verdict is overclaim (W) even in shared mode. `None` = use U+τ.
31
- */
32
- shared_ceiling_mult: number | null;
33
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- /**
2
- * Provider family (only families with distinct invariants need dispatch;
3
- * gran/threshold/ttl live in `ProviderAuditSpec`).
4
- */
5
- export type ProviderFamily = "OpenAi" | "DeepSeek" | "Anthropic" | "Bedrock" | "Gemini" | "Vllm" | "Generic";
@@ -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,258 +0,0 @@
1
- /**
2
- * Names of all built-in OpenAI-compatible providers.
3
- * Use `ProviderName.groq` etc. as the `name` argument of `provider()`.
4
- */
5
- export declare const ProviderName: {
6
- readonly abacus: "abacus";
7
- readonly abliteration_ai: "abliteration_ai";
8
- readonly ai21: "ai21";
9
- readonly ai302: "ai302";
10
- readonly ai_router: "ai_router";
11
- readonly aiand: "aiand";
12
- readonly aibadgr: "aibadgr";
13
- readonly aigc2d: "aigc2d";
14
- readonly aihubmix: "aihubmix";
15
- readonly ails: "ails";
16
- readonly aiml: "aiml";
17
- readonly aki_io: "aki_io";
18
- readonly albert: "albert";
19
- readonly alibaba: "alibaba";
20
- readonly alibaba_coding_plan: "alibaba_coding_plan";
21
- readonly alibaba_coding_plan_cn: "alibaba_coding_plan_cn";
22
- readonly alibaba_token_plan: "alibaba_token_plan";
23
- readonly alibaba_token_plan_cn: "alibaba_token_plan_cn";
24
- readonly ambient: "ambient";
25
- readonly anyapi: "anyapi";
26
- readonly anyscale: "anyscale";
27
- readonly apertis: "apertis";
28
- readonly api2d: "api2d";
29
- readonly api2gpt: "api2gpt";
30
- readonly apiserpent: "apiserpent";
31
- readonly atlascloud: "atlascloud";
32
- readonly atomic_chat: "atomic_chat";
33
- readonly auriko: "auriko";
34
- readonly azure_ai: "azure_ai";
35
- readonly baichuan: "baichuan";
36
- readonly baidu: "baidu";
37
- readonly baidu_v2: "baidu_v2";
38
- readonly bailing: "bailing";
39
- readonly baseten: "baseten";
40
- readonly berget: "berget";
41
- readonly bigmodel: "bigmodel";
42
- readonly blueclaw: "blueclaw";
43
- readonly bytedance: "bytedance";
44
- readonly byteplus: "byteplus";
45
- readonly bytez: "bytez";
46
- readonly canopywave: "canopywave";
47
- readonly cerebras: "cerebras";
48
- readonly chatgpt: "chatgpt";
49
- readonly cherryin: "cherryin";
50
- readonly chutes: "chutes";
51
- readonly clarifai: "clarifai";
52
- readonly claudinio: "claudinio";
53
- readonly cline_pass: "cline_pass";
54
- readonly closeai: "closeai";
55
- readonly cloudferro_sherlock: "cloudferro_sherlock";
56
- readonly cloudflare: "cloudflare";
57
- readonly cloudflare_workers_ai: "cloudflare_workers_ai";
58
- readonly codestral: "codestral";
59
- readonly cometapi: "cometapi";
60
- readonly commandcode: "commandcode";
61
- readonly compactifai: "compactifai";
62
- readonly copilot: "copilot";
63
- readonly cortecs: "cortecs";
64
- readonly coze: "coze";
65
- readonly crof: "crof";
66
- readonly crossmodel: "crossmodel";
67
- readonly crusoe: "crusoe";
68
- readonly daoxe: "daoxe";
69
- readonly darkbloom: "darkbloom";
70
- readonly databricks: "databricks";
71
- readonly datarobot: "datarobot";
72
- readonly deepbricks: "deepbricks";
73
- readonly deepinfra: "deepinfra";
74
- readonly deepseek: "deepseek";
75
- readonly digitalocean: "digitalocean";
76
- readonly dinference: "dinference";
77
- readonly doubao: "doubao";
78
- readonly doubleword: "doubleword";
79
- readonly drun: "drun";
80
- readonly ebcloud: "ebcloud";
81
- readonly embercloud: "embercloud";
82
- readonly empiriolabs: "empiriolabs";
83
- readonly evroc: "evroc";
84
- readonly fastcrw: "fastcrw";
85
- readonly fastgpt: "fastgpt";
86
- readonly fastrouter: "fastrouter";
87
- readonly featherless_ai: "featherless_ai";
88
- readonly firepass: "firepass";
89
- readonly fireworks: "fireworks";
90
- readonly freemodel: "freemodel";
91
- readonly friendliai: "friendliai";
92
- readonly frogbot: "frogbot";
93
- readonly galadriel: "galadriel";
94
- readonly gdc: "gdc";
95
- readonly gigachat: "gigachat";
96
- readonly github: "github";
97
- readonly gmi: "gmi";
98
- readonly gmicloud: "gmicloud";
99
- readonly gonka24: "gonka24";
100
- readonly gradient_ai: "gradient_ai";
101
- readonly groq: "groq";
102
- readonly helicone: "helicone";
103
- readonly heroku: "heroku";
104
- readonly hetzner: "hetzner";
105
- readonly hosted_vllm: "hosted_vllm";
106
- readonly hpc_ai: "hpc_ai";
107
- readonly hyperbolic: "hyperbolic";
108
- readonly iflowcn: "iflowcn";
109
- readonly inception: "inception";
110
- readonly inceptron: "inceptron";
111
- readonly inference_net: "inference_net";
112
- readonly inferencehub: "inferencehub";
113
- readonly inferx: "inferx";
114
- readonly infinity: "infinity";
115
- readonly io_net: "io_net";
116
- readonly jiekou: "jiekou";
117
- readonly kenari: "kenari";
118
- readonly kilo: "kilo";
119
- readonly kimi: "kimi";
120
- readonly kimi_for_coding: "kimi_for_coding";
121
- readonly kiro: "kiro";
122
- readonly kluster_ai: "kluster_ai";
123
- readonly krutrim: "krutrim";
124
- readonly kuae_cloud_coding_plan: "kuae_cloud_coding_plan";
125
- readonly lambda_ai: "lambda_ai";
126
- readonly lemonade: "lemonade";
127
- readonly lemonfox_ai: "lemonfox_ai";
128
- readonly libertai: "libertai";
129
- readonly lilac: "lilac";
130
- readonly lingyiwanwu: "lingyiwanwu";
131
- readonly llama: "llama";
132
- readonly llamagate: "llamagate";
133
- readonly llmgateway: "llmgateway";
134
- readonly llmtr: "llmtr";
135
- readonly longcat: "longcat";
136
- readonly lucidquery: "lucidquery";
137
- readonly lynkr: "lynkr";
138
- readonly matterai: "matterai";
139
- readonly meganova: "meganova";
140
- readonly merge_gateway: "merge_gateway";
141
- readonly meta: "meta";
142
- readonly meta_llama: "meta_llama";
143
- readonly mimo: "mimo";
144
- readonly minimax: "minimax";
145
- readonly minimax_cn: "minimax_cn";
146
- readonly minimax_cn_coding_plan: "minimax_cn_coding_plan";
147
- readonly minimax_coding_plan: "minimax_coding_plan";
148
- readonly mira: "mira";
149
- readonly mixlayer: "mixlayer";
150
- readonly moark: "moark";
151
- readonly modal: "modal";
152
- readonly model_oracle_ai: "model_oracle_ai";
153
- readonly modelscope: "modelscope";
154
- readonly moonshotai: "moonshotai";
155
- readonly moonshotai_cn: "moonshotai_cn";
156
- readonly morph: "morph";
157
- readonly nanogpt: "nanogpt";
158
- readonly ncompass: "ncompass";
159
- readonly nearai: "nearai";
160
- readonly nebius: "nebius";
161
- readonly neon: "neon";
162
- readonly neuralwatt: "neuralwatt";
163
- readonly nextbit: "nextbit";
164
- readonly nlp_cloud: "nlp_cloud";
165
- readonly nous_research: "nous_research";
166
- readonly novita: "novita";
167
- readonly nscale: "nscale";
168
- readonly nvidia_nim: "nvidia_nim";
169
- readonly oci: "oci";
170
- readonly ofox: "ofox";
171
- readonly ohmygpt: "ohmygpt";
172
- readonly ollama_cloud: "ollama_cloud";
173
- readonly openaimax: "openaimax";
174
- readonly openaisb: "openaisb";
175
- readonly opencode: "opencode";
176
- readonly opencode_go: "opencode_go";
177
- readonly opencode_zen: "opencode_zen";
178
- readonly orcarouter: "orcarouter";
179
- readonly ovhcloud: "ovhcloud";
180
- readonly parasail: "parasail";
181
- readonly perfxcloud: "perfxcloud";
182
- readonly perplexity: "perplexity";
183
- readonly perplexity_agent: "perplexity_agent";
184
- readonly petals: "petals";
185
- readonly pinstripes: "pinstripes";
186
- readonly pioneer: "pioneer";
187
- readonly poe: "poe";
188
- readonly poolside: "poolside";
189
- readonly portkey: "portkey";
190
- readonly ppinfra: "ppinfra";
191
- readonly predibase: "predibase";
192
- readonly privatemode_ai: "privatemode_ai";
193
- readonly publicai: "publicai";
194
- readonly qihang_ai: "qihang_ai";
195
- readonly qihoo360: "qihoo360";
196
- readonly qiniu_ai: "qiniu_ai";
197
- readonly regolo_ai: "regolo_ai";
198
- readonly reka_ai: "reka_ai";
199
- readonly requesty: "requesty";
200
- readonly reve: "reve";
201
- readonly routing_run: "routing_run";
202
- readonly sakana: "sakana";
203
- readonly sambanova: "sambanova";
204
- readonly sarvam: "sarvam";
205
- readonly scaleway: "scaleway";
206
- readonly scx_ai: "scx_ai";
207
- readonly siliconflow: "siliconflow";
208
- readonly snowflake: "snowflake";
209
- readonly snowflake_cortex: "snowflake_cortex";
210
- readonly stackit: "stackit";
211
- readonly stepfun: "stepfun";
212
- readonly stepfun_ai_step_plan: "stepfun_ai_step_plan";
213
- readonly stepfun_step_plan: "stepfun_step_plan";
214
- readonly subconscious: "subconscious";
215
- readonly submodel: "submodel";
216
- readonly synthetic: "synthetic";
217
- readonly tencent: "tencent";
218
- readonly tencent_coding_plan: "tencent_coding_plan";
219
- readonly tencent_token_plan: "tencent_token_plan";
220
- readonly tencent_token_plan_enterprise_auto: "tencent_token_plan_enterprise_auto";
221
- readonly tencent_token_plan_enterprise_pro: "tencent_token_plan_enterprise_pro";
222
- readonly tencent_token_plan_general_personal: "tencent_token_plan_general_personal";
223
- readonly tencent_token_plan_hy_personal: "tencent_token_plan_hy_personal";
224
- readonly tencent_tokenhub: "tencent_tokenhub";
225
- readonly tensormesh: "tensormesh";
226
- readonly the_grid_ai: "the_grid_ai";
227
- readonly thinkingmachines: "thinkingmachines";
228
- readonly tinfoil: "tinfoil";
229
- readonly togetherai: "togetherai";
230
- readonly tokenflux: "tokenflux";
231
- readonly tokenpony: "tokenpony";
232
- readonly trustedrouter: "trustedrouter";
233
- readonly tundra: "tundra";
234
- readonly umans_ai: "umans_ai";
235
- readonly unorouter: "unorouter";
236
- readonly upstage: "upstage";
237
- readonly v0: "v0";
238
- readonly venice: "venice";
239
- readonly vercel: "vercel";
240
- readonly vivgrid: "vivgrid";
241
- readonly volc_engine: "volc_engine";
242
- readonly vultr: "vultr";
243
- readonly wafer: "wafer";
244
- readonly wandb: "wandb";
245
- readonly xiaomi_token_plan_ams: "xiaomi_token_plan_ams";
246
- readonly xiaomi_token_plan_cn: "xiaomi_token_plan_cn";
247
- readonly xiaomi_token_plan_sgp: "xiaomi_token_plan_sgp";
248
- readonly xiaomimimo: "xiaomimimo";
249
- readonly xpersona: "xpersona";
250
- readonly xunfei: "xunfei";
251
- readonly zai: "zai";
252
- readonly zai_coding_plan: "zai_coding_plan";
253
- readonly zeldoc: "zeldoc";
254
- readonly zenmux: "zenmux";
255
- readonly zhipu_v4: "zhipu_v4";
256
- readonly zhipuai_coding_plan: "zhipuai_coding_plan";
257
- };
258
- export type ProviderName = typeof ProviderName[keyof typeof ProviderName];