@yrpri/api 9.0.199 → 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 gemini25FlashPreview1 = await PsAiModel.findOne({
725
- where: { name: "Gemini 2.5 Flash Preview 1" },
724
+ const gemini25Flash = await PsAiModel.findOne({
725
+ where: { name: "Gemini 2.5 Flash" },
726
726
  });
727
- const gemini25FlashPreview1Config = {
727
+ const gemini25FlashConfig = {
728
728
  type: PsAiModelType.Text,
729
729
  modelSize: PsAiModelSize.Medium,
730
730
  provider: "google",
731
731
  prices: {
732
- costInTokensPerMillion: 0.15,
733
- costOutTokensPerMillion: 0.6,
734
- costInCachedContextTokensPerMillion: 0.09,
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-preview-05-20",
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 (!gemini25FlashPreview) {
743
+ if (!gemini25Flash) {
782
744
  await PsAiModel.create({
783
- name: "Gemini 2.5 Flash Preview",
745
+ name: "Gemini 2.5 Flash",
784
746
  organization_id: 1,
785
747
  user_id: userId,
786
- configuration: gemini25FlashPreviewConfig,
748
+ configuration: gemini25FlashConfig,
787
749
  });
788
- log.info("Created Google model: Gemini 2.5 Flash Preview");
789
750
  }
790
751
  else {
791
- gemini25FlashPreview.set("configuration", gemini25FlashPreviewConfig);
792
- gemini25FlashPreview.changed("configuration", true);
793
- await gemini25FlashPreview.save();
794
- log.debug("Google model already exists: Gemini 2.5 Flash Preview");
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 gemini25Flash = await PsAiModel.findOne({
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 gemini25FlashConfig = {
760
+ const gemini25FlashLiteConfig = {
800
761
  type: PsAiModelType.Text,
801
762
  modelSize: PsAiModelSize.Medium,
802
763
  provider: "google",
803
764
  prices: {
804
- costInTokensPerMillion: 0.30,
805
- costOutTokensPerMillion: 2.5,
806
- costInCachedContextTokensPerMillion: 0.15,
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 (!gemini25Flash) {
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: gemini25FlashConfig,
781
+ configuration: gemini25FlashLiteConfig,
821
782
  });
783
+ log.info("Created Google model: Gemini 2.5 Flash Lite");
822
784
  }
823
785
  else {
824
- gemini25Flash.set("configuration", gemini25FlashConfig);
825
- gemini25Flash.changed("configuration", true);
826
- await gemini25Flash.save();
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,39 +826,6 @@ export class NewAiModelSetup {
864
826
  await gemini3ProPreview.save();
865
827
  log.debug("Google model already exists: Gemini 3 Pro Preview");
866
828
  }
867
- const gemini3FlashPreview = await PsAiModel.findOne({
868
- where: { name: "Gemini 3 Flash Preview" },
869
- });
870
- const gemini3FlashPreviewConfig = {
871
- type: PsAiModelType.Text,
872
- modelSize: PsAiModelSize.Medium,
873
- provider: "google",
874
- prices: {
875
- costInTokensPerMillion: 0.1,
876
- costOutTokensPerMillion: 0.4,
877
- costInCachedContextTokensPerMillion: 0.07,
878
- currency: "USD",
879
- },
880
- model: "gemini-3-flash-preview",
881
- active: true,
882
- maxTokensOut: 100000,
883
- maxContextTokens: 1000000,
884
- defaultTemperature: 0.0,
885
- };
886
- if (!gemini3FlashPreview) {
887
- await PsAiModel.create({
888
- name: "Gemini 3 Flash Preview",
889
- organization_id: 1,
890
- user_id: userId,
891
- configuration: gemini3FlashPreviewConfig,
892
- });
893
- }
894
- else {
895
- gemini3FlashPreview.set("configuration", gemini3FlashPreviewConfig);
896
- gemini3FlashPreview.changed("configuration", true);
897
- await gemini3FlashPreview.save();
898
- log.debug("Google model already exists: Gemini 3 Flash Preview");
899
- }
900
829
  const gemini30Flash = await PsAiModel.findOne({
901
830
  where: { name: "Gemini 3.0 Flash" },
902
831
  });
@@ -910,7 +839,7 @@ export class NewAiModelSetup {
910
839
  costInCachedContextTokensPerMillion: 0.25,
911
840
  currency: "USD",
912
841
  },
913
- model: "gemini-3.0-flash-preview",
842
+ model: "gemini-3-flash-preview",
914
843
  active: true,
915
844
  maxTokensOut: 100000,
916
845
  maxContextTokens: 1000000,
@@ -931,6 +860,15 @@ export class NewAiModelSetup {
931
860
  await gemini30Flash.save();
932
861
  log.debug("Google model already exists: Gemini 3.0 Flash");
933
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)");
871
+ }
934
872
  }
935
873
  /**
936
874
  * Master seeding function which calls the provider-specific functions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yrpri/api",
3
- "version": "9.0.199",
3
+ "version": "9.0.200",
4
4
  "license": "MIT",
5
5
  "author": "Robert Bjarnason & Citizens Foundation",
6
6
  "repository": {