@yrpri/api 9.0.214 → 9.0.216
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,7 @@ 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,
|
|
14
|
+
* o1 Preview, o1 24, o3 mini, and GPT-5.4 variants.
|
|
15
15
|
*/
|
|
16
16
|
static seedOpenAiModels(userId: number): Promise<void>;
|
|
17
17
|
/**
|
|
@@ -162,7 +162,7 @@ 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,
|
|
165
|
+
* o1 Preview, o1 24, o3 mini, and GPT-5.4 variants.
|
|
166
166
|
*/
|
|
167
167
|
static async seedOpenAiModels(userId) {
|
|
168
168
|
// GPT-4o
|
|
@@ -753,6 +753,74 @@ export class NewAiModelSetup {
|
|
|
753
753
|
await openAiGpt54.save();
|
|
754
754
|
log.debug("OpenAI model already exists: GPT-5.4");
|
|
755
755
|
}
|
|
756
|
+
const openAiGpt54Mini = await PsAiModel.findOne({
|
|
757
|
+
where: { name: "GPT-5.4 mini" },
|
|
758
|
+
});
|
|
759
|
+
const openAiGpt54MiniConfig = {
|
|
760
|
+
type: PsAiModelType.TextReasoning,
|
|
761
|
+
modelSize: PsAiModelSize.Small,
|
|
762
|
+
provider: "openai",
|
|
763
|
+
prices: {
|
|
764
|
+
costInTokensPerMillion: 0.75,
|
|
765
|
+
costOutTokensPerMillion: 4.5,
|
|
766
|
+
costInCachedContextTokensPerMillion: 0.075,
|
|
767
|
+
currency: "USD",
|
|
768
|
+
},
|
|
769
|
+
maxTokensOut: 128000,
|
|
770
|
+
maxContextTokens: 400000,
|
|
771
|
+
defaultTemperature: 0.7,
|
|
772
|
+
model: "gpt-5.4-mini",
|
|
773
|
+
active: true,
|
|
774
|
+
};
|
|
775
|
+
if (!openAiGpt54Mini) {
|
|
776
|
+
await PsAiModel.create({
|
|
777
|
+
name: "GPT-5.4 mini",
|
|
778
|
+
organization_id: 1,
|
|
779
|
+
user_id: userId,
|
|
780
|
+
configuration: openAiGpt54MiniConfig,
|
|
781
|
+
});
|
|
782
|
+
log.info("Created OpenAI model: GPT-5.4 mini");
|
|
783
|
+
}
|
|
784
|
+
else {
|
|
785
|
+
openAiGpt54Mini.set("configuration", openAiGpt54MiniConfig);
|
|
786
|
+
openAiGpt54Mini.changed("configuration", true);
|
|
787
|
+
await openAiGpt54Mini.save();
|
|
788
|
+
log.debug("OpenAI model already exists: GPT-5.4 mini");
|
|
789
|
+
}
|
|
790
|
+
const openAiGpt54Nano = await PsAiModel.findOne({
|
|
791
|
+
where: { name: "GPT-5.4 nano" },
|
|
792
|
+
});
|
|
793
|
+
const openAiGpt54NanoConfig = {
|
|
794
|
+
type: PsAiModelType.TextReasoning,
|
|
795
|
+
modelSize: PsAiModelSize.Small,
|
|
796
|
+
provider: "openai",
|
|
797
|
+
prices: {
|
|
798
|
+
costInTokensPerMillion: 0.2,
|
|
799
|
+
costOutTokensPerMillion: 1.25,
|
|
800
|
+
costInCachedContextTokensPerMillion: 0.02,
|
|
801
|
+
currency: "USD",
|
|
802
|
+
},
|
|
803
|
+
maxTokensOut: 128000,
|
|
804
|
+
maxContextTokens: 400000,
|
|
805
|
+
defaultTemperature: 0.7,
|
|
806
|
+
model: "gpt-5.4-nano",
|
|
807
|
+
active: true,
|
|
808
|
+
};
|
|
809
|
+
if (!openAiGpt54Nano) {
|
|
810
|
+
await PsAiModel.create({
|
|
811
|
+
name: "GPT-5.4 nano",
|
|
812
|
+
organization_id: 1,
|
|
813
|
+
user_id: userId,
|
|
814
|
+
configuration: openAiGpt54NanoConfig,
|
|
815
|
+
});
|
|
816
|
+
log.info("Created OpenAI model: GPT-5.4 nano");
|
|
817
|
+
}
|
|
818
|
+
else {
|
|
819
|
+
openAiGpt54Nano.set("configuration", openAiGpt54NanoConfig);
|
|
820
|
+
openAiGpt54Nano.changed("configuration", true);
|
|
821
|
+
await openAiGpt54Nano.save();
|
|
822
|
+
log.debug("OpenAI model already exists: GPT-5.4 nano");
|
|
823
|
+
}
|
|
756
824
|
const openAiGpt54Pro = await PsAiModel.findOne({
|
|
757
825
|
where: { name: "GPT-5.4 Pro" },
|
|
758
826
|
});
|
|
@@ -1208,6 +1276,8 @@ export class NewAiModelSetup {
|
|
|
1208
1276
|
{ name: "GPT-5.1", envKey: "OPENAI_API_KEY" },
|
|
1209
1277
|
{ name: "GPT-5.2", envKey: "OPENAI_API_KEY" },
|
|
1210
1278
|
{ name: "GPT-5.4", envKey: "OPENAI_API_KEY" },
|
|
1279
|
+
{ name: "GPT-5.4 mini", envKey: "OPENAI_API_KEY" },
|
|
1280
|
+
{ name: "GPT-5.4 nano", envKey: "OPENAI_API_KEY" },
|
|
1211
1281
|
{ name: "GPT-5.4 Pro", envKey: "OPENAI_API_KEY" },
|
|
1212
1282
|
{ name: "Gemini 3 Pro Preview", envKey: "GEMINI_API_KEY" },
|
|
1213
1283
|
{ name: "Gemini 3.1 Pro Preview", envKey: "GEMINI_API_KEY" },
|
package/models/index.cjs
CHANGED
|
@@ -57,9 +57,25 @@ if (process.env.NODE_ENV === "production") {
|
|
|
57
57
|
logger_cjs_1.default.debug("Creating Sequelize instance with ENABLE_PG_SSL");
|
|
58
58
|
sequelize = new Sequelize(process.env.DATABASE_URL, {
|
|
59
59
|
dialect: "postgres",
|
|
60
|
-
dialectOptions: {
|
|
60
|
+
dialectOptions: {
|
|
61
|
+
keepAlive: true,
|
|
62
|
+
keepAliveInitialDelayMillis: 10000,
|
|
63
|
+
ssl: {
|
|
64
|
+
rejectUnauthorized: false
|
|
65
|
+
}
|
|
66
|
+
},
|
|
61
67
|
minifyAliases: true,
|
|
62
68
|
pool: poolConfig,
|
|
69
|
+
retry: {
|
|
70
|
+
max: 3,
|
|
71
|
+
match: [
|
|
72
|
+
/ECONNRESET/i,
|
|
73
|
+
/ETIMEDOUT/i,
|
|
74
|
+
/SequelizeConnectionError/i,
|
|
75
|
+
/SequelizeConnectionTimedOutError/i,
|
|
76
|
+
/57P01/i,
|
|
77
|
+
],
|
|
78
|
+
},
|
|
63
79
|
logging: process.env.YP_LOG_SQL === "true" ? console.log : false,
|
|
64
80
|
operatorsAliases,
|
|
65
81
|
});
|
package/package.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export function replaceBetterReykjavikCategoryId(id: any): 10 | 1 | 2 | 5 | 4 | 7 |
|
|
1
|
+
export function replaceBetterReykjavikCategoryId(id: any): 10 | 1 | 3 | 2 | 5 | 4 | 7 | 6 | 8 | 12 | 9 | 11 | 13 | undefined;
|
|
2
2
|
export function clean(string: any): any;
|
|
3
3
|
export function shuffleArray(array: any): any;
|