@yrpri/api 9.0.198 → 9.0.200
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.
|
@@ -721,110 +721,72 @@ export class NewAiModelSetup {
|
|
|
721
721
|
await gemini25Pro.save();
|
|
722
722
|
log.debug("Google model already exists: Gemini 2.5 Pro");
|
|
723
723
|
}
|
|
724
|
-
const
|
|
725
|
-
where: { name: "Gemini 2.5 Flash
|
|
724
|
+
const gemini25Flash = await PsAiModel.findOne({
|
|
725
|
+
where: { name: "Gemini 2.5 Flash" },
|
|
726
726
|
});
|
|
727
|
-
const
|
|
727
|
+
const gemini25FlashConfig = {
|
|
728
728
|
type: PsAiModelType.Text,
|
|
729
729
|
modelSize: PsAiModelSize.Medium,
|
|
730
730
|
provider: "google",
|
|
731
731
|
prices: {
|
|
732
|
-
costInTokensPerMillion: 0.
|
|
733
|
-
costOutTokensPerMillion:
|
|
734
|
-
costInCachedContextTokensPerMillion: 0.
|
|
735
|
-
longContextTokenThreshold: 200000,
|
|
736
|
-
longContextCostInTokensPerMillion: 0.3,
|
|
737
|
-
longContextCostInCachedContextTokensPerMillion: 0.21,
|
|
738
|
-
longContextCostOutTokensPerMillion: 2.4,
|
|
732
|
+
costInTokensPerMillion: 0.30,
|
|
733
|
+
costOutTokensPerMillion: 2.5,
|
|
734
|
+
costInCachedContextTokensPerMillion: 0.15,
|
|
739
735
|
currency: "USD",
|
|
740
736
|
},
|
|
741
|
-
model: "gemini-2.5-flash
|
|
737
|
+
model: "gemini-2.5-flash",
|
|
742
738
|
active: true,
|
|
743
|
-
maxTokensOut: 100000,
|
|
744
|
-
maxContextTokens: 1000000,
|
|
745
|
-
defaultTemperature: 0.0
|
|
746
|
-
};
|
|
747
|
-
if (!gemini25FlashPreview1) {
|
|
748
|
-
await PsAiModel.create({
|
|
749
|
-
name: "Gemini 2.5 Flash Preview 1",
|
|
750
|
-
organization_id: 1,
|
|
751
|
-
user_id: userId,
|
|
752
|
-
configuration: gemini25FlashPreview1Config,
|
|
753
|
-
});
|
|
754
|
-
log.info("Created Google model: Gemini 2.5 Flash Preview 1");
|
|
755
|
-
}
|
|
756
|
-
else {
|
|
757
|
-
gemini25FlashPreview1.set("configuration", gemini25FlashPreview1Config);
|
|
758
|
-
gemini25FlashPreview1.changed("configuration", true);
|
|
759
|
-
await gemini25FlashPreview1.save();
|
|
760
|
-
log.debug("Google model already exists: Gemini 2.5 Flash Preview 1");
|
|
761
|
-
}
|
|
762
|
-
const gemini25FlashPreview = await PsAiModel.findOne({
|
|
763
|
-
where: { name: "Gemini 2.5 Flash Preview" },
|
|
764
|
-
});
|
|
765
|
-
const gemini25FlashPreviewConfig = {
|
|
766
|
-
type: PsAiModelType.Text,
|
|
767
|
-
modelSize: PsAiModelSize.Medium,
|
|
768
|
-
provider: "google",
|
|
769
|
-
prices: {
|
|
770
|
-
costInTokensPerMillion: 0.15,
|
|
771
|
-
costOutTokensPerMillion: 0.6,
|
|
772
|
-
costInCachedContextTokensPerMillion: 0.09,
|
|
773
|
-
currency: "USD",
|
|
774
|
-
},
|
|
775
739
|
maxTokensOut: 32000,
|
|
776
740
|
maxContextTokens: 1000000,
|
|
777
741
|
defaultTemperature: 0.0,
|
|
778
|
-
model: "gemini-2.5-flash-preview-05-20",
|
|
779
|
-
active: true,
|
|
780
742
|
};
|
|
781
|
-
if (!
|
|
743
|
+
if (!gemini25Flash) {
|
|
782
744
|
await PsAiModel.create({
|
|
783
|
-
name: "Gemini 2.5 Flash
|
|
745
|
+
name: "Gemini 2.5 Flash",
|
|
784
746
|
organization_id: 1,
|
|
785
747
|
user_id: userId,
|
|
786
|
-
configuration:
|
|
748
|
+
configuration: gemini25FlashConfig,
|
|
787
749
|
});
|
|
788
|
-
log.info("Created Google model: Gemini 2.5 Flash Preview");
|
|
789
750
|
}
|
|
790
751
|
else {
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
await
|
|
794
|
-
log.debug("Google model already exists: Gemini 2.5 Flash
|
|
752
|
+
gemini25Flash.set("configuration", gemini25FlashConfig);
|
|
753
|
+
gemini25Flash.changed("configuration", true);
|
|
754
|
+
await gemini25Flash.save();
|
|
755
|
+
log.debug("Google model already exists: Gemini 2.5 Flash");
|
|
795
756
|
}
|
|
796
|
-
const
|
|
797
|
-
where: { name: "Gemini 2.5 Flash" },
|
|
757
|
+
const gemini25FlashLite = await PsAiModel.findOne({
|
|
758
|
+
where: { name: "Gemini 2.5 Flash Lite" },
|
|
798
759
|
});
|
|
799
|
-
const
|
|
760
|
+
const gemini25FlashLiteConfig = {
|
|
800
761
|
type: PsAiModelType.Text,
|
|
801
762
|
modelSize: PsAiModelSize.Medium,
|
|
802
763
|
provider: "google",
|
|
803
764
|
prices: {
|
|
804
|
-
costInTokensPerMillion: 0.
|
|
805
|
-
costOutTokensPerMillion:
|
|
806
|
-
costInCachedContextTokensPerMillion: 0.
|
|
765
|
+
costInTokensPerMillion: 0.10,
|
|
766
|
+
costOutTokensPerMillion: 0.4,
|
|
767
|
+
costInCachedContextTokensPerMillion: 0.07,
|
|
807
768
|
currency: "USD",
|
|
808
769
|
},
|
|
809
|
-
model: "gemini-2.5-flash",
|
|
770
|
+
model: "gemini-2.5-flash-lite-preview-09-2025",
|
|
810
771
|
active: true,
|
|
811
772
|
maxTokensOut: 32000,
|
|
812
773
|
maxContextTokens: 1000000,
|
|
813
774
|
defaultTemperature: 0.0,
|
|
814
775
|
};
|
|
815
|
-
if (!
|
|
776
|
+
if (!gemini25FlashLite) {
|
|
816
777
|
await PsAiModel.create({
|
|
817
|
-
name: "Gemini 2.5 Flash",
|
|
778
|
+
name: "Gemini 2.5 Flash Lite",
|
|
818
779
|
organization_id: 1,
|
|
819
780
|
user_id: userId,
|
|
820
|
-
configuration:
|
|
781
|
+
configuration: gemini25FlashLiteConfig,
|
|
821
782
|
});
|
|
783
|
+
log.info("Created Google model: Gemini 2.5 Flash Lite");
|
|
822
784
|
}
|
|
823
785
|
else {
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
await
|
|
827
|
-
log.debug("Google model already exists: Gemini 2.5 Flash");
|
|
786
|
+
gemini25FlashLite.set("configuration", gemini25FlashLiteConfig);
|
|
787
|
+
gemini25FlashLite.changed("configuration", true);
|
|
788
|
+
await gemini25FlashLite.save();
|
|
789
|
+
log.debug("Google model already exists: Gemini 2.5 Flash Lite");
|
|
828
790
|
}
|
|
829
791
|
const gemini3ProPreview = await PsAiModel.findOne({
|
|
830
792
|
where: { name: "Gemini 3 Pro Preview" },
|
|
@@ -864,17 +826,17 @@ export class NewAiModelSetup {
|
|
|
864
826
|
await gemini3ProPreview.save();
|
|
865
827
|
log.debug("Google model already exists: Gemini 3 Pro Preview");
|
|
866
828
|
}
|
|
867
|
-
const
|
|
868
|
-
where: { name: "Gemini 3 Flash
|
|
829
|
+
const gemini30Flash = await PsAiModel.findOne({
|
|
830
|
+
where: { name: "Gemini 3.0 Flash" },
|
|
869
831
|
});
|
|
870
|
-
const
|
|
832
|
+
const gemini30FlashConfig = {
|
|
871
833
|
type: PsAiModelType.Text,
|
|
872
834
|
modelSize: PsAiModelSize.Medium,
|
|
873
835
|
provider: "google",
|
|
874
836
|
prices: {
|
|
875
|
-
costInTokensPerMillion: 0.
|
|
876
|
-
costOutTokensPerMillion: 0
|
|
877
|
-
costInCachedContextTokensPerMillion: 0.
|
|
837
|
+
costInTokensPerMillion: 0.5,
|
|
838
|
+
costOutTokensPerMillion: 3.0,
|
|
839
|
+
costInCachedContextTokensPerMillion: 0.25,
|
|
878
840
|
currency: "USD",
|
|
879
841
|
},
|
|
880
842
|
model: "gemini-3-flash-preview",
|
|
@@ -883,19 +845,29 @@ export class NewAiModelSetup {
|
|
|
883
845
|
maxContextTokens: 1000000,
|
|
884
846
|
defaultTemperature: 0.0,
|
|
885
847
|
};
|
|
886
|
-
if (!
|
|
848
|
+
if (!gemini30Flash) {
|
|
887
849
|
await PsAiModel.create({
|
|
888
|
-
name: "Gemini 3 Flash
|
|
850
|
+
name: "Gemini 3.0 Flash",
|
|
889
851
|
organization_id: 1,
|
|
890
852
|
user_id: userId,
|
|
891
|
-
configuration:
|
|
853
|
+
configuration: gemini30FlashConfig,
|
|
892
854
|
});
|
|
855
|
+
log.info("Created Google model: Gemini 3.0 Flash");
|
|
893
856
|
}
|
|
894
857
|
else {
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
await
|
|
898
|
-
log.debug("Google model already exists: Gemini 3 Flash
|
|
858
|
+
gemini30Flash.set("configuration", gemini30FlashConfig);
|
|
859
|
+
gemini30Flash.changed("configuration", true);
|
|
860
|
+
await gemini30Flash.save();
|
|
861
|
+
log.debug("Google model already exists: Gemini 3.0 Flash");
|
|
862
|
+
}
|
|
863
|
+
const gemini30FlashPreview = await PsAiModel.findOne({
|
|
864
|
+
where: { name: "Gemini 3.0 Flash Preview" },
|
|
865
|
+
});
|
|
866
|
+
if (gemini30FlashPreview) {
|
|
867
|
+
gemini30FlashPreview.set("configuration", { ...gemini30FlashConfig, model: "gemini-3-flash-preview-disabled" });
|
|
868
|
+
gemini30FlashPreview.changed("configuration", true);
|
|
869
|
+
await gemini30FlashPreview.save();
|
|
870
|
+
log.debug("Google model already exists: Gemini 3.0 Flash Preview (disabled)");
|
|
899
871
|
}
|
|
900
872
|
}
|
|
901
873
|
/**
|
|
@@ -1013,6 +985,7 @@ export class NewAiModelSetup {
|
|
|
1013
985
|
{ name: "GPT-5", envKey: "OPENAI_API_KEY" },
|
|
1014
986
|
{ name: "GPT-5.1", envKey: "OPENAI_API_KEY" },
|
|
1015
987
|
{ name: "GPT-5.2", envKey: "OPENAI_API_KEY" },
|
|
988
|
+
{ name: "Gemini 3.0 Flash", envKey: "GEMINI_API_KEY" },
|
|
1016
989
|
];
|
|
1017
990
|
const groupAccessConfig = [];
|
|
1018
991
|
for (const { name, envKey } of modelsMapping) {
|