@yrpri/api 9.0.208 → 9.0.210

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.
@@ -1115,6 +1153,7 @@ export class NewAiModelSetup {
1115
1153
  const modelsMapping = [
1116
1154
  { name: "Anthropic Sonnet 4.5", envKey: "ANTHROPIC_CLAUDE_API_KEY" },
1117
1155
  { name: "Anthropic Opus 4.5", envKey: "ANTHROPIC_CLAUDE_API_KEY" },
1156
+ { name: "Anthropic Opus 4.6", envKey: "ANTHROPIC_CLAUDE_API_KEY" },
1118
1157
  { name: "GPT-4o", envKey: "OPENAI_API_KEY" },
1119
1158
  { name: "GPT-4o Mini", envKey: "OPENAI_API_KEY" },
1120
1159
  { name: "GPT-4.5 Preview", envKey: "OPENAI_API_KEY" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yrpri/api",
3
- "version": "9.0.208",
3
+ "version": "9.0.210",
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.166",
29
29
  "async": "^3.2.6",
30
30
  "authorized": "^1.0.0",
31
31
  "aws-sdk": "^2.1692.0",