@yrpri/api 9.0.207 → 9.0.209

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.
@@ -120,6 +120,44 @@ export class NewAiModelSetup {
120
120
  anthropicOpus45.changed("configuration", true);
121
121
  await anthropicOpus45.save();
122
122
  }
123
+ const anthropicOpus46 = await PsAiModel.findOne({
124
+ where: { name: "Anthropic Opus 4.6" },
125
+ });
126
+ const anthropicOpus46Config = {
127
+ type: PsAiModelType.TextReasoning,
128
+ modelSize: PsAiModelSize.Large,
129
+ provider: "anthropic",
130
+ prices: {
131
+ costInTokensPerMillion: 5,
132
+ costOutTokensPerMillion: 25,
133
+ costInCachedContextTokensPerMillion: 0.5,
134
+ longContextTokenThreshold: 200000,
135
+ longContextCostInTokensPerMillion: 10,
136
+ longContextCostInCachedContextTokensPerMillion: 1.0,
137
+ longContextCostOutTokensPerMillion: 37.5,
138
+ currency: "USD",
139
+ },
140
+ maxTokensOut: 64000,
141
+ maxContextTokens: 1000000,
142
+ defaultTemperature: 0.7,
143
+ model: "claude-opus-4-6",
144
+ active: true,
145
+ };
146
+ if (!anthropicOpus46) {
147
+ const createdModel = await PsAiModel.create({
148
+ name: "Anthropic Opus 4.6",
149
+ organization_id: 1,
150
+ user_id: userId,
151
+ configuration: anthropicOpus46Config,
152
+ });
153
+ log.info("Created Anthropic model:", createdModel);
154
+ }
155
+ else {
156
+ log.debug("Anthropic model already exists: Anthropic Opus 4.6");
157
+ anthropicOpus46.set("configuration", anthropicOpus46Config);
158
+ anthropicOpus46.changed("configuration", true);
159
+ await anthropicOpus46.save();
160
+ }
123
161
  }
124
162
  /**
125
163
  * Seeds OpenAI models.
@@ -643,6 +681,82 @@ export class NewAiModelSetup {
643
681
  await openAiGpt52.save();
644
682
  log.debug("OpenAI model already exists: GPT-5.2");
645
683
  }
684
+ const openAiGpt54 = await PsAiModel.findOne({
685
+ where: { name: "GPT-5.4" },
686
+ });
687
+ const openAiGpt54Config = {
688
+ type: PsAiModelType.TextReasoning,
689
+ modelSize: PsAiModelSize.Large,
690
+ provider: "openai",
691
+ prices: {
692
+ costInTokensPerMillion: 2.5,
693
+ costOutTokensPerMillion: 15.0,
694
+ costInCachedContextTokensPerMillion: 0.25,
695
+ longContextTokenThreshold: 272000,
696
+ longContextCostInTokensPerMillion: 5.0,
697
+ longContextCostInCachedContextTokensPerMillion: 0.5,
698
+ longContextCostOutTokensPerMillion: 22.5,
699
+ currency: "USD",
700
+ },
701
+ maxTokensOut: 128000,
702
+ maxContextTokens: 1050000,
703
+ defaultTemperature: 0.7,
704
+ model: "gpt-5.4",
705
+ active: true,
706
+ };
707
+ if (!openAiGpt54) {
708
+ await PsAiModel.create({
709
+ name: "GPT-5.4",
710
+ organization_id: 1,
711
+ user_id: userId,
712
+ configuration: openAiGpt54Config,
713
+ });
714
+ log.info("Created OpenAI model: GPT-5.4");
715
+ }
716
+ else {
717
+ openAiGpt54.set("configuration", openAiGpt54Config);
718
+ openAiGpt54.changed("configuration", true);
719
+ await openAiGpt54.save();
720
+ log.debug("OpenAI model already exists: GPT-5.4");
721
+ }
722
+ const openAiGpt54Pro = await PsAiModel.findOne({
723
+ where: { name: "GPT-5.4 Pro" },
724
+ });
725
+ const openAiGpt54ProConfig = {
726
+ type: PsAiModelType.TextReasoning,
727
+ modelSize: PsAiModelSize.Large,
728
+ provider: "openai",
729
+ prices: {
730
+ costInTokensPerMillion: 30.0,
731
+ costOutTokensPerMillion: 180.0,
732
+ costInCachedContextTokensPerMillion: 0.0,
733
+ longContextTokenThreshold: 272000,
734
+ longContextCostInTokensPerMillion: 60.0,
735
+ longContextCostInCachedContextTokensPerMillion: 0.0,
736
+ longContextCostOutTokensPerMillion: 270.0,
737
+ currency: "USD",
738
+ },
739
+ maxTokensOut: 128000,
740
+ maxContextTokens: 1050000,
741
+ defaultTemperature: 0.7,
742
+ model: "gpt-5.4-pro",
743
+ active: true,
744
+ };
745
+ if (!openAiGpt54Pro) {
746
+ await PsAiModel.create({
747
+ name: "GPT-5.4 Pro",
748
+ organization_id: 1,
749
+ user_id: userId,
750
+ configuration: openAiGpt54ProConfig,
751
+ });
752
+ log.info("Created OpenAI model: GPT-5.4 Pro");
753
+ }
754
+ else {
755
+ openAiGpt54Pro.set("configuration", openAiGpt54ProConfig);
756
+ openAiGpt54Pro.changed("configuration", true);
757
+ await openAiGpt54Pro.save();
758
+ log.debug("OpenAI model already exists: GPT-5.4 Pro");
759
+ }
646
760
  }
647
761
  /**
648
762
  * Seeds Google models.
@@ -1039,6 +1153,7 @@ export class NewAiModelSetup {
1039
1153
  const modelsMapping = [
1040
1154
  { name: "Anthropic Sonnet 4.5", envKey: "ANTHROPIC_CLAUDE_API_KEY" },
1041
1155
  { name: "Anthropic Opus 4.5", envKey: "ANTHROPIC_CLAUDE_API_KEY" },
1156
+ { name: "Anthropic Opus 4.6", envKey: "ANTHROPIC_CLAUDE_API_KEY" },
1042
1157
  { name: "GPT-4o", envKey: "OPENAI_API_KEY" },
1043
1158
  { name: "GPT-4o Mini", envKey: "OPENAI_API_KEY" },
1044
1159
  { name: "GPT-4.5 Preview", envKey: "OPENAI_API_KEY" },
@@ -1057,6 +1172,8 @@ export class NewAiModelSetup {
1057
1172
  { name: "GPT-5", envKey: "OPENAI_API_KEY" },
1058
1173
  { name: "GPT-5.1", envKey: "OPENAI_API_KEY" },
1059
1174
  { name: "GPT-5.2", envKey: "OPENAI_API_KEY" },
1175
+ { name: "GPT-5.4", envKey: "OPENAI_API_KEY" },
1176
+ { name: "GPT-5.4 Pro", envKey: "OPENAI_API_KEY" },
1060
1177
  { name: "Gemini 3 Pro Preview", envKey: "GEMINI_API_KEY" },
1061
1178
  { name: "Gemini 3.1 Pro Preview", envKey: "GEMINI_API_KEY" },
1062
1179
  { name: "Gemini 3.1 Flash Lite Preview", envKey: "GEMINI_API_KEY" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yrpri/api",
3
- "version": "9.0.207",
3
+ "version": "9.0.209",
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.164",
28
+ "@policysynth/agents": "^1.3.165",
29
29
  "async": "^3.2.6",
30
30
  "authorized": "^1.0.0",
31
31
  "aws-sdk": "^2.1692.0",