@realtimex/folio 0.1.12 → 0.1.13
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.
- package/.env.example +1 -0
- package/api/src/services/IngestionService.ts +412 -169
- package/api/src/services/ModelCapabilityService.ts +20 -3
- package/dist/api/src/services/IngestionService.js +372 -161
- package/dist/api/src/services/ModelCapabilityService.js +18 -3
- package/dist/assets/{index-tVGLBfz6.js → index-CLpalZvv.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -126,6 +126,16 @@ export class ModelCapabilityService {
|
|
|
126
126
|
}
|
|
127
127
|
const now = new Date();
|
|
128
128
|
const key = this.capabilityKey(provider, model, modality);
|
|
129
|
+
const existingEntry = map[key];
|
|
130
|
+
if (this.isManualOverrideActive(existingEntry) && reason !== "manual_override") {
|
|
131
|
+
logger.info(`Skipping auto capability update for ${provider}/${model} (${modality}) because manual override is active`, {
|
|
132
|
+
requestedState: state,
|
|
133
|
+
requestedReason: reason,
|
|
134
|
+
currentState: existingEntry?.state,
|
|
135
|
+
currentReason: existingEntry?.reason,
|
|
136
|
+
});
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
129
139
|
const nextEntry = {
|
|
130
140
|
state,
|
|
131
141
|
learned_at: now.toISOString(),
|
|
@@ -212,6 +222,13 @@ export class ModelCapabilityService {
|
|
|
212
222
|
const expiryTs = Date.parse(entry.expires_at);
|
|
213
223
|
return Number.isFinite(expiryTs) && expiryTs <= Date.now();
|
|
214
224
|
}
|
|
225
|
+
static isManualOverrideActive(entry) {
|
|
226
|
+
if (!entry)
|
|
227
|
+
return false;
|
|
228
|
+
if (entry.reason !== "manual_override")
|
|
229
|
+
return false;
|
|
230
|
+
return !this.isExpired(entry);
|
|
231
|
+
}
|
|
215
232
|
static nextFailureCount(entry, nowTs) {
|
|
216
233
|
if (!entry || entry.state !== "pending_unsupported" || this.isExpired(entry)) {
|
|
217
234
|
return 1;
|
|
@@ -496,7 +513,7 @@ export class ModelCapabilityService {
|
|
|
496
513
|
}
|
|
497
514
|
const providerSpecificMatches = this.matchMessage(signal.message, this.providerCapabilityHints(provider, modality));
|
|
498
515
|
if (providerSpecificMatches.length > 0) {
|
|
499
|
-
score +=
|
|
516
|
+
score += 3;
|
|
500
517
|
evidence.push(...providerSpecificMatches.map((match) => `provider:${match}`));
|
|
501
518
|
}
|
|
502
519
|
const weakCapabilityHints = this.matchMessage(signal.message, modality === "pdf"
|
|
@@ -561,7 +578,6 @@ export class ModelCapabilityService {
|
|
|
561
578
|
if (normalized.includes("realtimex")) {
|
|
562
579
|
return [
|
|
563
580
|
"unsupported file input",
|
|
564
|
-
"invalid model",
|
|
565
581
|
];
|
|
566
582
|
}
|
|
567
583
|
return [];
|
|
@@ -586,7 +602,6 @@ export class ModelCapabilityService {
|
|
|
586
602
|
}
|
|
587
603
|
if (normalized.includes("realtimex")) {
|
|
588
604
|
return [
|
|
589
|
-
"invalid model",
|
|
590
605
|
"text-only model",
|
|
591
606
|
];
|
|
592
607
|
}
|