@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.
- package/README.md +172 -67
- package/dist/config.js +2 -12
- package/dist/endpoints/chat-completions/converters.d.ts +28 -24
- package/dist/endpoints/chat-completions/converters.js +99 -73
- package/dist/endpoints/chat-completions/handler.js +36 -30
- package/dist/endpoints/chat-completions/schema.d.ts +394 -272
- package/dist/endpoints/chat-completions/schema.js +124 -57
- package/dist/endpoints/embeddings/converters.d.ts +4 -4
- package/dist/endpoints/embeddings/converters.js +8 -9
- package/dist/endpoints/embeddings/handler.js +32 -26
- package/dist/endpoints/embeddings/schema.d.ts +28 -38
- package/dist/endpoints/embeddings/schema.js +10 -10
- package/dist/endpoints/models/converters.d.ts +2 -2
- package/dist/endpoints/models/converters.js +9 -12
- package/dist/endpoints/models/handler.js +8 -9
- package/dist/endpoints/models/schema.d.ts +37 -31
- package/dist/endpoints/models/schema.js +23 -12
- package/dist/gateway.d.ts +8 -9
- package/dist/gateway.js +7 -10
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/lifecycle.d.ts +2 -0
- package/dist/{utils/hooks.js → lifecycle.js} +16 -8
- package/dist/middleware/common.d.ts +4 -0
- package/dist/middleware/common.js +44 -0
- package/dist/middleware/matcher.d.ts +18 -0
- package/dist/middleware/matcher.js +83 -0
- package/dist/models/amazon/index.d.ts +2 -0
- package/dist/models/amazon/index.js +2 -0
- package/dist/models/amazon/middleware.d.ts +2 -0
- package/dist/models/amazon/middleware.js +20 -0
- package/dist/models/amazon/presets.d.ts +2390 -0
- package/dist/models/amazon/presets.js +80 -0
- package/dist/models/anthropic/index.d.ts +2 -0
- package/dist/models/anthropic/index.js +2 -0
- package/dist/models/anthropic/middleware.d.ts +5 -0
- package/dist/models/anthropic/middleware.js +67 -0
- package/dist/models/anthropic/presets.d.ts +4106 -0
- package/dist/models/anthropic/presets.js +113 -0
- package/dist/models/catalog.d.ts +3 -1
- package/dist/models/catalog.js +3 -2
- package/dist/models/cohere/index.d.ts +2 -0
- package/dist/models/cohere/index.js +2 -0
- package/dist/models/cohere/middleware.d.ts +2 -0
- package/dist/models/cohere/middleware.js +18 -0
- package/dist/models/cohere/presets.d.ts +2918 -0
- package/dist/models/cohere/presets.js +129 -0
- package/dist/models/google/index.d.ts +2 -0
- package/dist/models/google/index.js +2 -0
- package/dist/models/google/middleware.d.ts +2 -0
- package/dist/models/google/middleware.js +20 -0
- package/dist/models/{presets/gemini.d.ts → google/presets.d.ts} +400 -174
- package/dist/models/{presets/gemini.js → google/presets.js} +20 -5
- package/dist/models/meta/index.d.ts +1 -0
- package/dist/models/meta/index.js +1 -0
- package/dist/models/meta/presets.d.ts +3254 -0
- package/dist/models/{presets/llama.js → meta/presets.js} +44 -7
- package/dist/models/openai/index.d.ts +2 -0
- package/dist/models/openai/index.js +2 -0
- package/dist/models/openai/middleware.d.ts +2 -0
- package/dist/models/openai/middleware.js +20 -0
- package/dist/models/openai/presets.d.ts +6252 -0
- package/dist/models/openai/presets.js +206 -0
- package/dist/models/types.d.ts +3 -3
- package/dist/models/types.js +27 -0
- package/dist/models/voyage/index.d.ts +2 -0
- package/dist/models/voyage/index.js +2 -0
- package/dist/models/voyage/middleware.d.ts +2 -0
- package/dist/models/voyage/middleware.js +18 -0
- package/dist/models/{presets/voyage.d.ts → voyage/presets.d.ts} +322 -323
- package/dist/providers/anthropic/canonical.d.ts +3 -0
- package/dist/providers/anthropic/canonical.js +9 -0
- package/dist/providers/anthropic/index.d.ts +1 -0
- package/dist/providers/anthropic/index.js +1 -0
- package/dist/providers/bedrock/canonical.d.ts +15 -0
- package/dist/providers/{canonical/bedrock.js → bedrock/canonical.js} +13 -15
- package/dist/providers/bedrock/index.d.ts +1 -0
- package/dist/providers/bedrock/index.js +1 -0
- package/dist/providers/cohere/canonical.d.ts +3 -0
- package/dist/providers/{canonical/cohere.js → cohere/canonical.js} +6 -6
- package/dist/providers/cohere/index.d.ts +1 -0
- package/dist/providers/cohere/index.js +1 -0
- package/dist/providers/groq/canonical.d.ts +3 -0
- package/dist/providers/groq/canonical.js +12 -0
- package/dist/providers/groq/index.d.ts +1 -0
- package/dist/providers/groq/index.js +1 -0
- package/dist/providers/openai/canonical.d.ts +3 -0
- package/dist/providers/openai/canonical.js +8 -0
- package/dist/providers/openai/index.d.ts +1 -0
- package/dist/providers/openai/index.js +1 -0
- package/dist/providers/registry.d.ts +16 -26
- package/dist/providers/registry.js +19 -26
- package/dist/providers/types.d.ts +1 -1
- package/dist/providers/types.js +1 -0
- package/dist/providers/vertex/canonical.d.ts +3 -0
- package/dist/providers/vertex/canonical.js +8 -0
- package/dist/providers/vertex/index.d.ts +1 -0
- package/dist/providers/vertex/index.js +1 -0
- package/dist/providers/voyage/canonical.d.ts +3 -0
- package/dist/providers/voyage/canonical.js +7 -0
- package/dist/providers/voyage/index.d.ts +1 -0
- package/dist/providers/voyage/index.js +1 -0
- package/dist/types.d.ts +60 -30
- package/dist/utils/errors.js +2 -0
- package/dist/utils/preset.d.ts +1 -7
- package/dist/utils/preset.js +1 -1
- package/dist/utils/response.d.ts +1 -0
- package/dist/utils/response.js +10 -0
- package/package.json +79 -70
- package/src/config.ts +2 -18
- package/src/endpoints/chat-completions/converters.test.ts +39 -0
- package/src/endpoints/chat-completions/converters.ts +191 -112
- package/src/endpoints/chat-completions/handler.test.ts +47 -18
- package/src/endpoints/chat-completions/handler.ts +40 -34
- package/src/endpoints/chat-completions/schema.ts +161 -88
- package/src/endpoints/embeddings/converters.ts +15 -11
- package/src/endpoints/embeddings/handler.test.ts +27 -30
- package/src/endpoints/embeddings/handler.ts +34 -28
- package/src/endpoints/embeddings/schema.ts +10 -10
- package/src/endpoints/models/converters.ts +22 -14
- package/src/endpoints/models/handler.test.ts +26 -29
- package/src/endpoints/models/handler.ts +10 -12
- package/src/endpoints/models/schema.ts +26 -20
- package/src/gateway.ts +10 -24
- package/src/index.ts +3 -0
- package/src/{utils/hooks.ts → lifecycle.ts} +21 -11
- package/src/middleware/common.ts +68 -0
- package/src/middleware/matcher.ts +117 -0
- package/src/models/amazon/index.ts +2 -0
- package/src/models/amazon/middleware.ts +25 -0
- package/src/models/amazon/presets.ts +104 -0
- package/src/models/anthropic/index.ts +2 -0
- package/src/models/anthropic/middleware.test.ts +184 -0
- package/src/models/anthropic/middleware.ts +75 -0
- package/src/models/anthropic/presets.ts +161 -0
- package/src/models/catalog.ts +10 -2
- package/src/models/cohere/index.ts +2 -0
- package/src/models/cohere/middleware.ts +23 -0
- package/src/models/cohere/presets.ts +181 -0
- package/src/models/google/index.ts +2 -0
- package/src/models/google/middleware.ts +25 -0
- package/src/models/{presets/gemini.ts → google/presets.ts} +25 -5
- package/src/models/meta/index.ts +1 -0
- package/src/models/{presets/llama.ts → meta/presets.ts} +68 -7
- package/src/models/openai/index.ts +2 -0
- package/src/models/openai/middleware.ts +25 -0
- package/src/models/openai/presets.ts +269 -0
- package/src/models/types.ts +29 -2
- package/src/models/voyage/index.ts +2 -0
- package/src/models/voyage/middleware.ts +23 -0
- package/src/providers/anthropic/canonical.ts +17 -0
- package/src/providers/anthropic/index.ts +1 -0
- package/src/providers/{canonical/bedrock.ts → bedrock/canonical.ts} +22 -32
- package/src/providers/bedrock/index.ts +1 -0
- package/src/providers/cohere/canonical.ts +26 -0
- package/src/providers/cohere/index.ts +1 -0
- package/src/providers/groq/canonical.ts +21 -0
- package/src/providers/groq/index.ts +1 -0
- package/src/providers/openai/canonical.ts +16 -0
- package/src/providers/openai/index.ts +1 -0
- package/src/providers/registry.test.ts +12 -10
- package/src/providers/registry.ts +43 -43
- package/src/providers/types.ts +1 -0
- package/src/providers/vertex/canonical.ts +17 -0
- package/src/providers/vertex/index.ts +1 -0
- package/src/providers/voyage/canonical.ts +16 -0
- package/src/providers/voyage/index.ts +1 -0
- package/src/types.ts +64 -28
- package/src/utils/errors.ts +2 -0
- package/src/utils/preset.ts +2 -6
- package/src/utils/response.ts +15 -0
- package/dist/models/presets/claude.d.ts +0 -1165
- package/dist/models/presets/claude.js +0 -40
- package/dist/models/presets/cohere.d.ts +0 -383
- package/dist/models/presets/cohere.js +0 -26
- package/dist/models/presets/gpt-oss.d.ts +0 -779
- package/dist/models/presets/gpt-oss.js +0 -40
- package/dist/models/presets/llama.d.ts +0 -1400
- package/dist/providers/canonical/anthropic.d.ts +0 -25
- package/dist/providers/canonical/anthropic.js +0 -14
- package/dist/providers/canonical/bedrock.d.ts +0 -26
- package/dist/providers/canonical/cohere.d.ts +0 -17
- package/dist/providers/canonical/groq.d.ts +0 -17
- package/dist/providers/canonical/groq.js +0 -10
- package/dist/providers/canonical/openai.d.ts +0 -17
- package/dist/providers/canonical/openai.js +0 -8
- package/dist/providers/canonical/vertex.d.ts +0 -17
- package/dist/providers/canonical/vertex.js +0 -10
- package/dist/providers/canonical/voyage.d.ts +0 -17
- package/dist/providers/canonical/voyage.js +0 -8
- package/dist/utils/hooks.d.ts +0 -2
- package/src/models/presets/claude.ts +0 -59
- package/src/models/presets/cohere.ts +0 -37
- package/src/models/presets/gpt-oss.ts +0 -55
- package/src/providers/canonical/anthropic.ts +0 -32
- package/src/providers/canonical/cohere.ts +0 -36
- package/src/providers/canonical/groq.ts +0 -25
- package/src/providers/canonical/openai.ts +0 -16
- package/src/providers/canonical/vertex.ts +0 -18
- package/src/providers/canonical/voyage.ts +0 -16
- package/dist/models/{presets/voyage.js → voyage/presets.js} +10 -10
- 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
|
-
};
|