@yrpri/api 9.0.187 → 9.0.189
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.
|
@@ -617,77 +617,6 @@ export class NewAiModelSetup {
|
|
|
617
617
|
* Currently, this creates Gemini 1.5 Pro 2 and Gemini 1.5 Flash 2.
|
|
618
618
|
*/
|
|
619
619
|
static async seedGoogleModels(userId) {
|
|
620
|
-
// Gemini 1.5 Pro 2
|
|
621
|
-
const geminiPro = await PsAiModel.findOne({
|
|
622
|
-
where: { name: "Gemini 1.5 Pro 2" },
|
|
623
|
-
});
|
|
624
|
-
const geminiProConfig = {
|
|
625
|
-
type: PsAiModelType.Text,
|
|
626
|
-
modelSize: PsAiModelSize.Medium,
|
|
627
|
-
provider: "google",
|
|
628
|
-
prices: {
|
|
629
|
-
costInTokensPerMillion: 1.25,
|
|
630
|
-
costOutTokensPerMillion: 5.0,
|
|
631
|
-
costInCachedContextTokensPerMillion: 0.875,
|
|
632
|
-
currency: "USD",
|
|
633
|
-
},
|
|
634
|
-
maxTokensOut: 8192,
|
|
635
|
-
maxContextTokens: 1000000,
|
|
636
|
-
defaultTemperature: 0.0,
|
|
637
|
-
model: "gemini-1.5-pro-002",
|
|
638
|
-
active: true,
|
|
639
|
-
};
|
|
640
|
-
if (!geminiPro) {
|
|
641
|
-
await PsAiModel.create({
|
|
642
|
-
name: "Gemini 1.5 Pro 2",
|
|
643
|
-
organization_id: 1,
|
|
644
|
-
user_id: userId,
|
|
645
|
-
configuration: geminiProConfig,
|
|
646
|
-
});
|
|
647
|
-
log.info("Created Google model: Gemini 1.5 Pro 2");
|
|
648
|
-
}
|
|
649
|
-
else {
|
|
650
|
-
geminiPro.set("configuration", geminiProConfig);
|
|
651
|
-
geminiPro.changed("configuration", true);
|
|
652
|
-
await geminiPro.save();
|
|
653
|
-
log.debug("Google model already exists: Gemini 1.5 Pro 2");
|
|
654
|
-
}
|
|
655
|
-
// Gemini 1.5 Flash 2
|
|
656
|
-
const geminiPro15Flash = await PsAiModel.findOne({
|
|
657
|
-
where: { name: "Gemini 1.5 Flash 2" },
|
|
658
|
-
});
|
|
659
|
-
const geminiPro15FlashConfig = {
|
|
660
|
-
type: PsAiModelType.Text,
|
|
661
|
-
modelSize: PsAiModelSize.Small,
|
|
662
|
-
provider: "google",
|
|
663
|
-
prices: {
|
|
664
|
-
costInTokensPerMillion: 0.075,
|
|
665
|
-
costOutTokensPerMillion: 0.3,
|
|
666
|
-
costInCachedContextTokensPerMillion: 0.525,
|
|
667
|
-
currency: "USD",
|
|
668
|
-
},
|
|
669
|
-
maxTokensOut: 8192,
|
|
670
|
-
maxContextTokens: 1000000,
|
|
671
|
-
defaultTemperature: 0.0,
|
|
672
|
-
model: "gemini-1.5-flash-002",
|
|
673
|
-
active: true,
|
|
674
|
-
};
|
|
675
|
-
if (!geminiPro15Flash) {
|
|
676
|
-
await PsAiModel.create({
|
|
677
|
-
name: "Gemini 1.5 Flash 2",
|
|
678
|
-
organization_id: 1,
|
|
679
|
-
user_id: userId,
|
|
680
|
-
configuration: geminiPro15FlashConfig,
|
|
681
|
-
});
|
|
682
|
-
log.info("Created Google model: Gemini 1.5 Flash 2");
|
|
683
|
-
}
|
|
684
|
-
else {
|
|
685
|
-
geminiPro15Flash.set("configuration", geminiPro15FlashConfig);
|
|
686
|
-
geminiPro15Flash.changed("configuration", true);
|
|
687
|
-
await geminiPro15Flash.save();
|
|
688
|
-
log.debug("Google model already exists: Gemini 1.5 Flash 2");
|
|
689
|
-
}
|
|
690
|
-
// Gemini 2.0 Flash
|
|
691
620
|
const gemini20Flash = await PsAiModel.findOne({
|
|
692
621
|
where: { name: "Gemini 2.0 Flash" },
|
|
693
622
|
});
|
|
@@ -865,6 +794,77 @@ export class NewAiModelSetup {
|
|
|
865
794
|
await gemini25Flash.save();
|
|
866
795
|
log.debug("Google model already exists: Gemini 2.5 Flash");
|
|
867
796
|
}
|
|
797
|
+
const gemini3ProPreview = await PsAiModel.findOne({
|
|
798
|
+
where: { name: "Gemini 3 Pro Preview" },
|
|
799
|
+
});
|
|
800
|
+
const gemini3ProPreviewConfig = {
|
|
801
|
+
type: PsAiModelType.Text,
|
|
802
|
+
modelSize: PsAiModelSize.Medium,
|
|
803
|
+
provider: "google",
|
|
804
|
+
prices: {
|
|
805
|
+
costInTokensPerMillion: 2,
|
|
806
|
+
costOutTokensPerMillion: 12,
|
|
807
|
+
costInCachedContextTokensPerMillion: 1,
|
|
808
|
+
longContextTokenThreshold: 200000,
|
|
809
|
+
longContextCostInTokensPerMillion: 4.0,
|
|
810
|
+
longContextCostInCachedContextTokensPerMillion: 2,
|
|
811
|
+
longContextCostOutTokensPerMillion: 18,
|
|
812
|
+
currency: "USD",
|
|
813
|
+
},
|
|
814
|
+
model: "gemini-3-pro-preview",
|
|
815
|
+
active: true,
|
|
816
|
+
maxTokensOut: 100000,
|
|
817
|
+
maxContextTokens: 1000000,
|
|
818
|
+
defaultTemperature: 0.0,
|
|
819
|
+
};
|
|
820
|
+
if (!gemini3ProPreview) {
|
|
821
|
+
await PsAiModel.create({
|
|
822
|
+
name: "Gemini 3 Pro Preview",
|
|
823
|
+
organization_id: 1,
|
|
824
|
+
user_id: userId,
|
|
825
|
+
configuration: gemini3ProPreviewConfig,
|
|
826
|
+
});
|
|
827
|
+
log.info("Created Google model: Gemini 3 Pro Preview");
|
|
828
|
+
}
|
|
829
|
+
else {
|
|
830
|
+
gemini3ProPreview.set("configuration", gemini3ProPreviewConfig);
|
|
831
|
+
gemini3ProPreview.changed("configuration", true);
|
|
832
|
+
await gemini3ProPreview.save();
|
|
833
|
+
log.debug("Google model already exists: Gemini 3 Pro Preview");
|
|
834
|
+
}
|
|
835
|
+
const gemini3FlashPreview = await PsAiModel.findOne({
|
|
836
|
+
where: { name: "Gemini 3 Flash Preview" },
|
|
837
|
+
});
|
|
838
|
+
const gemini3FlashPreviewConfig = {
|
|
839
|
+
type: PsAiModelType.Text,
|
|
840
|
+
modelSize: PsAiModelSize.Medium,
|
|
841
|
+
provider: "google",
|
|
842
|
+
prices: {
|
|
843
|
+
costInTokensPerMillion: 0.1,
|
|
844
|
+
costOutTokensPerMillion: 0.4,
|
|
845
|
+
costInCachedContextTokensPerMillion: 0.07,
|
|
846
|
+
currency: "USD",
|
|
847
|
+
},
|
|
848
|
+
model: "gemini-3-flash-preview",
|
|
849
|
+
active: true,
|
|
850
|
+
maxTokensOut: 100000,
|
|
851
|
+
maxContextTokens: 1000000,
|
|
852
|
+
defaultTemperature: 0.0,
|
|
853
|
+
};
|
|
854
|
+
if (!gemini3FlashPreview) {
|
|
855
|
+
await PsAiModel.create({
|
|
856
|
+
name: "Gemini 3 Flash Preview",
|
|
857
|
+
organization_id: 1,
|
|
858
|
+
user_id: userId,
|
|
859
|
+
configuration: gemini3FlashPreviewConfig,
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
else {
|
|
863
|
+
gemini3FlashPreview.set("configuration", gemini3FlashPreviewConfig);
|
|
864
|
+
gemini3FlashPreview.changed("configuration", true);
|
|
865
|
+
await gemini3FlashPreview.save();
|
|
866
|
+
log.debug("Google model already exists: Gemini 3 Flash Preview");
|
|
867
|
+
}
|
|
868
868
|
}
|
|
869
869
|
/**
|
|
870
870
|
* Master seeding function which calls the provider-specific functions
|
|
@@ -969,13 +969,10 @@ export class NewAiModelSetup {
|
|
|
969
969
|
{ name: "GPT-4.5 Preview", envKey: "OPENAI_API_KEY" },
|
|
970
970
|
{ name: "o1 Preview", envKey: "OPENAI_API_KEY" },
|
|
971
971
|
{ name: "o1 Mini", envKey: "OPENAI_API_KEY" },
|
|
972
|
-
{ name: "Gemini 1.5 Pro 2", envKey: "GEMINI_API_KEY" },
|
|
973
|
-
{ name: "Gemini 1.5 Flash 2", envKey: "GEMINI_API_KEY" },
|
|
974
972
|
{ name: "Gemini 2.0 Flash", envKey: "GEMINI_API_KEY" },
|
|
975
973
|
{ name: "Gemini 2.5 Pro", envKey: "GEMINI_API_KEY" },
|
|
976
974
|
{ name: "Gemini 2.5 Flash Preview 1", envKey: "GEMINI_API_KEY" },
|
|
977
975
|
{ name: "Gemini 2.5 Flash Preview", envKey: "GEMINI_API_KEY" },
|
|
978
|
-
{ name: "o1 24", envKey: "OPENAI_API_KEY" },
|
|
979
976
|
{ name: "o3 mini", envKey: "OPENAI_API_KEY" },
|
|
980
977
|
{ name: "o4 mini", envKey: "OPENAI_API_KEY" },
|
|
981
978
|
{ name: "GPT-4.1", envKey: "OPENAI_API_KEY" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yrpri/api",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.189",
|
|
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.155",
|
|
29
29
|
"async": "^3.2.6",
|
|
30
30
|
"authorized": "^1.0.0",
|
|
31
31
|
"aws-sdk": "^2.1692.0",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export function replaceBetterReykjavikCategoryId(id: any): 1 | 2 | 5 | 4 | 7 | 3 | 6 | 10 | 8 |
|
|
1
|
+
export function replaceBetterReykjavikCategoryId(id: any): 1 | 2 | 5 | 4 | 7 | 3 | 6 | 10 | 8 | 12 | 9 | 11 | 13 | undefined;
|
|
2
2
|
export function clean(string: any): any;
|
|
3
3
|
export function shuffleArray(array: any): any;
|