fix: update version tags to v28 and temporarily disable cache for predictions

This commit is contained in:
2026-04-24 00:11:00 +03:00
parent 634204acf0
commit 1f26a5bf2f
10 changed files with 86 additions and 56 deletions
+7 -25
View File
@@ -186,7 +186,7 @@ export class PredictionsService implements OnModuleInit, OnModuleDestroy {
mode:
typeof (response.data as Record<string, unknown>)?.mode === "string"
? String((response.data as Record<string, unknown>).mode)
: this.configService.get("AI_ENGINE_MODE", "v25"),
: this.configService.get("AI_ENGINE_MODE", "v28-pro-max"),
};
} catch (error: unknown) {
const requestError =
@@ -207,7 +207,7 @@ export class PredictionsService implements OnModuleInit, OnModuleDestroy {
typeof requestError.detail === "string"
? requestError.detail
: requestError.message,
mode: this.configService.get("AI_ENGINE_MODE", "v25"),
mode: this.configService.get("AI_ENGINE_MODE", "v28-pro-max"),
};
}
}
@@ -216,31 +216,12 @@ export class PredictionsService implements OnModuleInit, OnModuleDestroy {
await this.ensurePredictionDataReady(matchId);
const matchContext = await this.getMatchContext(matchId);
// Queue mode (Redis enabled)
if (this.predictionsQueue && this.queueEvents) {
try {
const job = await this.predictionsQueue.addPredictMatchJob({ matchId });
const data = await job.waitUntilFinished(this.queueEvents, 30000);
if (!data || data.error) {
return null;
}
await this.recordPredictionRun(matchId, data as MatchPredictionDto);
return this.enrichPredictionResponse(
data as MatchPredictionDto,
matchContext,
);
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
this.logger.error(`Prediction queue failed for ${matchId}: ${message}`);
this.throwAiError(message);
}
}
// Queue mode (Redis enabled) - REMOVED per user request to always fetch from scratch
// Direct HTTP mode (no Redis)
try {
const response = await this.aiEngineClient.post<MatchPredictionDto>(
`/v20plus/analyze/${matchId}`,
{},
{ simulate: true, is_simulation: true, pre_match_only: true },
);
await this.recordPredictionRun(matchId, response.data);
return this.enrichPredictionResponse(
@@ -321,7 +302,7 @@ export class PredictionsService implements OnModuleInit, OnModuleDestroy {
return {
count: upcoming.length,
modelVersion: "v25-v30-ensemble",
modelVersion: "v28-pro-max",
matches: upcoming.map((p) => {
const out = p.predictionJson as Record<string, unknown>;
const matchInfo = (out?.match_info || {}) as Record<string, unknown>;
@@ -560,6 +541,7 @@ export class PredictionsService implements OnModuleInit, OnModuleDestroy {
bet_advice: betAdvice as MatchPredictionDto["bet_advice"],
market_board: enrichedMarketBoard,
reasoning_factors: reasoningFactors,
model_version: "v28-pro-max",
};
}
@@ -1143,7 +1125,7 @@ export class PredictionsService implements OnModuleInit, OnModuleDestroy {
return null;
}
if (!modelVersion.startsWith("v25")) {
if (!modelVersion.startsWith("v28-pro-max")) {
return null;
}