@hebo-ai/gateway 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/README.md +172 -67
  2. package/dist/config.js +2 -12
  3. package/dist/endpoints/chat-completions/converters.d.ts +28 -24
  4. package/dist/endpoints/chat-completions/converters.js +99 -73
  5. package/dist/endpoints/chat-completions/handler.js +36 -30
  6. package/dist/endpoints/chat-completions/schema.d.ts +394 -272
  7. package/dist/endpoints/chat-completions/schema.js +124 -57
  8. package/dist/endpoints/embeddings/converters.d.ts +4 -4
  9. package/dist/endpoints/embeddings/converters.js +8 -9
  10. package/dist/endpoints/embeddings/handler.js +32 -26
  11. package/dist/endpoints/embeddings/schema.d.ts +28 -38
  12. package/dist/endpoints/embeddings/schema.js +10 -10
  13. package/dist/endpoints/models/converters.d.ts +2 -2
  14. package/dist/endpoints/models/converters.js +9 -12
  15. package/dist/endpoints/models/handler.js +8 -9
  16. package/dist/endpoints/models/schema.d.ts +37 -31
  17. package/dist/endpoints/models/schema.js +23 -12
  18. package/dist/gateway.d.ts +8 -9
  19. package/dist/gateway.js +7 -10
  20. package/dist/index.d.ts +2 -0
  21. package/dist/index.js +2 -0
  22. package/dist/lifecycle.d.ts +2 -0
  23. package/dist/{utils/hooks.js → lifecycle.js} +16 -8
  24. package/dist/middleware/common.d.ts +4 -0
  25. package/dist/middleware/common.js +44 -0
  26. package/dist/middleware/matcher.d.ts +18 -0
  27. package/dist/middleware/matcher.js +83 -0
  28. package/dist/models/amazon/index.d.ts +2 -0
  29. package/dist/models/amazon/index.js +2 -0
  30. package/dist/models/amazon/middleware.d.ts +2 -0
  31. package/dist/models/amazon/middleware.js +20 -0
  32. package/dist/models/amazon/presets.d.ts +2390 -0
  33. package/dist/models/amazon/presets.js +80 -0
  34. package/dist/models/anthropic/index.d.ts +2 -0
  35. package/dist/models/anthropic/index.js +2 -0
  36. package/dist/models/anthropic/middleware.d.ts +5 -0
  37. package/dist/models/anthropic/middleware.js +67 -0
  38. package/dist/models/anthropic/presets.d.ts +4106 -0
  39. package/dist/models/anthropic/presets.js +113 -0
  40. package/dist/models/catalog.d.ts +3 -1
  41. package/dist/models/catalog.js +3 -2
  42. package/dist/models/cohere/index.d.ts +2 -0
  43. package/dist/models/cohere/index.js +2 -0
  44. package/dist/models/cohere/middleware.d.ts +2 -0
  45. package/dist/models/cohere/middleware.js +18 -0
  46. package/dist/models/cohere/presets.d.ts +2918 -0
  47. package/dist/models/cohere/presets.js +129 -0
  48. package/dist/models/google/index.d.ts +2 -0
  49. package/dist/models/google/index.js +2 -0
  50. package/dist/models/google/middleware.d.ts +2 -0
  51. package/dist/models/google/middleware.js +20 -0
  52. package/dist/models/{presets/gemini.d.ts → google/presets.d.ts} +400 -174
  53. package/dist/models/{presets/gemini.js → google/presets.js} +20 -5
  54. package/dist/models/meta/index.d.ts +1 -0
  55. package/dist/models/meta/index.js +1 -0
  56. package/dist/models/meta/presets.d.ts +3254 -0
  57. package/dist/models/{presets/llama.js → meta/presets.js} +44 -7
  58. package/dist/models/openai/index.d.ts +2 -0
  59. package/dist/models/openai/index.js +2 -0
  60. package/dist/models/openai/middleware.d.ts +2 -0
  61. package/dist/models/openai/middleware.js +20 -0
  62. package/dist/models/openai/presets.d.ts +6252 -0
  63. package/dist/models/openai/presets.js +206 -0
  64. package/dist/models/types.d.ts +3 -3
  65. package/dist/models/types.js +27 -0
  66. package/dist/models/voyage/index.d.ts +2 -0
  67. package/dist/models/voyage/index.js +2 -0
  68. package/dist/models/voyage/middleware.d.ts +2 -0
  69. package/dist/models/voyage/middleware.js +18 -0
  70. package/dist/models/{presets/voyage.d.ts → voyage/presets.d.ts} +322 -323
  71. package/dist/providers/anthropic/canonical.d.ts +3 -0
  72. package/dist/providers/anthropic/canonical.js +9 -0
  73. package/dist/providers/anthropic/index.d.ts +1 -0
  74. package/dist/providers/anthropic/index.js +1 -0
  75. package/dist/providers/bedrock/canonical.d.ts +15 -0
  76. package/dist/providers/{canonical/bedrock.js → bedrock/canonical.js} +13 -15
  77. package/dist/providers/bedrock/index.d.ts +1 -0
  78. package/dist/providers/bedrock/index.js +1 -0
  79. package/dist/providers/cohere/canonical.d.ts +3 -0
  80. package/dist/providers/{canonical/cohere.js → cohere/canonical.js} +6 -6
  81. package/dist/providers/cohere/index.d.ts +1 -0
  82. package/dist/providers/cohere/index.js +1 -0
  83. package/dist/providers/groq/canonical.d.ts +3 -0
  84. package/dist/providers/groq/canonical.js +12 -0
  85. package/dist/providers/groq/index.d.ts +1 -0
  86. package/dist/providers/groq/index.js +1 -0
  87. package/dist/providers/openai/canonical.d.ts +3 -0
  88. package/dist/providers/openai/canonical.js +8 -0
  89. package/dist/providers/openai/index.d.ts +1 -0
  90. package/dist/providers/openai/index.js +1 -0
  91. package/dist/providers/registry.d.ts +16 -26
  92. package/dist/providers/registry.js +19 -26
  93. package/dist/providers/types.d.ts +1 -1
  94. package/dist/providers/types.js +1 -0
  95. package/dist/providers/vertex/canonical.d.ts +3 -0
  96. package/dist/providers/vertex/canonical.js +8 -0
  97. package/dist/providers/vertex/index.d.ts +1 -0
  98. package/dist/providers/vertex/index.js +1 -0
  99. package/dist/providers/voyage/canonical.d.ts +3 -0
  100. package/dist/providers/voyage/canonical.js +7 -0
  101. package/dist/providers/voyage/index.d.ts +1 -0
  102. package/dist/providers/voyage/index.js +1 -0
  103. package/dist/types.d.ts +60 -30
  104. package/dist/utils/errors.js +2 -0
  105. package/dist/utils/preset.d.ts +1 -7
  106. package/dist/utils/preset.js +1 -1
  107. package/dist/utils/response.d.ts +1 -0
  108. package/dist/utils/response.js +10 -0
  109. package/package.json +79 -70
  110. package/src/config.ts +2 -18
  111. package/src/endpoints/chat-completions/converters.test.ts +39 -0
  112. package/src/endpoints/chat-completions/converters.ts +191 -112
  113. package/src/endpoints/chat-completions/handler.test.ts +47 -18
  114. package/src/endpoints/chat-completions/handler.ts +40 -34
  115. package/src/endpoints/chat-completions/schema.ts +161 -88
  116. package/src/endpoints/embeddings/converters.ts +15 -11
  117. package/src/endpoints/embeddings/handler.test.ts +27 -30
  118. package/src/endpoints/embeddings/handler.ts +34 -28
  119. package/src/endpoints/embeddings/schema.ts +10 -10
  120. package/src/endpoints/models/converters.ts +22 -14
  121. package/src/endpoints/models/handler.test.ts +26 -29
  122. package/src/endpoints/models/handler.ts +10 -12
  123. package/src/endpoints/models/schema.ts +26 -20
  124. package/src/gateway.ts +10 -24
  125. package/src/index.ts +3 -0
  126. package/src/{utils/hooks.ts → lifecycle.ts} +21 -11
  127. package/src/middleware/common.ts +68 -0
  128. package/src/middleware/matcher.ts +117 -0
  129. package/src/models/amazon/index.ts +2 -0
  130. package/src/models/amazon/middleware.ts +25 -0
  131. package/src/models/amazon/presets.ts +104 -0
  132. package/src/models/anthropic/index.ts +2 -0
  133. package/src/models/anthropic/middleware.test.ts +184 -0
  134. package/src/models/anthropic/middleware.ts +75 -0
  135. package/src/models/anthropic/presets.ts +161 -0
  136. package/src/models/catalog.ts +10 -2
  137. package/src/models/cohere/index.ts +2 -0
  138. package/src/models/cohere/middleware.ts +23 -0
  139. package/src/models/cohere/presets.ts +181 -0
  140. package/src/models/google/index.ts +2 -0
  141. package/src/models/google/middleware.ts +25 -0
  142. package/src/models/{presets/gemini.ts → google/presets.ts} +25 -5
  143. package/src/models/meta/index.ts +1 -0
  144. package/src/models/{presets/llama.ts → meta/presets.ts} +68 -7
  145. package/src/models/openai/index.ts +2 -0
  146. package/src/models/openai/middleware.ts +25 -0
  147. package/src/models/openai/presets.ts +269 -0
  148. package/src/models/types.ts +29 -2
  149. package/src/models/voyage/index.ts +2 -0
  150. package/src/models/voyage/middleware.ts +23 -0
  151. package/src/providers/anthropic/canonical.ts +17 -0
  152. package/src/providers/anthropic/index.ts +1 -0
  153. package/src/providers/{canonical/bedrock.ts → bedrock/canonical.ts} +22 -32
  154. package/src/providers/bedrock/index.ts +1 -0
  155. package/src/providers/cohere/canonical.ts +26 -0
  156. package/src/providers/cohere/index.ts +1 -0
  157. package/src/providers/groq/canonical.ts +21 -0
  158. package/src/providers/groq/index.ts +1 -0
  159. package/src/providers/openai/canonical.ts +16 -0
  160. package/src/providers/openai/index.ts +1 -0
  161. package/src/providers/registry.test.ts +12 -10
  162. package/src/providers/registry.ts +43 -43
  163. package/src/providers/types.ts +1 -0
  164. package/src/providers/vertex/canonical.ts +17 -0
  165. package/src/providers/vertex/index.ts +1 -0
  166. package/src/providers/voyage/canonical.ts +16 -0
  167. package/src/providers/voyage/index.ts +1 -0
  168. package/src/types.ts +64 -28
  169. package/src/utils/errors.ts +2 -0
  170. package/src/utils/preset.ts +2 -6
  171. package/src/utils/response.ts +15 -0
  172. package/dist/models/presets/claude.d.ts +0 -1165
  173. package/dist/models/presets/claude.js +0 -40
  174. package/dist/models/presets/cohere.d.ts +0 -383
  175. package/dist/models/presets/cohere.js +0 -26
  176. package/dist/models/presets/gpt-oss.d.ts +0 -779
  177. package/dist/models/presets/gpt-oss.js +0 -40
  178. package/dist/models/presets/llama.d.ts +0 -1400
  179. package/dist/providers/canonical/anthropic.d.ts +0 -25
  180. package/dist/providers/canonical/anthropic.js +0 -14
  181. package/dist/providers/canonical/bedrock.d.ts +0 -26
  182. package/dist/providers/canonical/cohere.d.ts +0 -17
  183. package/dist/providers/canonical/groq.d.ts +0 -17
  184. package/dist/providers/canonical/groq.js +0 -10
  185. package/dist/providers/canonical/openai.d.ts +0 -17
  186. package/dist/providers/canonical/openai.js +0 -8
  187. package/dist/providers/canonical/vertex.d.ts +0 -17
  188. package/dist/providers/canonical/vertex.js +0 -10
  189. package/dist/providers/canonical/voyage.d.ts +0 -17
  190. package/dist/providers/canonical/voyage.js +0 -8
  191. package/dist/utils/hooks.d.ts +0 -2
  192. package/src/models/presets/claude.ts +0 -59
  193. package/src/models/presets/cohere.ts +0 -37
  194. package/src/models/presets/gpt-oss.ts +0 -55
  195. package/src/providers/canonical/anthropic.ts +0 -32
  196. package/src/providers/canonical/cohere.ts +0 -36
  197. package/src/providers/canonical/groq.ts +0 -25
  198. package/src/providers/canonical/openai.ts +0 -16
  199. package/src/providers/canonical/vertex.ts +0 -18
  200. package/src/providers/canonical/voyage.ts +0 -16
  201. package/dist/models/{presets/voyage.js → voyage/presets.js} +10 -10
  202. package/src/models/{presets/voyage.ts → voyage/presets.ts} +10 -10
@@ -1,40 +0,0 @@
1
- import { presetFor } from "../../utils/preset";
2
- const CLAUDE_BASE = {
3
- modalities: {
4
- input: ["text", "image", "pdf", "file"],
5
- output: ["text"],
6
- },
7
- capabilities: ["attachments", "reasoning", "tool_call", "structured_output", "temperature"],
8
- context: 200000,
9
- providers: ["anthropic", "bedrock", "vertex"],
10
- };
11
- export const claudeHaiku45 = presetFor()("anthropic/claude-haiku-4.5", {
12
- name: "Claude Haiku 4.5",
13
- created: "2025-10-15",
14
- knowledge: "2025-02",
15
- ...CLAUDE_BASE,
16
- });
17
- export const claudeSonnet45 = presetFor()("anthropic/claude-sonnet-4.5", {
18
- name: "Claude Sonnet 4.5",
19
- created: "2025-09-29",
20
- knowledge: "2025-07",
21
- ...CLAUDE_BASE,
22
- });
23
- export const claudeOpus45 = presetFor()("anthropic/claude-opus-4.5", {
24
- name: "Claude Opus 4.5",
25
- created: "2025-11-24",
26
- knowledge: "2025-05",
27
- ...CLAUDE_BASE,
28
- });
29
- const claudeAtomic = {
30
- "v4.5": [claudeHaiku45, claudeSonnet45, claudeOpus45],
31
- };
32
- const claudeGroups = {
33
- "v4.x": [...claudeAtomic["v4.5"]],
34
- };
35
- export const claude = {
36
- ...claudeAtomic,
37
- ...claudeGroups,
38
- latest: [...claudeAtomic["v4.5"]],
39
- all: Object.values(claudeAtomic).flat(),
40
- };
@@ -1,383 +0,0 @@
1
- import type { CatalogModel } from "../types";
2
- export declare const cohereEmbed4: <const O extends {
3
- name?: string | undefined;
4
- created?: string | undefined;
5
- knowledge?: string | undefined;
6
- modalities?: {
7
- input?: readonly ("text" | "image" | "file" | "audio" | "video" | "pdf")[] | undefined;
8
- output?: readonly ("text" | "image" | "audio" | "video" | "embeddings")[] | undefined;
9
- } | undefined;
10
- context?: number | undefined;
11
- capabilities?: readonly ("attachments" | "reasoning" | "tool_call" | "structured_output" | "temperature")[] | undefined;
12
- providers?: readonly ("anthropic" | "bedrock" | "cohere" | "groq" | "openai" | "vertex" | "voyage" | {
13
- readonly [x: number]: string | undefined;
14
- toString?: (() => string) | undefined;
15
- charAt?: {} | undefined;
16
- charCodeAt?: {} | undefined;
17
- concat?: {} | undefined;
18
- indexOf?: {} | undefined;
19
- lastIndexOf?: {} | undefined;
20
- localeCompare?: {} | undefined;
21
- match?: {} | undefined;
22
- replace?: {} | undefined;
23
- search?: {} | undefined;
24
- slice?: {} | undefined;
25
- split?: {} | undefined;
26
- substring?: {} | undefined;
27
- toLowerCase?: (() => string) | undefined;
28
- toLocaleLowerCase?: {} | undefined;
29
- toUpperCase?: (() => string) | undefined;
30
- toLocaleUpperCase?: {} | undefined;
31
- trim?: (() => string) | undefined;
32
- readonly length?: number | undefined;
33
- substr?: {} | undefined;
34
- valueOf?: (() => string) | undefined;
35
- codePointAt?: {} | undefined;
36
- includes?: {} | undefined;
37
- endsWith?: {} | undefined;
38
- normalize?: {} | undefined;
39
- repeat?: {} | undefined;
40
- startsWith?: {} | undefined;
41
- anchor?: {} | undefined;
42
- big?: (() => string) | undefined;
43
- blink?: (() => string) | undefined;
44
- bold?: (() => string) | undefined;
45
- fixed?: (() => string) | undefined;
46
- fontcolor?: {} | undefined;
47
- fontsize?: {} | undefined;
48
- italics?: (() => string) | undefined;
49
- link?: {} | undefined;
50
- small?: (() => string) | undefined;
51
- strike?: (() => string) | undefined;
52
- sub?: (() => string) | undefined;
53
- sup?: (() => string) | undefined;
54
- padStart?: {} | undefined;
55
- padEnd?: {} | undefined;
56
- trimEnd?: (() => string) | undefined;
57
- trimStart?: (() => string) | undefined;
58
- trimLeft?: (() => string) | undefined;
59
- trimRight?: (() => string) | undefined;
60
- matchAll?: {} | undefined;
61
- replaceAll?: {} | undefined;
62
- at?: {} | undefined;
63
- [Symbol.iterator]?: (() => StringIterator<string>) | undefined;
64
- })[] | undefined;
65
- additionalProperties?: {
66
- [x: string]: unknown;
67
- } | undefined;
68
- } & Pick<CatalogModel, never>>(override: O) => Record<"cohere/embed-v4.0", {
69
- modalities: {
70
- input: readonly ["text"];
71
- output: readonly ["embeddings"];
72
- };
73
- context: number;
74
- providers: readonly ["cohere", "bedrock"];
75
- name: string;
76
- created: string;
77
- } & O>;
78
- export declare const cohere: {
79
- readonly latest: readonly [<const O extends {
80
- name?: string | undefined;
81
- created?: string | undefined;
82
- knowledge?: string | undefined;
83
- modalities?: {
84
- input?: readonly ("text" | "image" | "file" | "audio" | "video" | "pdf")[] | undefined;
85
- output?: readonly ("text" | "image" | "audio" | "video" | "embeddings")[] | undefined;
86
- } | undefined;
87
- context?: number | undefined;
88
- capabilities?: readonly ("attachments" | "reasoning" | "tool_call" | "structured_output" | "temperature")[] | undefined;
89
- providers?: readonly ("anthropic" | "bedrock" | "cohere" | "groq" | "openai" | "vertex" | "voyage" | {
90
- readonly [x: number]: string | undefined;
91
- toString?: (() => string) | undefined;
92
- charAt?: {} | undefined;
93
- charCodeAt?: {} | undefined;
94
- concat?: {} | undefined;
95
- indexOf?: {} | undefined;
96
- lastIndexOf?: {} | undefined;
97
- localeCompare?: {} | undefined;
98
- match?: {} | undefined;
99
- replace?: {} | undefined;
100
- search?: {} | undefined;
101
- slice?: {} | undefined;
102
- split?: {} | undefined;
103
- substring?: {} | undefined;
104
- toLowerCase?: (() => string) | undefined;
105
- toLocaleLowerCase?: {} | undefined;
106
- toUpperCase?: (() => string) | undefined;
107
- toLocaleUpperCase?: {} | undefined;
108
- trim?: (() => string) | undefined;
109
- readonly length?: number | undefined;
110
- substr?: {} | undefined;
111
- valueOf?: (() => string) | undefined;
112
- codePointAt?: {} | undefined;
113
- includes?: {} | undefined;
114
- endsWith?: {} | undefined;
115
- normalize?: {} | undefined;
116
- repeat?: {} | undefined;
117
- startsWith?: {} | undefined;
118
- anchor?: {} | undefined;
119
- big?: (() => string) | undefined;
120
- blink?: (() => string) | undefined;
121
- bold?: (() => string) | undefined;
122
- fixed?: (() => string) | undefined;
123
- fontcolor?: {} | undefined;
124
- fontsize?: {} | undefined;
125
- italics?: (() => string) | undefined;
126
- link?: {} | undefined;
127
- small?: (() => string) | undefined;
128
- strike?: (() => string) | undefined;
129
- sub?: (() => string) | undefined;
130
- sup?: (() => string) | undefined;
131
- padStart?: {} | undefined;
132
- padEnd?: {} | undefined;
133
- trimEnd?: (() => string) | undefined;
134
- trimStart?: (() => string) | undefined;
135
- trimLeft?: (() => string) | undefined;
136
- trimRight?: (() => string) | undefined;
137
- matchAll?: {} | undefined;
138
- replaceAll?: {} | undefined;
139
- at?: {} | undefined;
140
- [Symbol.iterator]?: (() => StringIterator<string>) | undefined;
141
- })[] | undefined;
142
- additionalProperties?: {
143
- [x: string]: unknown;
144
- } | undefined;
145
- } & Pick<CatalogModel, never>>(override: O) => Record<"cohere/embed-v4.0", {
146
- modalities: {
147
- input: readonly ["text"];
148
- output: readonly ["embeddings"];
149
- };
150
- context: number;
151
- providers: readonly ["cohere", "bedrock"];
152
- name: string;
153
- created: string;
154
- } & O>];
155
- readonly all: (<const O extends {
156
- name?: string | undefined;
157
- created?: string | undefined;
158
- knowledge?: string | undefined;
159
- modalities?: {
160
- input?: readonly ("text" | "image" | "file" | "audio" | "video" | "pdf")[] | undefined;
161
- output?: readonly ("text" | "image" | "audio" | "video" | "embeddings")[] | undefined;
162
- } | undefined;
163
- context?: number | undefined;
164
- capabilities?: readonly ("attachments" | "reasoning" | "tool_call" | "structured_output" | "temperature")[] | undefined;
165
- providers?: readonly ("anthropic" | "bedrock" | "cohere" | "groq" | "openai" | "vertex" | "voyage" | {
166
- readonly [x: number]: string | undefined;
167
- toString?: (() => string) | undefined;
168
- charAt?: {} | undefined;
169
- charCodeAt?: {} | undefined;
170
- concat?: {} | undefined;
171
- indexOf?: {} | undefined;
172
- lastIndexOf?: {} | undefined;
173
- localeCompare?: {} | undefined;
174
- match?: {} | undefined;
175
- replace?: {} | undefined;
176
- search?: {} | undefined;
177
- slice?: {} | undefined;
178
- split?: {} | undefined;
179
- substring?: {} | undefined;
180
- toLowerCase?: (() => string) | undefined;
181
- toLocaleLowerCase?: {} | undefined;
182
- toUpperCase?: (() => string) | undefined;
183
- toLocaleUpperCase?: {} | undefined;
184
- trim?: (() => string) | undefined;
185
- readonly length?: number | undefined;
186
- substr?: {} | undefined;
187
- valueOf?: (() => string) | undefined;
188
- codePointAt?: {} | undefined;
189
- includes?: {} | undefined;
190
- endsWith?: {} | undefined;
191
- normalize?: {} | undefined;
192
- repeat?: {} | undefined;
193
- startsWith?: {} | undefined;
194
- anchor?: {} | undefined;
195
- big?: (() => string) | undefined;
196
- blink?: (() => string) | undefined;
197
- bold?: (() => string) | undefined;
198
- fixed?: (() => string) | undefined;
199
- fontcolor?: {} | undefined;
200
- fontsize?: {} | undefined;
201
- italics?: (() => string) | undefined;
202
- link?: {} | undefined;
203
- small?: (() => string) | undefined;
204
- strike?: (() => string) | undefined;
205
- sub?: (() => string) | undefined;
206
- sup?: (() => string) | undefined;
207
- padStart?: {} | undefined;
208
- padEnd?: {} | undefined;
209
- trimEnd?: (() => string) | undefined;
210
- trimStart?: (() => string) | undefined;
211
- trimLeft?: (() => string) | undefined;
212
- trimRight?: (() => string) | undefined;
213
- matchAll?: {} | undefined;
214
- replaceAll?: {} | undefined;
215
- at?: {} | undefined;
216
- [Symbol.iterator]?: (() => StringIterator<string>) | undefined;
217
- })[] | undefined;
218
- additionalProperties?: {
219
- [x: string]: unknown;
220
- } | undefined;
221
- } & Pick<CatalogModel, never>>(override: O) => Record<"cohere/embed-v4.0", {
222
- modalities: {
223
- input: readonly ["text"];
224
- output: readonly ["embeddings"];
225
- };
226
- context: number;
227
- providers: readonly ["cohere", "bedrock"];
228
- name: string;
229
- created: string;
230
- } & O>)[];
231
- readonly "v4.x": readonly [<const O extends {
232
- name?: string | undefined;
233
- created?: string | undefined;
234
- knowledge?: string | undefined;
235
- modalities?: {
236
- input?: readonly ("text" | "image" | "file" | "audio" | "video" | "pdf")[] | undefined;
237
- output?: readonly ("text" | "image" | "audio" | "video" | "embeddings")[] | undefined;
238
- } | undefined;
239
- context?: number | undefined;
240
- capabilities?: readonly ("attachments" | "reasoning" | "tool_call" | "structured_output" | "temperature")[] | undefined;
241
- providers?: readonly ("anthropic" | "bedrock" | "cohere" | "groq" | "openai" | "vertex" | "voyage" | {
242
- readonly [x: number]: string | undefined;
243
- toString?: (() => string) | undefined;
244
- charAt?: {} | undefined;
245
- charCodeAt?: {} | undefined;
246
- concat?: {} | undefined;
247
- indexOf?: {} | undefined;
248
- lastIndexOf?: {} | undefined;
249
- localeCompare?: {} | undefined;
250
- match?: {} | undefined;
251
- replace?: {} | undefined;
252
- search?: {} | undefined;
253
- slice?: {} | undefined;
254
- split?: {} | undefined;
255
- substring?: {} | undefined;
256
- toLowerCase?: (() => string) | undefined;
257
- toLocaleLowerCase?: {} | undefined;
258
- toUpperCase?: (() => string) | undefined;
259
- toLocaleUpperCase?: {} | undefined;
260
- trim?: (() => string) | undefined;
261
- readonly length?: number | undefined;
262
- substr?: {} | undefined;
263
- valueOf?: (() => string) | undefined;
264
- codePointAt?: {} | undefined;
265
- includes?: {} | undefined;
266
- endsWith?: {} | undefined;
267
- normalize?: {} | undefined;
268
- repeat?: {} | undefined;
269
- startsWith?: {} | undefined;
270
- anchor?: {} | undefined;
271
- big?: (() => string) | undefined;
272
- blink?: (() => string) | undefined;
273
- bold?: (() => string) | undefined;
274
- fixed?: (() => string) | undefined;
275
- fontcolor?: {} | undefined;
276
- fontsize?: {} | undefined;
277
- italics?: (() => string) | undefined;
278
- link?: {} | undefined;
279
- small?: (() => string) | undefined;
280
- strike?: (() => string) | undefined;
281
- sub?: (() => string) | undefined;
282
- sup?: (() => string) | undefined;
283
- padStart?: {} | undefined;
284
- padEnd?: {} | undefined;
285
- trimEnd?: (() => string) | undefined;
286
- trimStart?: (() => string) | undefined;
287
- trimLeft?: (() => string) | undefined;
288
- trimRight?: (() => string) | undefined;
289
- matchAll?: {} | undefined;
290
- replaceAll?: {} | undefined;
291
- at?: {} | undefined;
292
- [Symbol.iterator]?: (() => StringIterator<string>) | undefined;
293
- })[] | undefined;
294
- additionalProperties?: {
295
- [x: string]: unknown;
296
- } | undefined;
297
- } & Pick<CatalogModel, never>>(override: O) => Record<"cohere/embed-v4.0", {
298
- modalities: {
299
- input: readonly ["text"];
300
- output: readonly ["embeddings"];
301
- };
302
- context: number;
303
- providers: readonly ["cohere", "bedrock"];
304
- name: string;
305
- created: string;
306
- } & O>];
307
- readonly v4: readonly [<const O extends {
308
- name?: string | undefined;
309
- created?: string | undefined;
310
- knowledge?: string | undefined;
311
- modalities?: {
312
- input?: readonly ("text" | "image" | "file" | "audio" | "video" | "pdf")[] | undefined;
313
- output?: readonly ("text" | "image" | "audio" | "video" | "embeddings")[] | undefined;
314
- } | undefined;
315
- context?: number | undefined;
316
- capabilities?: readonly ("attachments" | "reasoning" | "tool_call" | "structured_output" | "temperature")[] | undefined;
317
- providers?: readonly ("anthropic" | "bedrock" | "cohere" | "groq" | "openai" | "vertex" | "voyage" | {
318
- readonly [x: number]: string | undefined;
319
- toString?: (() => string) | undefined;
320
- charAt?: {} | undefined;
321
- charCodeAt?: {} | undefined;
322
- concat?: {} | undefined;
323
- indexOf?: {} | undefined;
324
- lastIndexOf?: {} | undefined;
325
- localeCompare?: {} | undefined;
326
- match?: {} | undefined;
327
- replace?: {} | undefined;
328
- search?: {} | undefined;
329
- slice?: {} | undefined;
330
- split?: {} | undefined;
331
- substring?: {} | undefined;
332
- toLowerCase?: (() => string) | undefined;
333
- toLocaleLowerCase?: {} | undefined;
334
- toUpperCase?: (() => string) | undefined;
335
- toLocaleUpperCase?: {} | undefined;
336
- trim?: (() => string) | undefined;
337
- readonly length?: number | undefined;
338
- substr?: {} | undefined;
339
- valueOf?: (() => string) | undefined;
340
- codePointAt?: {} | undefined;
341
- includes?: {} | undefined;
342
- endsWith?: {} | undefined;
343
- normalize?: {} | undefined;
344
- repeat?: {} | undefined;
345
- startsWith?: {} | undefined;
346
- anchor?: {} | undefined;
347
- big?: (() => string) | undefined;
348
- blink?: (() => string) | undefined;
349
- bold?: (() => string) | undefined;
350
- fixed?: (() => string) | undefined;
351
- fontcolor?: {} | undefined;
352
- fontsize?: {} | undefined;
353
- italics?: (() => string) | undefined;
354
- link?: {} | undefined;
355
- small?: (() => string) | undefined;
356
- strike?: (() => string) | undefined;
357
- sub?: (() => string) | undefined;
358
- sup?: (() => string) | undefined;
359
- padStart?: {} | undefined;
360
- padEnd?: {} | undefined;
361
- trimEnd?: (() => string) | undefined;
362
- trimStart?: (() => string) | undefined;
363
- trimLeft?: (() => string) | undefined;
364
- trimRight?: (() => string) | undefined;
365
- matchAll?: {} | undefined;
366
- replaceAll?: {} | undefined;
367
- at?: {} | undefined;
368
- [Symbol.iterator]?: (() => StringIterator<string>) | undefined;
369
- })[] | undefined;
370
- additionalProperties?: {
371
- [x: string]: unknown;
372
- } | undefined;
373
- } & Pick<CatalogModel, never>>(override: O) => Record<"cohere/embed-v4.0", {
374
- modalities: {
375
- input: readonly ["text"];
376
- output: readonly ["embeddings"];
377
- };
378
- context: number;
379
- providers: readonly ["cohere", "bedrock"];
380
- name: string;
381
- created: string;
382
- } & O>];
383
- };
@@ -1,26 +0,0 @@
1
- import { presetFor } from "../../utils/preset";
2
- const COHERE_BASE = {
3
- modalities: {
4
- input: ["text"],
5
- output: ["embeddings"],
6
- },
7
- context: 128000,
8
- providers: ["cohere", "bedrock"],
9
- };
10
- export const cohereEmbed4 = presetFor()("cohere/embed-v4.0", {
11
- name: "Cohere 4 Embeddings",
12
- created: "2026-01-15",
13
- ...COHERE_BASE,
14
- });
15
- const cohereAtomic = {
16
- v4: [cohereEmbed4],
17
- };
18
- const cohereGroups = {
19
- "v4.x": [...cohereAtomic["v4"]],
20
- };
21
- export const cohere = {
22
- ...cohereAtomic,
23
- ...cohereGroups,
24
- latest: [...cohereAtomic["v4"]],
25
- all: Object.values(cohereAtomic).flat(),
26
- };