@yrpri/api 9.0.235 → 9.0.237
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.
|
@@ -11,7 +11,8 @@ export declare class NewAiModelSetup {
|
|
|
11
11
|
/**
|
|
12
12
|
* Seeds OpenAI models.
|
|
13
13
|
* This currently creates several models including GPT-4o, GPT-4o Mini, o1 Mini,
|
|
14
|
-
* o1 Preview, o1 24, o3 mini, GPT-5.4 variants,
|
|
14
|
+
* o1 Preview, o1 24, o3 mini, GPT-5.4 variants, GPT-5.5, and
|
|
15
|
+
* GPT-5.5 tier variants.
|
|
15
16
|
*/
|
|
16
17
|
static seedOpenAiModels(userId: number): Promise<void>;
|
|
17
18
|
/**
|
|
@@ -162,7 +162,8 @@ export class NewAiModelSetup {
|
|
|
162
162
|
/**
|
|
163
163
|
* Seeds OpenAI models.
|
|
164
164
|
* This currently creates several models including GPT-4o, GPT-4o Mini, o1 Mini,
|
|
165
|
-
* o1 Preview, o1 24, o3 mini, GPT-5.4 variants,
|
|
165
|
+
* o1 Preview, o1 24, o3 mini, GPT-5.4 variants, GPT-5.5, and
|
|
166
|
+
* GPT-5.5 tier variants.
|
|
166
167
|
*/
|
|
167
168
|
static async seedOpenAiModels(userId) {
|
|
168
169
|
// GPT-4o
|
|
@@ -896,6 +897,159 @@ export class NewAiModelSetup {
|
|
|
896
897
|
await openAiGpt55.save();
|
|
897
898
|
log.debug("OpenAI model already exists: GPT-5.5");
|
|
898
899
|
}
|
|
900
|
+
const openAiGpt55Pro = await PsAiModel.findOne({
|
|
901
|
+
where: { name: "GPT-5.5 Pro" },
|
|
902
|
+
});
|
|
903
|
+
const openAiGpt55ProConfig = {
|
|
904
|
+
type: PsAiModelType.TextReasoning,
|
|
905
|
+
modelSize: PsAiModelSize.Large,
|
|
906
|
+
provider: "openai",
|
|
907
|
+
prices: {
|
|
908
|
+
costInTokensPerMillion: 30.0,
|
|
909
|
+
costOutTokensPerMillion: 180.0,
|
|
910
|
+
costInCachedContextTokensPerMillion: 30.0,
|
|
911
|
+
regionalProcessingMargin: 10,
|
|
912
|
+
currency: "USD",
|
|
913
|
+
},
|
|
914
|
+
maxTokensOut: 128000,
|
|
915
|
+
maxContextTokens: 1050000,
|
|
916
|
+
defaultTemperature: 0.7,
|
|
917
|
+
model: "gpt-5.5-pro",
|
|
918
|
+
active: true,
|
|
919
|
+
};
|
|
920
|
+
if (!openAiGpt55Pro) {
|
|
921
|
+
await PsAiModel.create({
|
|
922
|
+
name: "GPT-5.5 Pro",
|
|
923
|
+
organization_id: 1,
|
|
924
|
+
user_id: userId,
|
|
925
|
+
configuration: openAiGpt55ProConfig,
|
|
926
|
+
});
|
|
927
|
+
log.info("Created OpenAI model: GPT-5.5 Pro");
|
|
928
|
+
}
|
|
929
|
+
else {
|
|
930
|
+
openAiGpt55Pro.set("configuration", openAiGpt55ProConfig);
|
|
931
|
+
openAiGpt55Pro.changed("configuration", true);
|
|
932
|
+
await openAiGpt55Pro.save();
|
|
933
|
+
log.debug("OpenAI model already exists: GPT-5.5 Pro");
|
|
934
|
+
}
|
|
935
|
+
const openAiGpt55Priority = await PsAiModel.findOne({
|
|
936
|
+
where: { name: "GPT-5.5 Priority" },
|
|
937
|
+
});
|
|
938
|
+
const openAiGpt55PriorityConfig = {
|
|
939
|
+
type: PsAiModelType.TextReasoning,
|
|
940
|
+
modelSize: PsAiModelSize.Large,
|
|
941
|
+
provider: "openai",
|
|
942
|
+
inferenceType: "priority",
|
|
943
|
+
prices: {
|
|
944
|
+
costInTokensPerMillion: 12.5,
|
|
945
|
+
costOutTokensPerMillion: 75.0,
|
|
946
|
+
costInCachedContextTokensPerMillion: 1.25,
|
|
947
|
+
regionalProcessingMargin: 10,
|
|
948
|
+
currency: "USD",
|
|
949
|
+
},
|
|
950
|
+
maxTokensOut: 128000,
|
|
951
|
+
maxContextTokens: 1050000,
|
|
952
|
+
defaultTemperature: 0.7,
|
|
953
|
+
model: "gpt-5.5-priority",
|
|
954
|
+
apiModel: "gpt-5.5",
|
|
955
|
+
active: true,
|
|
956
|
+
};
|
|
957
|
+
if (!openAiGpt55Priority) {
|
|
958
|
+
await PsAiModel.create({
|
|
959
|
+
name: "GPT-5.5 Priority",
|
|
960
|
+
organization_id: 1,
|
|
961
|
+
user_id: userId,
|
|
962
|
+
configuration: openAiGpt55PriorityConfig,
|
|
963
|
+
});
|
|
964
|
+
log.info("Created OpenAI model: GPT-5.5 Priority");
|
|
965
|
+
}
|
|
966
|
+
else {
|
|
967
|
+
openAiGpt55Priority.set("configuration", openAiGpt55PriorityConfig);
|
|
968
|
+
openAiGpt55Priority.changed("configuration", true);
|
|
969
|
+
await openAiGpt55Priority.save();
|
|
970
|
+
log.debug("OpenAI model already exists: GPT-5.5 Priority");
|
|
971
|
+
}
|
|
972
|
+
const openAiGpt55Normal = await PsAiModel.findOne({
|
|
973
|
+
where: { name: "GPT-5.5 Normal" },
|
|
974
|
+
});
|
|
975
|
+
const openAiGpt55NormalConfig = {
|
|
976
|
+
type: PsAiModelType.TextReasoning,
|
|
977
|
+
modelSize: PsAiModelSize.Large,
|
|
978
|
+
provider: "openai",
|
|
979
|
+
prices: {
|
|
980
|
+
costInTokensPerMillion: 5.0,
|
|
981
|
+
costOutTokensPerMillion: 30.0,
|
|
982
|
+
costInCachedContextTokensPerMillion: 0.5,
|
|
983
|
+
longContextTokenThreshold: 272000,
|
|
984
|
+
longContextCostInTokensPerMillion: 10.0,
|
|
985
|
+
longContextCostInCachedContextTokensPerMillion: 1.0,
|
|
986
|
+
longContextCostOutTokensPerMillion: 45.0,
|
|
987
|
+
regionalProcessingMargin: 10,
|
|
988
|
+
currency: "USD",
|
|
989
|
+
},
|
|
990
|
+
maxTokensOut: 128000,
|
|
991
|
+
maxContextTokens: 1050000,
|
|
992
|
+
defaultTemperature: 0.7,
|
|
993
|
+
model: "gpt-5.5-normal",
|
|
994
|
+
apiModel: "gpt-5.5",
|
|
995
|
+
active: true,
|
|
996
|
+
};
|
|
997
|
+
if (!openAiGpt55Normal) {
|
|
998
|
+
await PsAiModel.create({
|
|
999
|
+
name: "GPT-5.5 Normal",
|
|
1000
|
+
organization_id: 1,
|
|
1001
|
+
user_id: userId,
|
|
1002
|
+
configuration: openAiGpt55NormalConfig,
|
|
1003
|
+
});
|
|
1004
|
+
log.info("Created OpenAI model: GPT-5.5 Normal");
|
|
1005
|
+
}
|
|
1006
|
+
else {
|
|
1007
|
+
openAiGpt55Normal.set("configuration", openAiGpt55NormalConfig);
|
|
1008
|
+
openAiGpt55Normal.changed("configuration", true);
|
|
1009
|
+
await openAiGpt55Normal.save();
|
|
1010
|
+
log.debug("OpenAI model already exists: GPT-5.5 Normal");
|
|
1011
|
+
}
|
|
1012
|
+
const openAiGpt55Flex = await PsAiModel.findOne({
|
|
1013
|
+
where: { name: "GPT-5.5 Flex" },
|
|
1014
|
+
});
|
|
1015
|
+
const openAiGpt55FlexConfig = {
|
|
1016
|
+
type: PsAiModelType.TextReasoning,
|
|
1017
|
+
modelSize: PsAiModelSize.Large,
|
|
1018
|
+
provider: "openai",
|
|
1019
|
+
inferenceType: "flex",
|
|
1020
|
+
prices: {
|
|
1021
|
+
costInTokensPerMillion: 2.5,
|
|
1022
|
+
costOutTokensPerMillion: 15.0,
|
|
1023
|
+
costInCachedContextTokensPerMillion: 0.25,
|
|
1024
|
+
longContextTokenThreshold: 272000,
|
|
1025
|
+
longContextCostInTokensPerMillion: 5.0,
|
|
1026
|
+
longContextCostInCachedContextTokensPerMillion: 0.5,
|
|
1027
|
+
longContextCostOutTokensPerMillion: 22.5,
|
|
1028
|
+
regionalProcessingMargin: 10,
|
|
1029
|
+
currency: "USD",
|
|
1030
|
+
},
|
|
1031
|
+
maxTokensOut: 128000,
|
|
1032
|
+
maxContextTokens: 1050000,
|
|
1033
|
+
defaultTemperature: 0.7,
|
|
1034
|
+
model: "gpt-5.5-flex",
|
|
1035
|
+
apiModel: "gpt-5.5",
|
|
1036
|
+
active: true,
|
|
1037
|
+
};
|
|
1038
|
+
if (!openAiGpt55Flex) {
|
|
1039
|
+
await PsAiModel.create({
|
|
1040
|
+
name: "GPT-5.5 Flex",
|
|
1041
|
+
organization_id: 1,
|
|
1042
|
+
user_id: userId,
|
|
1043
|
+
configuration: openAiGpt55FlexConfig,
|
|
1044
|
+
});
|
|
1045
|
+
log.info("Created OpenAI model: GPT-5.5 Flex");
|
|
1046
|
+
}
|
|
1047
|
+
else {
|
|
1048
|
+
openAiGpt55Flex.set("configuration", openAiGpt55FlexConfig);
|
|
1049
|
+
openAiGpt55Flex.changed("configuration", true);
|
|
1050
|
+
await openAiGpt55Flex.save();
|
|
1051
|
+
log.debug("OpenAI model already exists: GPT-5.5 Flex");
|
|
1052
|
+
}
|
|
899
1053
|
}
|
|
900
1054
|
/**
|
|
901
1055
|
* Seeds Google models.
|
|
@@ -1351,6 +1505,10 @@ export class NewAiModelSetup {
|
|
|
1351
1505
|
{ name: "GPT-5.4 nano", envKey: "OPENAI_API_KEY" },
|
|
1352
1506
|
{ name: "GPT-5.4 Pro", envKey: "OPENAI_API_KEY" },
|
|
1353
1507
|
{ name: "GPT-5.5", envKey: "OPENAI_API_KEY" },
|
|
1508
|
+
{ name: "GPT-5.5 Pro", envKey: "OPENAI_API_KEY" },
|
|
1509
|
+
{ name: "GPT-5.5 Priority", envKey: "OPENAI_API_KEY" },
|
|
1510
|
+
{ name: "GPT-5.5 Normal", envKey: "OPENAI_API_KEY" },
|
|
1511
|
+
{ name: "GPT-5.5 Flex", envKey: "OPENAI_API_KEY" },
|
|
1354
1512
|
{ name: "Gemini 3 Pro Preview", envKey: "GEMINI_API_KEY" },
|
|
1355
1513
|
{ name: "Gemini 3.1 Pro Preview", envKey: "GEMINI_API_KEY" },
|
|
1356
1514
|
{ 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.
|
|
3
|
+
"version": "9.0.237",
|
|
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.3.6",
|
|
27
27
|
"@node-saml/passport-saml": "^5.1.0",
|
|
28
|
-
"@policysynth/agents": "^1.3.
|
|
28
|
+
"@policysynth/agents": "^1.3.185",
|
|
29
29
|
"async": "^3.2.6",
|
|
30
30
|
"authorized": "^1.0.0",
|
|
31
31
|
"aws-sdk": "^2.1693.0",
|