@thanh01.pmt/curriculum-kit 1.4.29 → 1.4.31
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/dist/ai/index.cjs +7 -0
- package/dist/ai/index.cjs.map +1 -1
- package/dist/ai/index.mjs +7 -0
- package/dist/ai/index.mjs.map +1 -1
- package/dist/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.mjs +8 -1
- package/dist/index.mjs.map +1 -1
- package/dist/media/index.cjs +7 -0
- package/dist/media/index.cjs.map +1 -1
- package/dist/media/index.mjs +7 -0
- package/dist/media/index.mjs.map +1 -1
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.mjs.map +1 -1
- package/dist/workflow/index.cjs +7 -0
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.mjs +7 -0
- package/dist/workflow/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -516,6 +516,13 @@ Guidelines:
|
|
|
516
516
|
});
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
+
if (!options.customInference && resolveApiKey("CURRICULUM_KIT_REQUIRE_CUSTOM_INFERENCE") === "1") {
|
|
520
|
+
throw createAiInferenceError({
|
|
521
|
+
errorCode: "ERR_CUSTOM_INFERENCE_REQUIRED",
|
|
522
|
+
message: "customInference is REQUIRED (CURRICULUM_KIT_REQUIRE_CUSTOM_INFERENCE=1): pass buildKitCustomInference(...) so every LLM call flows through the host AI SDK gateway and its unified Langfuse tracing. Raw-fetch provider routes are disabled by mandate.",
|
|
523
|
+
rawError: { mandate: "CURRICULUM_KIT_REQUIRE_CUSTOM_INFERENCE", hasCustomInference: false }
|
|
524
|
+
});
|
|
525
|
+
}
|
|
519
526
|
const formattedMessages = [
|
|
520
527
|
{ role: "system", content: systemInstruction },
|
|
521
528
|
...messages.map((m) => ({
|
|
@@ -1832,7 +1839,7 @@ async function inferStructured(schema, systemPrompt, userPrompt, options, label)
|
|
|
1832
1839
|
} catch (aiSdkErr) {
|
|
1833
1840
|
console.warn(`[SlideProductionWorkflow] AI SDK generateObject failed for ${label}:`, aiSdkErr?.message || aiSdkErr);
|
|
1834
1841
|
}
|
|
1835
|
-
if (options.allowLegacyFallback
|
|
1842
|
+
if (options.allowLegacyFallback !== true) return null;
|
|
1836
1843
|
try {
|
|
1837
1844
|
const messages = [
|
|
1838
1845
|
{ role: "user", content: [systemPrompt, userPrompt].filter(Boolean).join("\n\n") }
|