@tyvm/knowhow 0.0.84 → 0.0.85
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/package.json +1 -1
- package/src/agents/researcher/researcher.ts +1 -2
- package/src/agents/tools/aiClient.ts +48 -0
- package/src/agents/tools/list.ts +57 -0
- package/src/clients/index.ts +91 -0
- package/src/clients/pricing/google.ts +81 -2
- package/src/clients/pricing/openai.ts +68 -0
- package/src/types.ts +78 -5
- package/tests/clients/pricing.test.ts +144 -0
- package/ts_build/package.json +1 -1
- package/ts_build/src/agents/researcher/researcher.js +1 -1
- package/ts_build/src/agents/researcher/researcher.js.map +1 -1
- package/ts_build/src/agents/tools/aiClient.d.ts +3 -0
- package/ts_build/src/agents/tools/aiClient.js +31 -1
- package/ts_build/src/agents/tools/aiClient.js.map +1 -1
- package/ts_build/src/agents/tools/list.js +48 -0
- package/ts_build/src/agents/tools/list.js.map +1 -1
- package/ts_build/src/clients/gemini.d.ts +10 -10
- package/ts_build/src/clients/index.d.ts +10 -0
- package/ts_build/src/clients/index.js +58 -0
- package/ts_build/src/clients/index.js.map +1 -1
- package/ts_build/src/clients/pricing/google.d.ts +10 -10
- package/ts_build/src/clients/pricing/google.js +74 -2
- package/ts_build/src/clients/pricing/google.js.map +1 -1
- package/ts_build/src/clients/pricing/openai.js +65 -0
- package/ts_build/src/clients/pricing/openai.js.map +1 -1
- package/ts_build/src/types.d.ts +32 -2
- package/ts_build/src/types.js +73 -5
- package/ts_build/src/types.js.map +1 -1
- package/ts_build/tests/clients/pricing.test.d.ts +1 -0
- package/ts_build/tests/clients/pricing.test.js +90 -0
- package/ts_build/tests/clients/pricing.test.js.map +1 -0
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ export class ResearcherAgent extends BaseAgent {
|
|
|
8
8
|
|
|
9
9
|
constructor(context: AgentContext) {
|
|
10
10
|
super(context);
|
|
11
|
-
this.setModel(Models.google.
|
|
11
|
+
this.setModel(Models.google.Gemini_3_Flash_Preview);
|
|
12
12
|
this.setProvider("google");
|
|
13
13
|
this.disableTool("patchFile");
|
|
14
14
|
this.disableTool("writeFile");
|
|
@@ -106,4 +106,3 @@ export class ResearcherAgent extends BaseAgent {
|
|
|
106
106
|
] as Message[];
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
|
|
@@ -128,3 +128,51 @@ export async function listAllEmbeddingModels(): Promise<Record<string, string[]>
|
|
|
128
128
|
|
|
129
129
|
return contextClients.listAllEmbeddingModels();
|
|
130
130
|
}
|
|
131
|
+
|
|
132
|
+
export async function listAllImageModels(): Promise<Record<string, string[]>> {
|
|
133
|
+
// Get context from bound ToolsService
|
|
134
|
+
const toolService = (
|
|
135
|
+
this instanceof ToolsService ? this : services().Tools
|
|
136
|
+
) as ToolsService;
|
|
137
|
+
|
|
138
|
+
const toolContext = toolService.getContext();
|
|
139
|
+
const { Clients: contextClients } = toolContext;
|
|
140
|
+
|
|
141
|
+
if (!contextClients) {
|
|
142
|
+
throw new Error("Clients not available in tool context");
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return contextClients.listAllImageModels();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export async function listAllAudioModels(): Promise<Record<string, string[]>> {
|
|
149
|
+
// Get context from bound ToolsService
|
|
150
|
+
const toolService = (
|
|
151
|
+
this instanceof ToolsService ? this : services().Tools
|
|
152
|
+
) as ToolsService;
|
|
153
|
+
|
|
154
|
+
const toolContext = toolService.getContext();
|
|
155
|
+
const { Clients: contextClients } = toolContext;
|
|
156
|
+
|
|
157
|
+
if (!contextClients) {
|
|
158
|
+
throw new Error("Clients not available in tool context");
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return contextClients.listAllAudioModels();
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export async function listAllVideoModels(): Promise<Record<string, string[]>> {
|
|
165
|
+
// Get context from bound ToolsService
|
|
166
|
+
const toolService = (
|
|
167
|
+
this instanceof ToolsService ? this : services().Tools
|
|
168
|
+
) as ToolsService;
|
|
169
|
+
|
|
170
|
+
const toolContext = toolService.getContext();
|
|
171
|
+
const { Clients: contextClients } = toolContext;
|
|
172
|
+
|
|
173
|
+
if (!contextClients) {
|
|
174
|
+
throw new Error("Clients not available in tool context");
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return contextClients.listAllVideoModels();
|
|
178
|
+
}
|
package/src/agents/tools/list.ts
CHANGED
|
@@ -506,6 +506,63 @@ export const includedTools = [
|
|
|
506
506
|
},
|
|
507
507
|
},
|
|
508
508
|
|
|
509
|
+
{
|
|
510
|
+
type: "function",
|
|
511
|
+
function: {
|
|
512
|
+
name: "listAllImageModels",
|
|
513
|
+
description:
|
|
514
|
+
"List all available image generation models using the knowhow ai client. Use this to discover which providers and models support image generation.",
|
|
515
|
+
parameters: {
|
|
516
|
+
type: "object",
|
|
517
|
+
properties: {},
|
|
518
|
+
required: [],
|
|
519
|
+
},
|
|
520
|
+
returns: {
|
|
521
|
+
type: "object",
|
|
522
|
+
description:
|
|
523
|
+
"A dictionary of all available image generation models for each provider",
|
|
524
|
+
},
|
|
525
|
+
},
|
|
526
|
+
},
|
|
527
|
+
|
|
528
|
+
{
|
|
529
|
+
type: "function",
|
|
530
|
+
function: {
|
|
531
|
+
name: "listAllAudioModels",
|
|
532
|
+
description:
|
|
533
|
+
"List all available audio generation models (TTS/transcription) using the knowhow ai client. Use this to discover which providers and models support audio generation.",
|
|
534
|
+
parameters: {
|
|
535
|
+
type: "object",
|
|
536
|
+
properties: {},
|
|
537
|
+
required: [],
|
|
538
|
+
},
|
|
539
|
+
returns: {
|
|
540
|
+
type: "object",
|
|
541
|
+
description:
|
|
542
|
+
"A dictionary of all available audio generation models for each provider",
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
},
|
|
546
|
+
|
|
547
|
+
{
|
|
548
|
+
type: "function",
|
|
549
|
+
function: {
|
|
550
|
+
name: "listAllVideoModels",
|
|
551
|
+
description:
|
|
552
|
+
"List all available video generation models using the knowhow ai client. Use this to discover which providers and models support video generation.",
|
|
553
|
+
parameters: {
|
|
554
|
+
type: "object",
|
|
555
|
+
properties: {},
|
|
556
|
+
required: [],
|
|
557
|
+
},
|
|
558
|
+
returns: {
|
|
559
|
+
type: "object",
|
|
560
|
+
description:
|
|
561
|
+
"A dictionary of all available video generation models for each provider",
|
|
562
|
+
},
|
|
563
|
+
},
|
|
564
|
+
},
|
|
565
|
+
|
|
509
566
|
{
|
|
510
567
|
type: "function",
|
|
511
568
|
function: {
|
package/src/clients/index.ts
CHANGED
|
@@ -25,10 +25,23 @@ import { GenericGeminiClient } from "./gemini";
|
|
|
25
25
|
import { HttpClient } from "./http";
|
|
26
26
|
import { EmbeddingModels, Models } from "../types";
|
|
27
27
|
import { getConfig } from "../config";
|
|
28
|
+
import {
|
|
29
|
+
GoogleImageModels,
|
|
30
|
+
GoogleVideoModels,
|
|
31
|
+
GoogleTTSModels,
|
|
32
|
+
OpenAiImageModels,
|
|
33
|
+
OpenAiVideoModels,
|
|
34
|
+
OpenAiTTSModels,
|
|
35
|
+
OpenAiTranscriptionModels,
|
|
36
|
+
XaiImageModels,
|
|
37
|
+
XaiVideoModels,
|
|
38
|
+
} from "../types";
|
|
28
39
|
import { GenericXAIClient } from "./xai";
|
|
29
40
|
import { KnowhowGenericClient } from "./knowhow";
|
|
30
41
|
import { loadKnowhowJwt } from "../services/KnowhowClient";
|
|
31
42
|
|
|
43
|
+
export type ModelModality = "completion" | "embedding" | "image" | "audio" | "video";
|
|
44
|
+
|
|
32
45
|
function envCheck(key: string): boolean {
|
|
33
46
|
const value = process.env[key];
|
|
34
47
|
if (!value) {
|
|
@@ -85,6 +98,39 @@ export class AIClient {
|
|
|
85
98
|
...(envCheck("XAI_API_KEY") && { xai: this.completionModels.xai }),
|
|
86
99
|
};
|
|
87
100
|
|
|
101
|
+
imageModels: Record<string, string[]> = {
|
|
102
|
+
...(envCheck("OPENAI_KEY") && {
|
|
103
|
+
openai: OpenAiImageModels,
|
|
104
|
+
}),
|
|
105
|
+
...(envCheck("GEMINI_API_KEY") && {
|
|
106
|
+
google: GoogleImageModels,
|
|
107
|
+
}),
|
|
108
|
+
...(envCheck("XAI_API_KEY") && {
|
|
109
|
+
xai: XaiImageModels,
|
|
110
|
+
}),
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
audioModels: Record<string, string[]> = {
|
|
114
|
+
...(envCheck("OPENAI_KEY") && {
|
|
115
|
+
openai: [...OpenAiTTSModels, ...OpenAiTranscriptionModels],
|
|
116
|
+
}),
|
|
117
|
+
...(envCheck("GEMINI_API_KEY") && {
|
|
118
|
+
google: GoogleTTSModels,
|
|
119
|
+
}),
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
videoModels: Record<string, string[]> = {
|
|
123
|
+
...(envCheck("OPENAI_KEY") && {
|
|
124
|
+
openai: OpenAiVideoModels,
|
|
125
|
+
}),
|
|
126
|
+
...(envCheck("GEMINI_API_KEY") && {
|
|
127
|
+
google: GoogleVideoModels,
|
|
128
|
+
}),
|
|
129
|
+
...(envCheck("XAI_API_KEY") && {
|
|
130
|
+
xai: XaiVideoModels,
|
|
131
|
+
}),
|
|
132
|
+
};
|
|
133
|
+
|
|
88
134
|
getClient(provider: string, model?: string) {
|
|
89
135
|
if (provider && !model) {
|
|
90
136
|
return { client: this.clients[provider], provider, model: undefined };
|
|
@@ -215,6 +261,39 @@ export class AIClient {
|
|
|
215
261
|
);
|
|
216
262
|
}
|
|
217
263
|
|
|
264
|
+
registerImageModels(provider: string, models: string[]) {
|
|
265
|
+
const currentModels = this.clientModels[provider] || [];
|
|
266
|
+
const currentImageModels = this.imageModels[provider] || [];
|
|
267
|
+
this.clientModels[provider] = Array.from<string>(
|
|
268
|
+
new Set(currentModels.concat(models))
|
|
269
|
+
);
|
|
270
|
+
this.imageModels[provider] = Array.from<string>(
|
|
271
|
+
new Set(currentImageModels.concat(models))
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
registerAudioModels(provider: string, models: string[]) {
|
|
276
|
+
const currentModels = this.clientModels[provider] || [];
|
|
277
|
+
const currentAudioModels = this.audioModels[provider] || [];
|
|
278
|
+
this.clientModels[provider] = Array.from<string>(
|
|
279
|
+
new Set(currentModels.concat(models))
|
|
280
|
+
);
|
|
281
|
+
this.audioModels[provider] = Array.from<string>(
|
|
282
|
+
new Set(currentAudioModels.concat(models))
|
|
283
|
+
);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
registerVideoModels(provider: string, models: string[]) {
|
|
287
|
+
const currentModels = this.clientModels[provider] || [];
|
|
288
|
+
const currentVideoModels = this.videoModels[provider] || [];
|
|
289
|
+
this.clientModels[provider] = Array.from<string>(
|
|
290
|
+
new Set(currentModels.concat(models))
|
|
291
|
+
);
|
|
292
|
+
this.videoModels[provider] = Array.from<string>(
|
|
293
|
+
new Set(currentVideoModels.concat(models))
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
|
|
218
297
|
providerHasModel(provider: string, model: string): boolean {
|
|
219
298
|
const models = this.clientModels[provider];
|
|
220
299
|
if (!models) return false;
|
|
@@ -517,6 +596,18 @@ export class AIClient {
|
|
|
517
596
|
listAllProviders() {
|
|
518
597
|
return Object.keys(this.clientModels);
|
|
519
598
|
}
|
|
599
|
+
|
|
600
|
+
listAllImageModels() {
|
|
601
|
+
return this.imageModels;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
listAllAudioModels() {
|
|
605
|
+
return this.audioModels;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
listAllVideoModels() {
|
|
609
|
+
return this.videoModels;
|
|
610
|
+
}
|
|
520
611
|
}
|
|
521
612
|
|
|
522
613
|
export const Clients = new AIClient();
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Models, EmbeddingModels } from "../../types";
|
|
2
2
|
|
|
3
3
|
export const GeminiTextPricing = {
|
|
4
|
-
|
|
4
|
+
// Gemini 3.x
|
|
5
|
+
[Models.google.Gemini_31_Pro_Preview]: {
|
|
5
6
|
input: 2,
|
|
6
7
|
input_gt_200k: 4,
|
|
7
8
|
output: 12,
|
|
@@ -9,6 +10,45 @@ export const GeminiTextPricing = {
|
|
|
9
10
|
context_caching: 0.2,
|
|
10
11
|
context_caching_gt_200k: 0.4,
|
|
11
12
|
},
|
|
13
|
+
[Models.google.Gemini_31_Flash_Image_Preview]: {
|
|
14
|
+
input: 0.5,
|
|
15
|
+
output: 3,
|
|
16
|
+
image_generation: 0.045, // per 0.5K image
|
|
17
|
+
},
|
|
18
|
+
[Models.google.Gemini_31_Flash_Lite_Preview]: {
|
|
19
|
+
input: 0.25,
|
|
20
|
+
output: 1.5,
|
|
21
|
+
context_caching: 0.025,
|
|
22
|
+
},
|
|
23
|
+
[Models.google.Gemini_3_Flash_Preview]: {
|
|
24
|
+
input: 0.5,
|
|
25
|
+
output: 3.0,
|
|
26
|
+
context_caching: 0.05,
|
|
27
|
+
},
|
|
28
|
+
[Models.google.Gemini_3_Pro_Image_Preview]: {
|
|
29
|
+
input: 2,
|
|
30
|
+
output: 12,
|
|
31
|
+
image_generation: 0.134, // per 1K/2K image
|
|
32
|
+
},
|
|
33
|
+
// Gemini 2.5
|
|
34
|
+
[Models.google.Gemini_25_Pro]: {
|
|
35
|
+
input: 1.25,
|
|
36
|
+
input_gt_200k: 2.5,
|
|
37
|
+
output: 10.0,
|
|
38
|
+
output_gt_200k: 15.0,
|
|
39
|
+
context_caching: 0.125,
|
|
40
|
+
context_caching_gt_200k: 0.25,
|
|
41
|
+
},
|
|
42
|
+
[Models.google.Gemini_25_Flash]: {
|
|
43
|
+
input: 0.3,
|
|
44
|
+
output: 2.5,
|
|
45
|
+
context_caching: 0.03,
|
|
46
|
+
},
|
|
47
|
+
[Models.google.Gemini_25_Flash_Lite]: {
|
|
48
|
+
input: 0.1,
|
|
49
|
+
output: 0.4,
|
|
50
|
+
context_caching: 0.01,
|
|
51
|
+
},
|
|
12
52
|
[Models.google.Gemini_25_Flash_Preview]: {
|
|
13
53
|
input: 0.3,
|
|
14
54
|
output: 2.5,
|
|
@@ -23,6 +63,19 @@ export const GeminiTextPricing = {
|
|
|
23
63
|
context_caching: 0.125,
|
|
24
64
|
context_caching_gt_200k: 0.25,
|
|
25
65
|
},
|
|
66
|
+
[Models.google.Gemini_25_Flash_Image]: {
|
|
67
|
+
input: 0.3,
|
|
68
|
+
output: 0.039, // per image ($30/1M tokens, 1290 tokens per image)
|
|
69
|
+
},
|
|
70
|
+
[Models.google.Gemini_25_Flash_TTS]: {
|
|
71
|
+
input: 0.5,
|
|
72
|
+
output: 10.0,
|
|
73
|
+
},
|
|
74
|
+
[Models.google.Gemini_25_Pro_TTS]: {
|
|
75
|
+
input: 1.0,
|
|
76
|
+
output: 20.0,
|
|
77
|
+
},
|
|
78
|
+
// Gemini 2.0 (deprecated)
|
|
26
79
|
[Models.google.Gemini_20_Flash]: {
|
|
27
80
|
input: 0.1,
|
|
28
81
|
output: 0.4,
|
|
@@ -37,6 +90,7 @@ export const GeminiTextPricing = {
|
|
|
37
90
|
input: 0.075,
|
|
38
91
|
output: 0.3,
|
|
39
92
|
},
|
|
93
|
+
// Gemini 1.5 (legacy)
|
|
40
94
|
[Models.google.Gemini_15_Flash]: {
|
|
41
95
|
input: 0.075,
|
|
42
96
|
output: 0.3,
|
|
@@ -52,14 +106,39 @@ export const GeminiTextPricing = {
|
|
|
52
106
|
output: 5.0,
|
|
53
107
|
context_caching: 0.3125,
|
|
54
108
|
},
|
|
109
|
+
// Image generation
|
|
55
110
|
[Models.google.Imagen_3]: {
|
|
56
|
-
image_generation: 0.
|
|
111
|
+
image_generation: 0.04, // Imagen 4 Standard: $0.04/image
|
|
112
|
+
},
|
|
113
|
+
[Models.google.Imagen_4_Fast]: {
|
|
114
|
+
image_generation: 0.02, // $0.02/image
|
|
57
115
|
},
|
|
116
|
+
[Models.google.Imagen_4_Ultra]: {
|
|
117
|
+
image_generation: 0.06, // $0.06/image
|
|
118
|
+
},
|
|
119
|
+
// Video generation
|
|
58
120
|
[Models.google.Veo_2]: {
|
|
59
121
|
video_generation: 0.35,
|
|
60
122
|
},
|
|
123
|
+
[Models.google.Veo_3]: {
|
|
124
|
+
video_generation: 0.4, // $0.40/second
|
|
125
|
+
},
|
|
126
|
+
[Models.google.Veo_3_Fast]: {
|
|
127
|
+
video_generation: 0.15, // $0.15/second
|
|
128
|
+
},
|
|
129
|
+
[Models.google.Veo_3_1]: {
|
|
130
|
+
video_generation: 0.4, // $0.40/second (720p/1080p)
|
|
131
|
+
},
|
|
132
|
+
[Models.google.Veo_3_1_Fast]: {
|
|
133
|
+
video_generation: 0.15, // $0.15/second
|
|
134
|
+
},
|
|
135
|
+
// Embeddings
|
|
61
136
|
[EmbeddingModels.google.Gemini_Embedding]: {
|
|
62
137
|
input: 0, // Free of charge
|
|
63
138
|
output: 0, // Free of charge
|
|
64
139
|
},
|
|
140
|
+
[EmbeddingModels.google.Gemini_Embedding_001]: {
|
|
141
|
+
input: 0.15,
|
|
142
|
+
output: 0,
|
|
143
|
+
},
|
|
65
144
|
};
|
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
import { Models, EmbeddingModels } from "../../types";
|
|
2
2
|
|
|
3
3
|
export const OpenAiTextPricing = {
|
|
4
|
+
[Models.openai.GPT_54]: {
|
|
5
|
+
input: 2.5,
|
|
6
|
+
cached_input: 0.25,
|
|
7
|
+
output: 15.0,
|
|
8
|
+
},
|
|
9
|
+
[Models.openai.GPT_54_Mini]: {
|
|
10
|
+
input: 0.75,
|
|
11
|
+
cached_input: 0.075,
|
|
12
|
+
output: 4.5,
|
|
13
|
+
},
|
|
14
|
+
[Models.openai.GPT_54_Nano]: {
|
|
15
|
+
input: 0.2,
|
|
16
|
+
cached_input: 0.02,
|
|
17
|
+
output: 1.25,
|
|
18
|
+
},
|
|
19
|
+
[Models.openai.GPT_54_Pro]: {
|
|
20
|
+
input: 30.0,
|
|
21
|
+
cached_input: 0,
|
|
22
|
+
output: 180.0,
|
|
23
|
+
},
|
|
24
|
+
[Models.openai.GPT_53_Chat]: {
|
|
25
|
+
input: 1.75,
|
|
26
|
+
cached_input: 0.175,
|
|
27
|
+
output: 14.0,
|
|
28
|
+
},
|
|
29
|
+
[Models.openai.GPT_53_Codex]: {
|
|
30
|
+
input: 1.75,
|
|
31
|
+
cached_input: 0.175,
|
|
32
|
+
output: 14.0,
|
|
33
|
+
},
|
|
4
34
|
[Models.openai.GPT_4o]: {
|
|
5
35
|
input: 2.5,
|
|
6
36
|
cached_input: 1.25,
|
|
@@ -76,6 +106,11 @@ export const OpenAiTextPricing = {
|
|
|
76
106
|
cached_input: 0.5,
|
|
77
107
|
output: 8.0,
|
|
78
108
|
},
|
|
109
|
+
[Models.openai.o3_Pro]: {
|
|
110
|
+
input: 20.0,
|
|
111
|
+
cached_input: 0,
|
|
112
|
+
output: 80.0,
|
|
113
|
+
},
|
|
79
114
|
[Models.openai.o4_Mini]: {
|
|
80
115
|
input: 1.1,
|
|
81
116
|
cached_input: 0.275,
|
|
@@ -131,4 +166,37 @@ export const OpenAiTextPricing = {
|
|
|
131
166
|
cached_input: 0,
|
|
132
167
|
output: 0,
|
|
133
168
|
},
|
|
169
|
+
// New realtime models
|
|
170
|
+
[Models.openai.GPT_Realtime_15]: {
|
|
171
|
+
input: 4.0,
|
|
172
|
+
cached_input: 0.4,
|
|
173
|
+
output: 16.0,
|
|
174
|
+
},
|
|
175
|
+
[Models.openai.GPT_Realtime_Mini]: {
|
|
176
|
+
input: 0.6,
|
|
177
|
+
cached_input: 0.06,
|
|
178
|
+
output: 2.4,
|
|
179
|
+
},
|
|
180
|
+
// New image models (text token pricing)
|
|
181
|
+
[Models.openai.GPT_Image_15]: {
|
|
182
|
+
input: 5.0,
|
|
183
|
+
cached_input: 1.25,
|
|
184
|
+
output: 10.0,
|
|
185
|
+
},
|
|
186
|
+
[Models.openai.GPT_Image_1_Mini]: {
|
|
187
|
+
input: 2.0,
|
|
188
|
+
cached_input: 0.2,
|
|
189
|
+
output: 0,
|
|
190
|
+
},
|
|
191
|
+
// New transcription models
|
|
192
|
+
[Models.openai.GPT_4o_Transcribe]: {
|
|
193
|
+
input: 2.5,
|
|
194
|
+
cached_input: 0,
|
|
195
|
+
output: 10.0,
|
|
196
|
+
},
|
|
197
|
+
[Models.openai.GPT_4o_Mini_Transcribe]: {
|
|
198
|
+
input: 1.25,
|
|
199
|
+
cached_input: 0,
|
|
200
|
+
output: 5.0,
|
|
201
|
+
},
|
|
134
202
|
};
|
package/src/types.ts
CHANGED
|
@@ -216,6 +216,12 @@ export const Models = {
|
|
|
216
216
|
openai: {
|
|
217
217
|
GPT_5_2: "gpt-5.2",
|
|
218
218
|
GPT_5_1: "gpt-5.1",
|
|
219
|
+
GPT_54: "gpt-5.4",
|
|
220
|
+
GPT_54_Mini: "gpt-5.4-mini",
|
|
221
|
+
GPT_54_Nano: "gpt-5.4-nano",
|
|
222
|
+
GPT_54_Pro: "gpt-5.4-pro",
|
|
223
|
+
GPT_53_Chat: "gpt-5.3-chat-latest",
|
|
224
|
+
GPT_53_Codex: "gpt-5.3-codex",
|
|
219
225
|
GPT_5: "gpt-5",
|
|
220
226
|
GPT_5_Mini: "gpt-5-mini",
|
|
221
227
|
GPT_5_Nano: "gpt-5-nano",
|
|
@@ -239,6 +245,12 @@ export const Models = {
|
|
|
239
245
|
GPT_4o_Mini_Search: "gpt-4o-mini-search-preview-2025-03-11",
|
|
240
246
|
GPT_4o_Search: "gpt-4o-search-preview-2025-03-11",
|
|
241
247
|
|
|
248
|
+
GPT_4o_Transcribe: "gpt-4o-transcribe",
|
|
249
|
+
GPT_4o_Mini_Transcribe: "gpt-4o-mini-transcribe",
|
|
250
|
+
GPT_Realtime_15: "gpt-realtime-1.5",
|
|
251
|
+
GPT_Realtime_Mini: "gpt-realtime-mini",
|
|
252
|
+
GPT_Image_15: "gpt-image-1.5",
|
|
253
|
+
GPT_Image_1_Mini: "gpt-image-1-mini",
|
|
242
254
|
TTS_1: "tts-1",
|
|
243
255
|
Whisper_1: "whisper-1",
|
|
244
256
|
DALL_E_3: "dall-e-3",
|
|
@@ -250,19 +262,41 @@ export const Models = {
|
|
|
250
262
|
// Codex_Mini: "codex-mini-latest",
|
|
251
263
|
},
|
|
252
264
|
google: {
|
|
253
|
-
|
|
265
|
+
// Gemini 3.x
|
|
266
|
+
Gemini_31_Pro_Preview: "gemini-3.1-pro-preview",
|
|
267
|
+
Gemini_31_Flash_Image_Preview: "gemini-3.1-flash-image-preview",
|
|
268
|
+
Gemini_31_Flash_Lite_Preview: "gemini-3.1-flash-lite-preview",
|
|
269
|
+
Gemini_3_Flash_Preview: "gemini-3-flash-preview",
|
|
270
|
+
Gemini_3_Pro_Image_Preview: "gemini-3-pro-image-preview",
|
|
271
|
+
// Gemini 2.5
|
|
272
|
+
Gemini_25_Pro: "gemini-2.5-pro",
|
|
273
|
+
Gemini_25_Flash: "gemini-2.5-flash",
|
|
274
|
+
Gemini_25_Flash_Lite: "gemini-2.5-flash-lite",
|
|
254
275
|
Gemini_25_Flash_Preview: "gemini-2.5-flash-preview-05-20",
|
|
255
276
|
Gemini_25_Pro_Preview: "gemini-2.5-pro-preview-05-06",
|
|
277
|
+
Gemini_25_Flash_Image: "gemini-2.5-flash-image",
|
|
278
|
+
Gemini_25_Flash_Live: "gemini-2.5-flash-live-preview",
|
|
279
|
+
Gemini_25_Flash_Native_Audio: "gemini-2.5-flash-native-audio-preview-12-2025",
|
|
280
|
+
Gemini_25_Pro_TTS: "gemini-2.5-pro-preview-tts",
|
|
281
|
+
// Gemini 2.0 (deprecated)
|
|
256
282
|
Gemini_20_Flash: "gemini-2.0-flash",
|
|
257
283
|
Gemini_20_Flash_Preview_Image_Generation:
|
|
258
284
|
"gemini-2.0-flash-exp-image-generation",
|
|
259
285
|
Gemini_20_Flash_Lite: "gemini-2.0-flash-lite",
|
|
286
|
+
// Gemini 1.5 (legacy)
|
|
260
287
|
Gemini_15_Flash: "gemini-1.5-flash",
|
|
261
288
|
Gemini_15_Flash_8B: "gemini-1.5-flash-8b",
|
|
262
289
|
Gemini_15_Pro: "gemini-1.5-pro",
|
|
290
|
+
// Media generation
|
|
263
291
|
Imagen_3: "imagen-4.0-generate-001",
|
|
292
|
+
Imagen_4_Fast: "imagen-4.0-fast-generate-001",
|
|
293
|
+
Imagen_4_Ultra: "imagen-4.0-ultra-generate-001",
|
|
264
294
|
Veo_2: "veo-2.0-generate-001",
|
|
295
|
+
Veo_3: "veo-3.0-generate-001",
|
|
296
|
+
Veo_3_Fast: "veo-3.0-fast-generate-001",
|
|
265
297
|
Veo_3_1: "veo-3.1-generate-preview",
|
|
298
|
+
Veo_3_1_Fast: "veo-3.1-fast-generate-preview",
|
|
299
|
+
// Audio / Live
|
|
266
300
|
Gemini_20_Flash_Live: "gemini-2.0-flash-live-001",
|
|
267
301
|
Gemini_25_Flash_TTS: "gemini-2.5-flash-preview-tts",
|
|
268
302
|
Gemini_20_Flash_TTS: "gemini-2.0-flash-preview-tts",
|
|
@@ -277,6 +311,7 @@ export const EmbeddingModels = {
|
|
|
277
311
|
},
|
|
278
312
|
google: {
|
|
279
313
|
Gemini_Embedding: "gemini-embedding-exp",
|
|
314
|
+
Gemini_Embedding_001: "gemini-embedding-001",
|
|
280
315
|
},
|
|
281
316
|
};
|
|
282
317
|
|
|
@@ -306,6 +341,12 @@ export const OpenAiReasoningModels = [
|
|
|
306
341
|
Models.openai.o3,
|
|
307
342
|
Models.openai.o3_Pro,
|
|
308
343
|
Models.openai.o4_Mini,
|
|
344
|
+
Models.openai.GPT_54,
|
|
345
|
+
Models.openai.GPT_54_Mini,
|
|
346
|
+
Models.openai.GPT_54_Nano,
|
|
347
|
+
Models.openai.GPT_54_Pro,
|
|
348
|
+
Models.openai.GPT_53_Chat,
|
|
349
|
+
Models.openai.GPT_53_Codex,
|
|
309
350
|
Models.openai.GPT_5,
|
|
310
351
|
Models.openai.GPT_5_Mini,
|
|
311
352
|
Models.openai.GPT_5_Nano,
|
|
@@ -321,6 +362,12 @@ export const OpenAiEmbeddingModels = [
|
|
|
321
362
|
// export const OpenAiResponseOnlyModels = [Models.openai.Codex_Mini];
|
|
322
363
|
|
|
323
364
|
export const GoogleReasoningModels = [
|
|
365
|
+
Models.google.Gemini_31_Pro_Preview,
|
|
366
|
+
Models.google.Gemini_31_Flash_Lite_Preview,
|
|
367
|
+
Models.google.Gemini_3_Flash_Preview,
|
|
368
|
+
Models.google.Gemini_25_Pro,
|
|
369
|
+
Models.google.Gemini_25_Flash,
|
|
370
|
+
Models.google.Gemini_25_Flash_Lite,
|
|
324
371
|
Models.google.Gemini_25_Flash_Preview,
|
|
325
372
|
Models.google.Gemini_25_Pro_Preview,
|
|
326
373
|
Models.google.Gemini_20_Flash,
|
|
@@ -331,13 +378,20 @@ export const GoogleReasoningModels = [
|
|
|
331
378
|
];
|
|
332
379
|
|
|
333
380
|
export const GoogleImageModels = [
|
|
381
|
+
Models.google.Gemini_31_Flash_Image_Preview,
|
|
382
|
+
Models.google.Gemini_3_Pro_Image_Preview,
|
|
383
|
+
Models.google.Gemini_25_Flash_Image,
|
|
334
384
|
Models.google.Gemini_20_Flash_Preview_Image_Generation,
|
|
335
385
|
Models.google.Imagen_3,
|
|
386
|
+
Models.google.Imagen_4_Fast,
|
|
387
|
+
Models.google.Imagen_4_Ultra,
|
|
336
388
|
];
|
|
337
389
|
|
|
338
390
|
export const OpenAiImageModels = [
|
|
339
391
|
Models.openai.DALL_E_3,
|
|
340
392
|
Models.openai.DALL_E_2,
|
|
393
|
+
Models.openai.GPT_Image_15,
|
|
394
|
+
Models.openai.GPT_Image_1_Mini,
|
|
341
395
|
];
|
|
342
396
|
|
|
343
397
|
export const OpenAiVideoModels = [
|
|
@@ -348,17 +402,36 @@ export const OpenAiVideoModels = [
|
|
|
348
402
|
|
|
349
403
|
export const OpenAiTTSModels = [Models.openai.TTS_1];
|
|
350
404
|
|
|
351
|
-
export const OpenAiTranscriptionModels = [Models.openai.Whisper_1];
|
|
352
|
-
|
|
353
405
|
export const XaiImageModels = [Models.xai.GrokImagineImage];
|
|
406
|
+
export const OpenAiTranscriptionModels = [
|
|
407
|
+
Models.openai.Whisper_1,
|
|
408
|
+
Models.openai.GPT_4o_Transcribe,
|
|
409
|
+
Models.openai.GPT_4o_Mini_Transcribe,
|
|
410
|
+
];
|
|
354
411
|
|
|
412
|
+
export const OpenAiRealtimeModels = [
|
|
413
|
+
Models.openai.GPT_4o_Realtime,
|
|
414
|
+
Models.openai.GPT_4o_Mini_Realtime,
|
|
415
|
+
Models.openai.GPT_Realtime_15,
|
|
416
|
+
Models.openai.GPT_Realtime_Mini,
|
|
417
|
+
];
|
|
355
418
|
export const XaiVideoModels = [Models.xai.GrokImagineVideo];
|
|
356
419
|
|
|
357
420
|
export const GoogleTTSModels = [
|
|
358
421
|
Models.google.Gemini_25_Flash_TTS,
|
|
422
|
+
Models.google.Gemini_25_Pro_TTS,
|
|
359
423
|
Models.google.Gemini_20_Flash_TTS,
|
|
360
424
|
];
|
|
361
425
|
|
|
362
|
-
export const GoogleVideoModels = [
|
|
426
|
+
export const GoogleVideoModels = [
|
|
427
|
+
Models.google.Veo_2,
|
|
428
|
+
Models.google.Veo_3,
|
|
429
|
+
Models.google.Veo_3_Fast,
|
|
430
|
+
Models.google.Veo_3_1,
|
|
431
|
+
Models.google.Veo_3_1_Fast,
|
|
432
|
+
];
|
|
363
433
|
|
|
364
|
-
export const GoogleEmbeddingModels = [
|
|
434
|
+
export const GoogleEmbeddingModels = [
|
|
435
|
+
EmbeddingModels.google.Gemini_Embedding,
|
|
436
|
+
EmbeddingModels.google.Gemini_Embedding_001,
|
|
437
|
+
];
|