@yrpri/api 9.0.197 → 9.0.198
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.
|
|
@@ -978,6 +1012,7 @@ export class NewAiModelSetup {
|
|
|
978
1012
|
{ name: "o3", envKey: "OPENAI_API_KEY" },
|
|
979
1013
|
{ name: "GPT-5", envKey: "OPENAI_API_KEY" },
|
|
980
1014
|
{ name: "GPT-5.1", envKey: "OPENAI_API_KEY" },
|
|
1015
|
+
{ name: "GPT-5.2", envKey: "OPENAI_API_KEY" },
|
|
981
1016
|
];
|
|
982
1017
|
const groupAccessConfig = [];
|
|
983
1018
|
for (const { name, envKey } of modelsMapping) {
|