@hebo-ai/gateway 0.9.1 → 0.9.2

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 (212) hide show
  1. package/README.md +82 -4
  2. package/package.json +31 -31
  3. package/dist/config.d.ts +0 -2
  4. package/dist/config.js +0 -111
  5. package/dist/endpoints/chat-completions/converters.d.ts +0 -26
  6. package/dist/endpoints/chat-completions/converters.js +0 -524
  7. package/dist/endpoints/chat-completions/handler.d.ts +0 -2
  8. package/dist/endpoints/chat-completions/handler.js +0 -149
  9. package/dist/endpoints/chat-completions/index.d.ts +0 -4
  10. package/dist/endpoints/chat-completions/index.js +0 -4
  11. package/dist/endpoints/chat-completions/otel.d.ts +0 -5
  12. package/dist/endpoints/chat-completions/otel.js +0 -175
  13. package/dist/endpoints/chat-completions/schema.d.ts +0 -1170
  14. package/dist/endpoints/chat-completions/schema.js +0 -252
  15. package/dist/endpoints/conversations/converters.d.ts +0 -8
  16. package/dist/endpoints/conversations/converters.js +0 -29
  17. package/dist/endpoints/conversations/handler.d.ts +0 -2
  18. package/dist/endpoints/conversations/handler.js +0 -276
  19. package/dist/endpoints/conversations/index.d.ts +0 -3
  20. package/dist/endpoints/conversations/index.js +0 -3
  21. package/dist/endpoints/conversations/schema.d.ts +0 -1511
  22. package/dist/endpoints/conversations/schema.js +0 -74
  23. package/dist/endpoints/conversations/storage/dialects/greptime.d.ts +0 -10
  24. package/dist/endpoints/conversations/storage/dialects/greptime.js +0 -87
  25. package/dist/endpoints/conversations/storage/dialects/mysql.d.ts +0 -12
  26. package/dist/endpoints/conversations/storage/dialects/mysql.js +0 -118
  27. package/dist/endpoints/conversations/storage/dialects/postgres.d.ts +0 -16
  28. package/dist/endpoints/conversations/storage/dialects/postgres.js +0 -185
  29. package/dist/endpoints/conversations/storage/dialects/sqlite.d.ts +0 -11
  30. package/dist/endpoints/conversations/storage/dialects/sqlite.js +0 -176
  31. package/dist/endpoints/conversations/storage/dialects/types.d.ts +0 -42
  32. package/dist/endpoints/conversations/storage/dialects/types.js +0 -0
  33. package/dist/endpoints/conversations/storage/dialects/utils.d.ts +0 -25
  34. package/dist/endpoints/conversations/storage/dialects/utils.js +0 -80
  35. package/dist/endpoints/conversations/storage/memory.d.ts +0 -25
  36. package/dist/endpoints/conversations/storage/memory.js +0 -200
  37. package/dist/endpoints/conversations/storage/sql.d.ts +0 -33
  38. package/dist/endpoints/conversations/storage/sql.js +0 -278
  39. package/dist/endpoints/conversations/storage/types.d.ts +0 -39
  40. package/dist/endpoints/conversations/storage/types.js +0 -0
  41. package/dist/endpoints/embeddings/converters.d.ts +0 -10
  42. package/dist/endpoints/embeddings/converters.js +0 -31
  43. package/dist/endpoints/embeddings/handler.d.ts +0 -2
  44. package/dist/endpoints/embeddings/handler.js +0 -104
  45. package/dist/endpoints/embeddings/index.d.ts +0 -4
  46. package/dist/endpoints/embeddings/index.js +0 -4
  47. package/dist/endpoints/embeddings/otel.d.ts +0 -5
  48. package/dist/endpoints/embeddings/otel.js +0 -29
  49. package/dist/endpoints/embeddings/schema.d.ts +0 -44
  50. package/dist/endpoints/embeddings/schema.js +0 -29
  51. package/dist/endpoints/models/converters.d.ts +0 -6
  52. package/dist/endpoints/models/converters.js +0 -42
  53. package/dist/endpoints/models/handler.d.ts +0 -2
  54. package/dist/endpoints/models/handler.js +0 -29
  55. package/dist/endpoints/models/index.d.ts +0 -3
  56. package/dist/endpoints/models/index.js +0 -3
  57. package/dist/endpoints/models/schema.d.ts +0 -42
  58. package/dist/endpoints/models/schema.js +0 -31
  59. package/dist/endpoints/responses/converters.d.ts +0 -17
  60. package/dist/endpoints/responses/converters.js +0 -1034
  61. package/dist/endpoints/responses/handler.d.ts +0 -2
  62. package/dist/endpoints/responses/handler.js +0 -137
  63. package/dist/endpoints/responses/index.d.ts +0 -4
  64. package/dist/endpoints/responses/index.js +0 -4
  65. package/dist/endpoints/responses/otel.d.ts +0 -6
  66. package/dist/endpoints/responses/otel.js +0 -221
  67. package/dist/endpoints/responses/schema.d.ts +0 -2109
  68. package/dist/endpoints/responses/schema.js +0 -314
  69. package/dist/endpoints/shared/converters.d.ts +0 -56
  70. package/dist/endpoints/shared/converters.js +0 -179
  71. package/dist/endpoints/shared/schema.d.ts +0 -70
  72. package/dist/endpoints/shared/schema.js +0 -46
  73. package/dist/errors/ai-sdk.d.ts +0 -2
  74. package/dist/errors/ai-sdk.js +0 -52
  75. package/dist/errors/gateway.d.ts +0 -5
  76. package/dist/errors/gateway.js +0 -13
  77. package/dist/errors/openai.d.ts +0 -15
  78. package/dist/errors/openai.js +0 -40
  79. package/dist/errors/utils.d.ts +0 -22
  80. package/dist/errors/utils.js +0 -44
  81. package/dist/gateway.d.ts +0 -11
  82. package/dist/gateway.js +0 -44
  83. package/dist/index.d.ts +0 -11
  84. package/dist/index.js +0 -10
  85. package/dist/lifecycle.d.ts +0 -3
  86. package/dist/lifecycle.js +0 -113
  87. package/dist/logger/default.d.ts +0 -4
  88. package/dist/logger/default.js +0 -81
  89. package/dist/logger/index.d.ts +0 -11
  90. package/dist/logger/index.js +0 -25
  91. package/dist/middleware/common.d.ts +0 -12
  92. package/dist/middleware/common.js +0 -146
  93. package/dist/middleware/debug.d.ts +0 -3
  94. package/dist/middleware/debug.js +0 -27
  95. package/dist/middleware/matcher.d.ts +0 -28
  96. package/dist/middleware/matcher.js +0 -118
  97. package/dist/middleware/utils.d.ts +0 -2
  98. package/dist/middleware/utils.js +0 -24
  99. package/dist/models/amazon/index.d.ts +0 -2
  100. package/dist/models/amazon/index.js +0 -2
  101. package/dist/models/amazon/middleware.d.ts +0 -3
  102. package/dist/models/amazon/middleware.js +0 -68
  103. package/dist/models/amazon/presets.d.ts +0 -345
  104. package/dist/models/amazon/presets.js +0 -80
  105. package/dist/models/anthropic/index.d.ts +0 -2
  106. package/dist/models/anthropic/index.js +0 -2
  107. package/dist/models/anthropic/middleware.d.ts +0 -5
  108. package/dist/models/anthropic/middleware.js +0 -127
  109. package/dist/models/anthropic/presets.d.ts +0 -711
  110. package/dist/models/anthropic/presets.js +0 -140
  111. package/dist/models/catalog.d.ts +0 -4
  112. package/dist/models/catalog.js +0 -8
  113. package/dist/models/cohere/index.d.ts +0 -2
  114. package/dist/models/cohere/index.js +0 -2
  115. package/dist/models/cohere/middleware.d.ts +0 -3
  116. package/dist/models/cohere/middleware.js +0 -62
  117. package/dist/models/cohere/presets.d.ts +0 -411
  118. package/dist/models/cohere/presets.js +0 -134
  119. package/dist/models/google/index.d.ts +0 -2
  120. package/dist/models/google/index.js +0 -2
  121. package/dist/models/google/middleware.d.ts +0 -8
  122. package/dist/models/google/middleware.js +0 -117
  123. package/dist/models/google/presets.d.ts +0 -403
  124. package/dist/models/google/presets.js +0 -88
  125. package/dist/models/meta/index.d.ts +0 -1
  126. package/dist/models/meta/index.js +0 -1
  127. package/dist/models/meta/presets.d.ts +0 -483
  128. package/dist/models/meta/presets.js +0 -105
  129. package/dist/models/openai/index.d.ts +0 -2
  130. package/dist/models/openai/index.js +0 -2
  131. package/dist/models/openai/middleware.d.ts +0 -4
  132. package/dist/models/openai/middleware.js +0 -88
  133. package/dist/models/openai/presets.d.ts +0 -1319
  134. package/dist/models/openai/presets.js +0 -277
  135. package/dist/models/types.d.ts +0 -20
  136. package/dist/models/types.js +0 -92
  137. package/dist/models/voyage/index.d.ts +0 -2
  138. package/dist/models/voyage/index.js +0 -2
  139. package/dist/models/voyage/middleware.d.ts +0 -2
  140. package/dist/models/voyage/middleware.js +0 -19
  141. package/dist/models/voyage/presets.d.ts +0 -436
  142. package/dist/models/voyage/presets.js +0 -85
  143. package/dist/providers/anthropic/canonical.d.ts +0 -3
  144. package/dist/providers/anthropic/canonical.js +0 -9
  145. package/dist/providers/anthropic/index.d.ts +0 -1
  146. package/dist/providers/anthropic/index.js +0 -1
  147. package/dist/providers/bedrock/canonical.d.ts +0 -17
  148. package/dist/providers/bedrock/canonical.js +0 -61
  149. package/dist/providers/bedrock/index.d.ts +0 -2
  150. package/dist/providers/bedrock/index.js +0 -2
  151. package/dist/providers/bedrock/middleware.d.ts +0 -5
  152. package/dist/providers/bedrock/middleware.js +0 -137
  153. package/dist/providers/cohere/canonical.d.ts +0 -3
  154. package/dist/providers/cohere/canonical.js +0 -17
  155. package/dist/providers/cohere/index.d.ts +0 -1
  156. package/dist/providers/cohere/index.js +0 -1
  157. package/dist/providers/groq/canonical.d.ts +0 -3
  158. package/dist/providers/groq/canonical.js +0 -12
  159. package/dist/providers/groq/index.d.ts +0 -2
  160. package/dist/providers/groq/index.js +0 -2
  161. package/dist/providers/groq/middleware.d.ts +0 -2
  162. package/dist/providers/groq/middleware.js +0 -31
  163. package/dist/providers/openai/canonical.d.ts +0 -3
  164. package/dist/providers/openai/canonical.js +0 -8
  165. package/dist/providers/openai/index.d.ts +0 -1
  166. package/dist/providers/openai/index.js +0 -1
  167. package/dist/providers/registry.d.ts +0 -24
  168. package/dist/providers/registry.js +0 -103
  169. package/dist/providers/types.d.ts +0 -7
  170. package/dist/providers/types.js +0 -11
  171. package/dist/providers/vertex/canonical.d.ts +0 -3
  172. package/dist/providers/vertex/canonical.js +0 -8
  173. package/dist/providers/vertex/index.d.ts +0 -2
  174. package/dist/providers/vertex/index.js +0 -2
  175. package/dist/providers/vertex/middleware.d.ts +0 -2
  176. package/dist/providers/vertex/middleware.js +0 -47
  177. package/dist/providers/voyage/canonical.d.ts +0 -3
  178. package/dist/providers/voyage/canonical.js +0 -7
  179. package/dist/providers/voyage/index.d.ts +0 -1
  180. package/dist/providers/voyage/index.js +0 -1
  181. package/dist/telemetry/ai-sdk.d.ts +0 -2
  182. package/dist/telemetry/ai-sdk.js +0 -31
  183. package/dist/telemetry/baggage.d.ts +0 -1
  184. package/dist/telemetry/baggage.js +0 -24
  185. package/dist/telemetry/fetch.d.ts +0 -2
  186. package/dist/telemetry/fetch.js +0 -49
  187. package/dist/telemetry/gen-ai.d.ts +0 -6
  188. package/dist/telemetry/gen-ai.js +0 -78
  189. package/dist/telemetry/http.d.ts +0 -3
  190. package/dist/telemetry/http.js +0 -54
  191. package/dist/telemetry/index.d.ts +0 -1
  192. package/dist/telemetry/index.js +0 -1
  193. package/dist/telemetry/memory.d.ts +0 -2
  194. package/dist/telemetry/memory.js +0 -43
  195. package/dist/telemetry/span.d.ts +0 -13
  196. package/dist/telemetry/span.js +0 -60
  197. package/dist/types.d.ts +0 -216
  198. package/dist/types.js +0 -2
  199. package/dist/utils/env.d.ts +0 -2
  200. package/dist/utils/env.js +0 -7
  201. package/dist/utils/headers.d.ts +0 -4
  202. package/dist/utils/headers.js +0 -22
  203. package/dist/utils/preset.d.ts +0 -10
  204. package/dist/utils/preset.js +0 -41
  205. package/dist/utils/request.d.ts +0 -2
  206. package/dist/utils/request.js +0 -43
  207. package/dist/utils/response.d.ts +0 -6
  208. package/dist/utils/response.js +0 -55
  209. package/dist/utils/stream.d.ts +0 -9
  210. package/dist/utils/stream.js +0 -100
  211. package/dist/utils/url.d.ts +0 -4
  212. package/dist/utils/url.js +0 -21
@@ -1,436 +0,0 @@
1
- import type { CatalogModel } from "../types";
2
- export declare const voyage2Code: import("../../utils/preset").Preset<"voyage/voyage-2-code", CatalogModel, {
3
- name: string;
4
- created: string;
5
- context: number;
6
- modalities: {
7
- input: readonly ["text"];
8
- output: readonly ["embedding"];
9
- };
10
- providers: readonly ["voyage"];
11
- }>;
12
- export declare const voyage2Finance: import("../../utils/preset").Preset<"voyage/voyage-2-finance", CatalogModel, {
13
- name: string;
14
- created: string;
15
- context: number;
16
- modalities: {
17
- input: readonly ["text"];
18
- output: readonly ["embedding"];
19
- };
20
- providers: readonly ["voyage"];
21
- }>;
22
- export declare const voyage2Law: import("../../utils/preset").Preset<"voyage/voyage-2-law", CatalogModel, {
23
- name: string;
24
- created: string;
25
- context: number;
26
- modalities: {
27
- input: readonly ["text"];
28
- output: readonly ["embedding"];
29
- };
30
- providers: readonly ["voyage"];
31
- }>;
32
- export declare const voyage3Code: import("../../utils/preset").Preset<"voyage/voyage-3-code", CatalogModel, {
33
- name: string;
34
- created: string;
35
- context: number;
36
- modalities: {
37
- input: readonly ["text"];
38
- output: readonly ["embedding"];
39
- };
40
- providers: readonly ["voyage"];
41
- }>;
42
- export declare const voyage3Large: import("../../utils/preset").Preset<"voyage/voyage-3-large", CatalogModel, {
43
- name: string;
44
- created: string;
45
- context: number;
46
- modalities: {
47
- input: readonly ["text"];
48
- output: readonly ["embedding"];
49
- };
50
- providers: readonly ["voyage"];
51
- }>;
52
- export declare const voyage35: import("../../utils/preset").Preset<"voyage/voyage-3.5", CatalogModel, {
53
- name: string;
54
- created: string;
55
- context: number;
56
- modalities: {
57
- input: readonly ["text"];
58
- output: readonly ["embedding"];
59
- };
60
- providers: readonly ["voyage"];
61
- }>;
62
- export declare const voyage35Lite: import("../../utils/preset").Preset<"voyage/voyage-3.5-lite", CatalogModel, {
63
- name: string;
64
- created: string;
65
- context: number;
66
- modalities: {
67
- input: readonly ["text"];
68
- output: readonly ["embedding"];
69
- };
70
- providers: readonly ["voyage"];
71
- }>;
72
- export declare const voyage4Lite: import("../../utils/preset").Preset<"voyage/voyage-4-lite", CatalogModel, {
73
- name: string;
74
- created: string;
75
- context: number;
76
- modalities: {
77
- input: readonly ["text"];
78
- output: readonly ["embedding"];
79
- };
80
- providers: readonly ["voyage"];
81
- }>;
82
- export declare const voyage4: import("../../utils/preset").Preset<"voyage/voyage-4", CatalogModel, {
83
- name: string;
84
- created: string;
85
- context: number;
86
- modalities: {
87
- input: readonly ["text"];
88
- output: readonly ["embedding"];
89
- };
90
- providers: readonly ["voyage"];
91
- }>;
92
- export declare const voyage4Large: import("../../utils/preset").Preset<"voyage/voyage-4-large", CatalogModel, {
93
- name: string;
94
- created: string;
95
- context: number;
96
- modalities: {
97
- input: readonly ["text"];
98
- output: readonly ["embedding"];
99
- };
100
- providers: readonly ["voyage"];
101
- }>;
102
- export declare const voyage: {
103
- readonly latest: readonly [import("../../utils/preset").Preset<"voyage/voyage-2-finance", CatalogModel, {
104
- name: string;
105
- created: string;
106
- context: number;
107
- modalities: {
108
- input: readonly ["text"];
109
- output: readonly ["embedding"];
110
- };
111
- providers: readonly ["voyage"];
112
- }>, import("../../utils/preset").Preset<"voyage/voyage-2-law", CatalogModel, {
113
- name: string;
114
- created: string;
115
- context: number;
116
- modalities: {
117
- input: readonly ["text"];
118
- output: readonly ["embedding"];
119
- };
120
- providers: readonly ["voyage"];
121
- }>, import("../../utils/preset").Preset<"voyage/voyage-3-code", CatalogModel, {
122
- name: string;
123
- created: string;
124
- context: number;
125
- modalities: {
126
- input: readonly ["text"];
127
- output: readonly ["embedding"];
128
- };
129
- providers: readonly ["voyage"];
130
- }>, import("../../utils/preset").Preset<"voyage/voyage-4-lite", CatalogModel, {
131
- name: string;
132
- created: string;
133
- context: number;
134
- modalities: {
135
- input: readonly ["text"];
136
- output: readonly ["embedding"];
137
- };
138
- providers: readonly ["voyage"];
139
- }>, import("../../utils/preset").Preset<"voyage/voyage-4", CatalogModel, {
140
- name: string;
141
- created: string;
142
- context: number;
143
- modalities: {
144
- input: readonly ["text"];
145
- output: readonly ["embedding"];
146
- };
147
- providers: readonly ["voyage"];
148
- }>, import("../../utils/preset").Preset<"voyage/voyage-4-large", CatalogModel, {
149
- name: string;
150
- created: string;
151
- context: number;
152
- modalities: {
153
- input: readonly ["text"];
154
- output: readonly ["embedding"];
155
- };
156
- providers: readonly ["voyage"];
157
- }>];
158
- readonly all: (import("../../utils/preset").Preset<"voyage/voyage-2-code", CatalogModel, {
159
- name: string;
160
- created: string;
161
- context: number;
162
- modalities: {
163
- input: readonly ["text"];
164
- output: readonly ["embedding"];
165
- };
166
- providers: readonly ["voyage"];
167
- }> | import("../../utils/preset").Preset<"voyage/voyage-2-finance", CatalogModel, {
168
- name: string;
169
- created: string;
170
- context: number;
171
- modalities: {
172
- input: readonly ["text"];
173
- output: readonly ["embedding"];
174
- };
175
- providers: readonly ["voyage"];
176
- }> | import("../../utils/preset").Preset<"voyage/voyage-2-law", CatalogModel, {
177
- name: string;
178
- created: string;
179
- context: number;
180
- modalities: {
181
- input: readonly ["text"];
182
- output: readonly ["embedding"];
183
- };
184
- providers: readonly ["voyage"];
185
- }> | import("../../utils/preset").Preset<"voyage/voyage-3-code", CatalogModel, {
186
- name: string;
187
- created: string;
188
- context: number;
189
- modalities: {
190
- input: readonly ["text"];
191
- output: readonly ["embedding"];
192
- };
193
- providers: readonly ["voyage"];
194
- }> | import("../../utils/preset").Preset<"voyage/voyage-3-large", CatalogModel, {
195
- name: string;
196
- created: string;
197
- context: number;
198
- modalities: {
199
- input: readonly ["text"];
200
- output: readonly ["embedding"];
201
- };
202
- providers: readonly ["voyage"];
203
- }> | import("../../utils/preset").Preset<"voyage/voyage-3.5", CatalogModel, {
204
- name: string;
205
- created: string;
206
- context: number;
207
- modalities: {
208
- input: readonly ["text"];
209
- output: readonly ["embedding"];
210
- };
211
- providers: readonly ["voyage"];
212
- }> | import("../../utils/preset").Preset<"voyage/voyage-3.5-lite", CatalogModel, {
213
- name: string;
214
- created: string;
215
- context: number;
216
- modalities: {
217
- input: readonly ["text"];
218
- output: readonly ["embedding"];
219
- };
220
- providers: readonly ["voyage"];
221
- }> | import("../../utils/preset").Preset<"voyage/voyage-4-lite", CatalogModel, {
222
- name: string;
223
- created: string;
224
- context: number;
225
- modalities: {
226
- input: readonly ["text"];
227
- output: readonly ["embedding"];
228
- };
229
- providers: readonly ["voyage"];
230
- }> | import("../../utils/preset").Preset<"voyage/voyage-4", CatalogModel, {
231
- name: string;
232
- created: string;
233
- context: number;
234
- modalities: {
235
- input: readonly ["text"];
236
- output: readonly ["embedding"];
237
- };
238
- providers: readonly ["voyage"];
239
- }> | import("../../utils/preset").Preset<"voyage/voyage-4-large", CatalogModel, {
240
- name: string;
241
- created: string;
242
- context: number;
243
- modalities: {
244
- input: readonly ["text"];
245
- output: readonly ["embedding"];
246
- };
247
- providers: readonly ["voyage"];
248
- }>)[];
249
- readonly "v2.x": readonly [import("../../utils/preset").Preset<"voyage/voyage-2-code", CatalogModel, {
250
- name: string;
251
- created: string;
252
- context: number;
253
- modalities: {
254
- input: readonly ["text"];
255
- output: readonly ["embedding"];
256
- };
257
- providers: readonly ["voyage"];
258
- }>, import("../../utils/preset").Preset<"voyage/voyage-2-finance", CatalogModel, {
259
- name: string;
260
- created: string;
261
- context: number;
262
- modalities: {
263
- input: readonly ["text"];
264
- output: readonly ["embedding"];
265
- };
266
- providers: readonly ["voyage"];
267
- }>, import("../../utils/preset").Preset<"voyage/voyage-2-law", CatalogModel, {
268
- name: string;
269
- created: string;
270
- context: number;
271
- modalities: {
272
- input: readonly ["text"];
273
- output: readonly ["embedding"];
274
- };
275
- providers: readonly ["voyage"];
276
- }>];
277
- readonly "v3.x": readonly [import("../../utils/preset").Preset<"voyage/voyage-3-code", CatalogModel, {
278
- name: string;
279
- created: string;
280
- context: number;
281
- modalities: {
282
- input: readonly ["text"];
283
- output: readonly ["embedding"];
284
- };
285
- providers: readonly ["voyage"];
286
- }>, import("../../utils/preset").Preset<"voyage/voyage-3-large", CatalogModel, {
287
- name: string;
288
- created: string;
289
- context: number;
290
- modalities: {
291
- input: readonly ["text"];
292
- output: readonly ["embedding"];
293
- };
294
- providers: readonly ["voyage"];
295
- }>, import("../../utils/preset").Preset<"voyage/voyage-3.5", CatalogModel, {
296
- name: string;
297
- created: string;
298
- context: number;
299
- modalities: {
300
- input: readonly ["text"];
301
- output: readonly ["embedding"];
302
- };
303
- providers: readonly ["voyage"];
304
- }>, import("../../utils/preset").Preset<"voyage/voyage-3.5-lite", CatalogModel, {
305
- name: string;
306
- created: string;
307
- context: number;
308
- modalities: {
309
- input: readonly ["text"];
310
- output: readonly ["embedding"];
311
- };
312
- providers: readonly ["voyage"];
313
- }>];
314
- readonly "v4.x": readonly [import("../../utils/preset").Preset<"voyage/voyage-4-lite", CatalogModel, {
315
- name: string;
316
- created: string;
317
- context: number;
318
- modalities: {
319
- input: readonly ["text"];
320
- output: readonly ["embedding"];
321
- };
322
- providers: readonly ["voyage"];
323
- }>, import("../../utils/preset").Preset<"voyage/voyage-4", CatalogModel, {
324
- name: string;
325
- created: string;
326
- context: number;
327
- modalities: {
328
- input: readonly ["text"];
329
- output: readonly ["embedding"];
330
- };
331
- providers: readonly ["voyage"];
332
- }>, import("../../utils/preset").Preset<"voyage/voyage-4-large", CatalogModel, {
333
- name: string;
334
- created: string;
335
- context: number;
336
- modalities: {
337
- input: readonly ["text"];
338
- output: readonly ["embedding"];
339
- };
340
- providers: readonly ["voyage"];
341
- }>];
342
- readonly v2: readonly [import("../../utils/preset").Preset<"voyage/voyage-2-code", CatalogModel, {
343
- name: string;
344
- created: string;
345
- context: number;
346
- modalities: {
347
- input: readonly ["text"];
348
- output: readonly ["embedding"];
349
- };
350
- providers: readonly ["voyage"];
351
- }>, import("../../utils/preset").Preset<"voyage/voyage-2-finance", CatalogModel, {
352
- name: string;
353
- created: string;
354
- context: number;
355
- modalities: {
356
- input: readonly ["text"];
357
- output: readonly ["embedding"];
358
- };
359
- providers: readonly ["voyage"];
360
- }>, import("../../utils/preset").Preset<"voyage/voyage-2-law", CatalogModel, {
361
- name: string;
362
- created: string;
363
- context: number;
364
- modalities: {
365
- input: readonly ["text"];
366
- output: readonly ["embedding"];
367
- };
368
- providers: readonly ["voyage"];
369
- }>];
370
- readonly v3: readonly [import("../../utils/preset").Preset<"voyage/voyage-3-code", CatalogModel, {
371
- name: string;
372
- created: string;
373
- context: number;
374
- modalities: {
375
- input: readonly ["text"];
376
- output: readonly ["embedding"];
377
- };
378
- providers: readonly ["voyage"];
379
- }>, import("../../utils/preset").Preset<"voyage/voyage-3-large", CatalogModel, {
380
- name: string;
381
- created: string;
382
- context: number;
383
- modalities: {
384
- input: readonly ["text"];
385
- output: readonly ["embedding"];
386
- };
387
- providers: readonly ["voyage"];
388
- }>];
389
- readonly "v3.5": readonly [import("../../utils/preset").Preset<"voyage/voyage-3.5", CatalogModel, {
390
- name: string;
391
- created: string;
392
- context: number;
393
- modalities: {
394
- input: readonly ["text"];
395
- output: readonly ["embedding"];
396
- };
397
- providers: readonly ["voyage"];
398
- }>, import("../../utils/preset").Preset<"voyage/voyage-3.5-lite", CatalogModel, {
399
- name: string;
400
- created: string;
401
- context: number;
402
- modalities: {
403
- input: readonly ["text"];
404
- output: readonly ["embedding"];
405
- };
406
- providers: readonly ["voyage"];
407
- }>];
408
- readonly v4: readonly [import("../../utils/preset").Preset<"voyage/voyage-4-lite", CatalogModel, {
409
- name: string;
410
- created: string;
411
- context: number;
412
- modalities: {
413
- input: readonly ["text"];
414
- output: readonly ["embedding"];
415
- };
416
- providers: readonly ["voyage"];
417
- }>, import("../../utils/preset").Preset<"voyage/voyage-4", CatalogModel, {
418
- name: string;
419
- created: string;
420
- context: number;
421
- modalities: {
422
- input: readonly ["text"];
423
- output: readonly ["embedding"];
424
- };
425
- providers: readonly ["voyage"];
426
- }>, import("../../utils/preset").Preset<"voyage/voyage-4-large", CatalogModel, {
427
- name: string;
428
- created: string;
429
- context: number;
430
- modalities: {
431
- input: readonly ["text"];
432
- output: readonly ["embedding"];
433
- };
434
- providers: readonly ["voyage"];
435
- }>];
436
- };
@@ -1,85 +0,0 @@
1
- import { presetFor } from "../../utils/preset";
2
- const VOYAGE_BASE = {
3
- modalities: {
4
- input: ["text"],
5
- output: ["embedding"],
6
- },
7
- providers: ["voyage"],
8
- };
9
- export const voyage2Code = presetFor()("voyage/voyage-2-code", {
10
- ...VOYAGE_BASE,
11
- name: "Voyage 2 Code",
12
- created: "2024-01-23",
13
- context: 16000,
14
- });
15
- export const voyage2Finance = presetFor()("voyage/voyage-2-finance", {
16
- ...VOYAGE_BASE,
17
- name: "Voyage 2 Finance",
18
- created: "2024-06-03",
19
- context: 32000,
20
- });
21
- export const voyage2Law = presetFor()("voyage/voyage-2-law", {
22
- ...VOYAGE_BASE,
23
- name: "Voyage 2 Law",
24
- created: "2024-04-15",
25
- context: 16000,
26
- });
27
- export const voyage3Code = presetFor()("voyage/voyage-3-code", {
28
- ...VOYAGE_BASE,
29
- name: "Voyage 3 Code",
30
- created: "2024-12-04",
31
- context: 32000,
32
- });
33
- export const voyage3Large = presetFor()("voyage/voyage-3-large", {
34
- ...VOYAGE_BASE,
35
- name: "Voyage 3 Large",
36
- created: "2025-01-07",
37
- context: 32000,
38
- });
39
- export const voyage35 = presetFor()("voyage/voyage-3.5", {
40
- ...VOYAGE_BASE,
41
- name: "Voyage 3.5",
42
- created: "2025-05-20",
43
- context: 32000,
44
- });
45
- export const voyage35Lite = presetFor()("voyage/voyage-3.5-lite", {
46
- ...VOYAGE_BASE,
47
- name: "Voyage 3.5 Lite",
48
- created: "2025-05-20",
49
- context: 32000,
50
- });
51
- export const voyage4Lite = presetFor()("voyage/voyage-4-lite", {
52
- ...VOYAGE_BASE,
53
- name: "Voyage 4 Lite",
54
- created: "2026-01-15",
55
- context: 32000,
56
- });
57
- export const voyage4 = presetFor()("voyage/voyage-4", {
58
- ...VOYAGE_BASE,
59
- name: "Voyage 4",
60
- created: "2026-01-15",
61
- context: 32000,
62
- });
63
- export const voyage4Large = presetFor()("voyage/voyage-4-large", {
64
- ...VOYAGE_BASE,
65
- name: "Voyage 4 Large",
66
- created: "2026-01-15",
67
- context: 32000,
68
- });
69
- const voyageAtomic = {
70
- v2: [voyage2Code, voyage2Finance, voyage2Law],
71
- v3: [voyage3Code, voyage3Large],
72
- "v3.5": [voyage35, voyage35Lite],
73
- v4: [voyage4Lite, voyage4, voyage4Large],
74
- };
75
- const voyageGroups = {
76
- "v2.x": [...voyageAtomic["v2"]],
77
- "v3.x": [...voyageAtomic["v3"], ...voyageAtomic["v3.5"]],
78
- "v4.x": [...voyageAtomic["v4"]],
79
- };
80
- export const voyage = {
81
- ...voyageAtomic,
82
- ...voyageGroups,
83
- latest: [voyage2Finance, voyage2Law, voyage3Code, voyage4Lite, voyage4, voyage4Large],
84
- all: Object.values(voyageAtomic).flat(),
85
- };
@@ -1,3 +0,0 @@
1
- import { type AnthropicProvider } from "@ai-sdk/anthropic";
2
- import type { ModelId } from "../../models/types";
3
- export declare const withCanonicalIdsForAnthropic: (provider: AnthropicProvider, extraMapping?: Record<ModelId, string>) => import("@ai-sdk/provider").ProviderV3;
@@ -1,9 +0,0 @@
1
- import {} from "@ai-sdk/anthropic";
2
- import { withCanonicalIds } from "../registry";
3
- export const withCanonicalIdsForAnthropic = (provider, extraMapping) => withCanonicalIds(provider, {
4
- mapping: extraMapping,
5
- options: {
6
- stripNamespace: true,
7
- normalizeDelimiters: true,
8
- },
9
- });
@@ -1 +0,0 @@
1
- export * from "./canonical";
@@ -1 +0,0 @@
1
- export * from "./canonical";
@@ -1,17 +0,0 @@
1
- import { type AmazonBedrockProvider } from "@ai-sdk/amazon-bedrock";
2
- import type { ModelId } from "../../models/types";
3
- export type BedrockInferenceProfileOptions = {
4
- /** @default "preferred" */
5
- mode?: "preferred" | "avoid";
6
- /** @default "us" */
7
- geo?: "global" | "us" | "eu" | "apac" | "au" | "ca" | "jp" | "us-gov" | (string & {});
8
- arn?: {
9
- region: string;
10
- accountId: string;
11
- };
12
- };
13
- export type BedrockCanonicalConfig = {
14
- inferenceProfile?: BedrockInferenceProfileOptions;
15
- extraMapping?: Record<ModelId, string>;
16
- };
17
- export declare const withCanonicalIdsForBedrock: (provider: AmazonBedrockProvider, config?: BedrockCanonicalConfig) => import("@ai-sdk/provider").ProviderV3;
@@ -1,61 +0,0 @@
1
- import {} from "@ai-sdk/amazon-bedrock";
2
- import { withCanonicalIds } from "../registry";
3
- // For a list of all models with their IDs and InferenceTypes check:
4
- // https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html
5
- // OR
6
- // aws bedrock list-foundation-models --region us-east-1 \
7
- // --query "modelSummaries[].{id:modelId,mode:join(',', inferenceTypesSupported)}" \
8
- // --output table
9
- const MAPPING = {
10
- // Require Inference Profiles and can't be resolved from standard name mapping
11
- "anthropic/claude-haiku-4.5": "{ip}anthropic.claude-haiku-4-5-20251001-v1:0",
12
- "anthropic/claude-sonnet-4.6": "{ip}anthropic.claude-sonnet-4-6",
13
- "anthropic/claude-sonnet-4.5": "{ip}anthropic.claude-sonnet-4-5-20250929-v1:0",
14
- "anthropic/claude-opus-4.6": "{ip}anthropic.claude-opus-4-6-v1",
15
- "anthropic/claude-opus-4.5": "{ip}anthropic.claude-opus-4-5-20251101-v1:0",
16
- "anthropic/claude-opus-4.1": "{ip}anthropic.claude-opus-4-1-20250805-v1:0",
17
- "anthropic/claude-sonnet-4": "{ip}anthropic.claude-sonnet-4-20250514-v1:0",
18
- "anthropic/claude-opus-4": "{ip}anthropic.claude-opus-4-20250514-v1:0",
19
- "anthropic/claude-sonnet-3.7": "{ip}anthropic.claude-3-7-sonnet-20250219-v1:0",
20
- "anthropic/claude-sonnet-3.5": "{ip}anthropic.claude-3-5-sonnet-20241022-v2:0",
21
- "anthropic/claude-haiku-3.5": "{ip}anthropic.claude-3-5-haiku-20241022-v1:0",
22
- "anthropic/claude-haiku-3": "{ip}anthropic.claude-3-haiku-20240307-v1:0",
23
- "cohere/embed-v4.0": "{ip}cohere.embed-v4:0",
24
- "meta/llama-3.1-70b": "{ip}meta.llama3-1-70b-instruct-v1:0",
25
- "meta/llama-3.1-405b": "{ip}meta.llama3-1-405b-instruct-v1:0",
26
- "meta/llama-3.2-1b": "{ip}meta.llama3-2-1b-instruct-v1:0",
27
- "meta/llama-3.2-3b": "{ip}meta.llama3-2-3b-instruct-v1:0",
28
- "meta/llama-3.2-11b": "{ip}meta.llama3-2-11b-instruct-v1:0",
29
- "meta/llama-3.2-90b": "{ip}meta.llama3-2-90b-instruct-v1:0",
30
- "meta/llama-4-scout": "{ip}meta.llama4-scout-17b-instruct-v1:0",
31
- "meta/llama-4-maverick": "{ip}meta.llama4-maverick-17b-instruct-v1:0",
32
- // On-demand only models, ensure that {ip} is never added
33
- "amazon/nova-2-multimodal-embeddings": "amazon.nova-2-multimodal-embeddings-v1:0",
34
- "cohere/embed-english-v3.0": "cohere.embed-english-v3",
35
- "cohere/embed-multilingual-v3.0": "cohere.embed-multilingual-v3",
36
- "cohere/command-r": "cohere.command-r-v1:0",
37
- "cohere/command-r-plus": "cohere.command-r-plus-v1:0",
38
- "meta/llama-3.3-70b": "meta.llama3-3-70b-instruct-v1:0",
39
- "meta/llama-3.1-8b": "meta.llama3-1-8b-instruct-v1:0",
40
- "openai/gpt-oss-20b": "openai.gpt-oss-20b-1:0",
41
- "openai/gpt-oss-120b": "openai.gpt-oss-120b-1:0",
42
- };
43
- const resolveInferenceProfile = ({ geo = "us", arn } = {}) => `${arn ? `arn:aws:bedrock:${arn.region}:${arn.accountId}:inference-profile/` : ""}${geo}.`;
44
- export const withCanonicalIdsForBedrock = (provider, config = {}) => withCanonicalIds(provider, {
45
- mapping: {
46
- ...MAPPING,
47
- ...config.extraMapping,
48
- },
49
- options: {
50
- stripNamespace: false,
51
- namespaceSeparator: ".",
52
- normalizeDelimiters: true,
53
- prefix: config.inferenceProfile?.mode === "avoid"
54
- ? ""
55
- : resolveInferenceProfile(config.inferenceProfile),
56
- template: {
57
- ip: resolveInferenceProfile(config.inferenceProfile),
58
- },
59
- postfix: config.inferenceProfile?.mode === "avoid" ? "" : "-v1:0",
60
- },
61
- });
@@ -1,2 +0,0 @@
1
- export * from "./canonical";
2
- export * from "./middleware";
@@ -1,2 +0,0 @@
1
- export * from "./canonical";
2
- export * from "./middleware";
@@ -1,5 +0,0 @@
1
- import type { LanguageModelMiddleware } from "ai";
2
- export declare const bedrockServiceTierMiddleware: LanguageModelMiddleware;
3
- export declare const bedrockGptReasoningMiddleware: LanguageModelMiddleware;
4
- export declare const bedrockClaudeReasoningMiddleware: LanguageModelMiddleware;
5
- export declare const bedrockPromptCachingMiddleware: LanguageModelMiddleware;