@yrpri/api 9.0.206 → 9.0.208
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.
|
@@ -643,6 +643,82 @@ export class NewAiModelSetup {
|
|
|
643
643
|
await openAiGpt52.save();
|
|
644
644
|
log.debug("OpenAI model already exists: GPT-5.2");
|
|
645
645
|
}
|
|
646
|
+
const openAiGpt54 = await PsAiModel.findOne({
|
|
647
|
+
where: { name: "GPT-5.4" },
|
|
648
|
+
});
|
|
649
|
+
const openAiGpt54Config = {
|
|
650
|
+
type: PsAiModelType.TextReasoning,
|
|
651
|
+
modelSize: PsAiModelSize.Large,
|
|
652
|
+
provider: "openai",
|
|
653
|
+
prices: {
|
|
654
|
+
costInTokensPerMillion: 2.5,
|
|
655
|
+
costOutTokensPerMillion: 15.0,
|
|
656
|
+
costInCachedContextTokensPerMillion: 0.25,
|
|
657
|
+
longContextTokenThreshold: 272000,
|
|
658
|
+
longContextCostInTokensPerMillion: 5.0,
|
|
659
|
+
longContextCostInCachedContextTokensPerMillion: 0.5,
|
|
660
|
+
longContextCostOutTokensPerMillion: 22.5,
|
|
661
|
+
currency: "USD",
|
|
662
|
+
},
|
|
663
|
+
maxTokensOut: 128000,
|
|
664
|
+
maxContextTokens: 1050000,
|
|
665
|
+
defaultTemperature: 0.7,
|
|
666
|
+
model: "gpt-5.4",
|
|
667
|
+
active: true,
|
|
668
|
+
};
|
|
669
|
+
if (!openAiGpt54) {
|
|
670
|
+
await PsAiModel.create({
|
|
671
|
+
name: "GPT-5.4",
|
|
672
|
+
organization_id: 1,
|
|
673
|
+
user_id: userId,
|
|
674
|
+
configuration: openAiGpt54Config,
|
|
675
|
+
});
|
|
676
|
+
log.info("Created OpenAI model: GPT-5.4");
|
|
677
|
+
}
|
|
678
|
+
else {
|
|
679
|
+
openAiGpt54.set("configuration", openAiGpt54Config);
|
|
680
|
+
openAiGpt54.changed("configuration", true);
|
|
681
|
+
await openAiGpt54.save();
|
|
682
|
+
log.debug("OpenAI model already exists: GPT-5.4");
|
|
683
|
+
}
|
|
684
|
+
const openAiGpt54Pro = await PsAiModel.findOne({
|
|
685
|
+
where: { name: "GPT-5.4 Pro" },
|
|
686
|
+
});
|
|
687
|
+
const openAiGpt54ProConfig = {
|
|
688
|
+
type: PsAiModelType.TextReasoning,
|
|
689
|
+
modelSize: PsAiModelSize.Large,
|
|
690
|
+
provider: "openai",
|
|
691
|
+
prices: {
|
|
692
|
+
costInTokensPerMillion: 30.0,
|
|
693
|
+
costOutTokensPerMillion: 180.0,
|
|
694
|
+
costInCachedContextTokensPerMillion: 0.0,
|
|
695
|
+
longContextTokenThreshold: 272000,
|
|
696
|
+
longContextCostInTokensPerMillion: 60.0,
|
|
697
|
+
longContextCostInCachedContextTokensPerMillion: 0.0,
|
|
698
|
+
longContextCostOutTokensPerMillion: 270.0,
|
|
699
|
+
currency: "USD",
|
|
700
|
+
},
|
|
701
|
+
maxTokensOut: 128000,
|
|
702
|
+
maxContextTokens: 1050000,
|
|
703
|
+
defaultTemperature: 0.7,
|
|
704
|
+
model: "gpt-5.4-pro",
|
|
705
|
+
active: true,
|
|
706
|
+
};
|
|
707
|
+
if (!openAiGpt54Pro) {
|
|
708
|
+
await PsAiModel.create({
|
|
709
|
+
name: "GPT-5.4 Pro",
|
|
710
|
+
organization_id: 1,
|
|
711
|
+
user_id: userId,
|
|
712
|
+
configuration: openAiGpt54ProConfig,
|
|
713
|
+
});
|
|
714
|
+
log.info("Created OpenAI model: GPT-5.4 Pro");
|
|
715
|
+
}
|
|
716
|
+
else {
|
|
717
|
+
openAiGpt54Pro.set("configuration", openAiGpt54ProConfig);
|
|
718
|
+
openAiGpt54Pro.changed("configuration", true);
|
|
719
|
+
await openAiGpt54Pro.save();
|
|
720
|
+
log.debug("OpenAI model already exists: GPT-5.4 Pro");
|
|
721
|
+
}
|
|
646
722
|
}
|
|
647
723
|
/**
|
|
648
724
|
* Seeds Google models.
|
|
@@ -864,6 +940,40 @@ export class NewAiModelSetup {
|
|
|
864
940
|
await gemini31ProPreview.save();
|
|
865
941
|
log.debug("Google model already exists: Gemini 3.1 Pro Preview");
|
|
866
942
|
}
|
|
943
|
+
const gemini31FlashLitePreview = await PsAiModel.findOne({
|
|
944
|
+
where: { name: "Gemini 3.1 Flash Lite Preview" },
|
|
945
|
+
});
|
|
946
|
+
const gemini31FlashLitePreviewConfig = {
|
|
947
|
+
type: PsAiModelType.Text,
|
|
948
|
+
modelSize: PsAiModelSize.Medium,
|
|
949
|
+
provider: "google",
|
|
950
|
+
prices: {
|
|
951
|
+
costInTokensPerMillion: 0.25,
|
|
952
|
+
costOutTokensPerMillion: 1.5,
|
|
953
|
+
costInCachedContextTokensPerMillion: 0.025,
|
|
954
|
+
currency: "USD",
|
|
955
|
+
},
|
|
956
|
+
model: "gemini-3.1-flash-lite-preview",
|
|
957
|
+
active: true,
|
|
958
|
+
maxTokensOut: 65536,
|
|
959
|
+
maxContextTokens: 1000000,
|
|
960
|
+
defaultTemperature: 0.0,
|
|
961
|
+
};
|
|
962
|
+
if (!gemini31FlashLitePreview) {
|
|
963
|
+
await PsAiModel.create({
|
|
964
|
+
name: "Gemini 3.1 Flash Lite Preview",
|
|
965
|
+
organization_id: 1,
|
|
966
|
+
user_id: userId,
|
|
967
|
+
configuration: gemini31FlashLitePreviewConfig,
|
|
968
|
+
});
|
|
969
|
+
log.info("Created Google model: Gemini 3.1 Flash Lite Preview");
|
|
970
|
+
}
|
|
971
|
+
else {
|
|
972
|
+
gemini31FlashLitePreview.set("configuration", gemini31FlashLitePreviewConfig);
|
|
973
|
+
gemini31FlashLitePreview.changed("configuration", true);
|
|
974
|
+
await gemini31FlashLitePreview.save();
|
|
975
|
+
log.debug("Google model already exists: Gemini 3.1 Flash Lite Preview");
|
|
976
|
+
}
|
|
867
977
|
const gemini30Flash = await PsAiModel.findOne({
|
|
868
978
|
where: { name: "Gemini 3.0 Flash" },
|
|
869
979
|
});
|
|
@@ -1023,8 +1133,11 @@ export class NewAiModelSetup {
|
|
|
1023
1133
|
{ name: "GPT-5", envKey: "OPENAI_API_KEY" },
|
|
1024
1134
|
{ name: "GPT-5.1", envKey: "OPENAI_API_KEY" },
|
|
1025
1135
|
{ name: "GPT-5.2", envKey: "OPENAI_API_KEY" },
|
|
1136
|
+
{ name: "GPT-5.4", envKey: "OPENAI_API_KEY" },
|
|
1137
|
+
{ name: "GPT-5.4 Pro", envKey: "OPENAI_API_KEY" },
|
|
1026
1138
|
{ name: "Gemini 3 Pro Preview", envKey: "GEMINI_API_KEY" },
|
|
1027
1139
|
{ name: "Gemini 3.1 Pro Preview", envKey: "GEMINI_API_KEY" },
|
|
1140
|
+
{ name: "Gemini 3.1 Flash Lite Preview", envKey: "GEMINI_API_KEY" },
|
|
1028
1141
|
{ name: "Gemini 3.0 Flash", envKey: "GEMINI_API_KEY" },
|
|
1029
1142
|
];
|
|
1030
1143
|
const groupAccessConfig = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yrpri/api",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.208",
|
|
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.164",
|
|
29
29
|
"async": "^3.2.6",
|
|
30
30
|
"authorized": "^1.0.0",
|
|
31
31
|
"aws-sdk": "^2.1692.0",
|