@yrpri/api 9.0.197 → 9.0.199
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.
|
@@ -609,6 +609,40 @@ export class NewAiModelSetup {
|
|
|
609
609
|
await openAiGpt51.save();
|
|
610
610
|
log.debug("OpenAI model already exists: GPT-5.1");
|
|
611
611
|
}
|
|
612
|
+
const openAiGpt52 = await PsAiModel.findOne({
|
|
613
|
+
where: { name: "GPT-5.2" },
|
|
614
|
+
});
|
|
615
|
+
const openAiGpt52Config = {
|
|
616
|
+
type: PsAiModelType.TextReasoning,
|
|
617
|
+
modelSize: PsAiModelSize.Large,
|
|
618
|
+
provider: "openai",
|
|
619
|
+
prices: {
|
|
620
|
+
costInTokensPerMillion: 1.75,
|
|
621
|
+
costOutTokensPerMillion: 14.0,
|
|
622
|
+
costInCachedContextTokensPerMillion: 0.175,
|
|
623
|
+
currency: "USD",
|
|
624
|
+
},
|
|
625
|
+
maxTokensOut: 128000,
|
|
626
|
+
maxContextTokens: 400000,
|
|
627
|
+
defaultTemperature: 0.7,
|
|
628
|
+
model: "gpt-5.2",
|
|
629
|
+
active: true,
|
|
630
|
+
};
|
|
631
|
+
if (!openAiGpt52) {
|
|
632
|
+
await PsAiModel.create({
|
|
633
|
+
name: "GPT-5.2",
|
|
634
|
+
organization_id: 1,
|
|
635
|
+
user_id: userId,
|
|
636
|
+
configuration: openAiGpt52Config,
|
|
637
|
+
});
|
|
638
|
+
log.info("Created OpenAI model: GPT-5.2");
|
|
639
|
+
}
|
|
640
|
+
else {
|
|
641
|
+
openAiGpt52.set("configuration", openAiGpt52Config);
|
|
642
|
+
openAiGpt52.changed("configuration", true);
|
|
643
|
+
await openAiGpt52.save();
|
|
644
|
+
log.debug("OpenAI model already exists: GPT-5.2");
|
|
645
|
+
}
|
|
612
646
|
}
|
|
613
647
|
/**
|
|
614
648
|
* Seeds Google models.
|
|
@@ -863,6 +897,40 @@ export class NewAiModelSetup {
|
|
|
863
897
|
await gemini3FlashPreview.save();
|
|
864
898
|
log.debug("Google model already exists: Gemini 3 Flash Preview");
|
|
865
899
|
}
|
|
900
|
+
const gemini30Flash = await PsAiModel.findOne({
|
|
901
|
+
where: { name: "Gemini 3.0 Flash" },
|
|
902
|
+
});
|
|
903
|
+
const gemini30FlashConfig = {
|
|
904
|
+
type: PsAiModelType.Text,
|
|
905
|
+
modelSize: PsAiModelSize.Medium,
|
|
906
|
+
provider: "google",
|
|
907
|
+
prices: {
|
|
908
|
+
costInTokensPerMillion: 0.5,
|
|
909
|
+
costOutTokensPerMillion: 3.0,
|
|
910
|
+
costInCachedContextTokensPerMillion: 0.25,
|
|
911
|
+
currency: "USD",
|
|
912
|
+
},
|
|
913
|
+
model: "gemini-3.0-flash-preview",
|
|
914
|
+
active: true,
|
|
915
|
+
maxTokensOut: 100000,
|
|
916
|
+
maxContextTokens: 1000000,
|
|
917
|
+
defaultTemperature: 0.0,
|
|
918
|
+
};
|
|
919
|
+
if (!gemini30Flash) {
|
|
920
|
+
await PsAiModel.create({
|
|
921
|
+
name: "Gemini 3.0 Flash",
|
|
922
|
+
organization_id: 1,
|
|
923
|
+
user_id: userId,
|
|
924
|
+
configuration: gemini30FlashConfig,
|
|
925
|
+
});
|
|
926
|
+
log.info("Created Google model: Gemini 3.0 Flash");
|
|
927
|
+
}
|
|
928
|
+
else {
|
|
929
|
+
gemini30Flash.set("configuration", gemini30FlashConfig);
|
|
930
|
+
gemini30Flash.changed("configuration", true);
|
|
931
|
+
await gemini30Flash.save();
|
|
932
|
+
log.debug("Google model already exists: Gemini 3.0 Flash");
|
|
933
|
+
}
|
|
866
934
|
}
|
|
867
935
|
/**
|
|
868
936
|
* Master seeding function which calls the provider-specific functions
|
|
@@ -978,6 +1046,8 @@ export class NewAiModelSetup {
|
|
|
978
1046
|
{ name: "o3", envKey: "OPENAI_API_KEY" },
|
|
979
1047
|
{ name: "GPT-5", envKey: "OPENAI_API_KEY" },
|
|
980
1048
|
{ name: "GPT-5.1", envKey: "OPENAI_API_KEY" },
|
|
1049
|
+
{ name: "GPT-5.2", envKey: "OPENAI_API_KEY" },
|
|
1050
|
+
{ name: "Gemini 3.0 Flash", envKey: "GEMINI_API_KEY" },
|
|
981
1051
|
];
|
|
982
1052
|
const groupAccessConfig = [];
|
|
983
1053
|
for (const { name, envKey } of modelsMapping) {
|