@yrpri/api 9.0.185 → 9.0.187
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.
|
@@ -577,6 +577,40 @@ export class NewAiModelSetup {
|
|
|
577
577
|
await openAiGpt5.save();
|
|
578
578
|
log.debug("OpenAI model already exists: GPT-5");
|
|
579
579
|
}
|
|
580
|
+
const openAiGpt51 = await PsAiModel.findOne({
|
|
581
|
+
where: { name: "GPT-5.1" },
|
|
582
|
+
});
|
|
583
|
+
const openAiGpt51Config = {
|
|
584
|
+
type: PsAiModelType.TextReasoning,
|
|
585
|
+
modelSize: PsAiModelSize.Large,
|
|
586
|
+
provider: "openai",
|
|
587
|
+
prices: {
|
|
588
|
+
costInTokensPerMillion: 1.25,
|
|
589
|
+
costOutTokensPerMillion: 10.0,
|
|
590
|
+
costInCachedContextTokensPerMillion: 0.125,
|
|
591
|
+
currency: "USD",
|
|
592
|
+
},
|
|
593
|
+
maxTokensOut: 128000,
|
|
594
|
+
maxContextTokens: 400000,
|
|
595
|
+
defaultTemperature: 0.7,
|
|
596
|
+
model: "gpt-5.1",
|
|
597
|
+
active: true,
|
|
598
|
+
};
|
|
599
|
+
if (!openAiGpt51) {
|
|
600
|
+
await PsAiModel.create({
|
|
601
|
+
name: "GPT-5.1",
|
|
602
|
+
organization_id: 1,
|
|
603
|
+
user_id: userId,
|
|
604
|
+
configuration: openAiGpt51Config,
|
|
605
|
+
});
|
|
606
|
+
log.info("Created OpenAI model: GPT-5.1");
|
|
607
|
+
}
|
|
608
|
+
else {
|
|
609
|
+
openAiGpt51.set("configuration", openAiGpt51Config);
|
|
610
|
+
openAiGpt51.changed("configuration", true);
|
|
611
|
+
await openAiGpt51.save();
|
|
612
|
+
log.debug("OpenAI model already exists: GPT-5.1");
|
|
613
|
+
}
|
|
580
614
|
}
|
|
581
615
|
/**
|
|
582
616
|
* Seeds Google models.
|
|
@@ -948,6 +982,8 @@ export class NewAiModelSetup {
|
|
|
948
982
|
{ name: "GPT-4.1 mini", envKey: "OPENAI_API_KEY" },
|
|
949
983
|
{ name: "GPT-4.1 nano", envKey: "OPENAI_API_KEY" },
|
|
950
984
|
{ name: "o3", envKey: "OPENAI_API_KEY" },
|
|
985
|
+
{ name: "GPT-5", envKey: "OPENAI_API_KEY" },
|
|
986
|
+
{ name: "GPT-5.1", envKey: "OPENAI_API_KEY" },
|
|
951
987
|
];
|
|
952
988
|
const groupAccessConfig = [];
|
|
953
989
|
for (const { name, envKey } of modelsMapping) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yrpri/api",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.187",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Robert Bjarnason & Citizens Foundation",
|
|
6
6
|
"repository": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@google-cloud/vertexai": "^1.10.0",
|
|
26
26
|
"@google-cloud/vision": "^5.1.0",
|
|
27
27
|
"@node-saml/passport-saml": "^5.0.1",
|
|
28
|
-
"@policysynth/agents": "^1.3.
|
|
28
|
+
"@policysynth/agents": "^1.3.153",
|
|
29
29
|
"async": "^3.2.6",
|
|
30
30
|
"authorized": "^1.0.0",
|
|
31
31
|
"aws-sdk": "^2.1692.0",
|