@thanh01.pmt/curriculum-kit 1.4.28 → 1.4.30
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 +19 -2
- package/dist/ai/index.cjs.map +1 -1
- package/dist/ai/index.d.cts +2 -2
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/index.mjs +19 -2
- package/dist/ai/index.mjs.map +1 -1
- package/dist/index.cjs +49 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +49 -3
- package/dist/index.mjs.map +1 -1
- package/dist/media/index.cjs +19 -2
- package/dist/media/index.cjs.map +1 -1
- package/dist/media/index.d.cts +1 -1
- package/dist/media/index.d.ts +1 -1
- package/dist/media/index.mjs +19 -2
- package/dist/media/index.mjs.map +1 -1
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.d.cts +1 -1
- package/dist/pipeline/index.d.ts +1 -1
- package/dist/pipeline/index.mjs.map +1 -1
- package/dist/publishers/index.d.cts +1 -1
- package/dist/publishers/index.d.ts +1 -1
- package/dist/storage/index.cjs +27 -0
- package/dist/storage/index.cjs.map +1 -1
- package/dist/storage/index.d.cts +11 -2
- package/dist/storage/index.d.ts +11 -2
- package/dist/storage/index.mjs +27 -0
- package/dist/storage/index.mjs.map +1 -1
- package/dist/{streamRunner-kpS4MZP1.d.cts → streamRunner-DYHFhNUr.d.cts} +1 -1
- package/dist/{streamRunner-kpS4MZP1.d.ts → streamRunner-DYHFhNUr.d.ts} +1 -1
- package/dist/{types-BUJGYiep.d.cts → types-Bgk-C4K2.d.cts} +11 -0
- package/dist/{types-BUJGYiep.d.ts → types-Bgk-C4K2.d.ts} +11 -0
- package/dist/workflow/index.cjs +21 -3
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.mjs +21 -3
- package/dist/workflow/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/media/index.d.cts
CHANGED
package/dist/media/index.d.ts
CHANGED
package/dist/media/index.mjs
CHANGED
|
@@ -701,6 +701,13 @@ Guidelines:
|
|
|
701
701
|
});
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
|
+
if (!options.customInference && resolveApiKey2("CURRICULUM_KIT_REQUIRE_CUSTOM_INFERENCE") === "1") {
|
|
705
|
+
throw createAiInferenceError({
|
|
706
|
+
errorCode: "ERR_CUSTOM_INFERENCE_REQUIRED",
|
|
707
|
+
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.",
|
|
708
|
+
rawError: { mandate: "CURRICULUM_KIT_REQUIRE_CUSTOM_INFERENCE", hasCustomInference: false }
|
|
709
|
+
});
|
|
710
|
+
}
|
|
704
711
|
const formattedMessages = [
|
|
705
712
|
{ role: "system", content: systemInstruction },
|
|
706
713
|
...messages.map((m) => ({
|
|
@@ -724,7 +731,12 @@ Guidelines:
|
|
|
724
731
|
const unique9RouterModels = Array.from(new Set(candidateModels));
|
|
725
732
|
for (const model of unique9RouterModels) {
|
|
726
733
|
try {
|
|
727
|
-
const
|
|
734
|
+
const r9Idle = options.idleTimeoutMs ?? (Number(process.env.ARTIFACT_STREAM_IDLE_TIMEOUT_MS || process.env.STREAM_IDLE_TIMEOUT_MS) || 0) ?? 0;
|
|
735
|
+
const r9Total = options.timeoutMs ?? (Number(process.env.ARTIFACT_STREAM_TOTAL_TIMEOUT_MS || process.env.STREAM_TOTAL_TIMEOUT_MS) || 0) ?? 0;
|
|
736
|
+
const idle = createStreamAbortController({
|
|
737
|
+
idleMs: r9Idle > 0 ? r9Idle : 9e4,
|
|
738
|
+
totalMs: r9Total > 0 ? r9Total : 3e5
|
|
739
|
+
});
|
|
728
740
|
const res = await fetch(`${ninerouterBaseUrl}/chat/completions`, {
|
|
729
741
|
method: "POST",
|
|
730
742
|
headers: {
|
|
@@ -967,7 +979,12 @@ Guidelines:
|
|
|
967
979
|
try {
|
|
968
980
|
const rawUrl = resolveApiKey2("NINEROUTER_BASE_URL") || resolveApiKey2("NINE_ROUTER_BASE_URL") || "https://ai-router.orchable.app/v1";
|
|
969
981
|
const fbBaseUrl = rawUrl.replace(/["']/g, "").replace(/\/$/, "");
|
|
970
|
-
const
|
|
982
|
+
const fbIdle = options.idleTimeoutMs ?? (Number(process.env.ARTIFACT_STREAM_IDLE_TIMEOUT_MS || process.env.STREAM_IDLE_TIMEOUT_MS) || 0) ?? 0;
|
|
983
|
+
const fbTotal = options.timeoutMs ?? (Number(process.env.ARTIFACT_STREAM_TOTAL_TIMEOUT_MS || process.env.STREAM_TOTAL_TIMEOUT_MS) || 0) ?? 0;
|
|
984
|
+
const idle = createStreamAbortController({
|
|
985
|
+
idleMs: fbIdle > 0 ? fbIdle : 9e4,
|
|
986
|
+
totalMs: fbTotal > 0 ? fbTotal : 3e5
|
|
987
|
+
});
|
|
971
988
|
const res = await fetch(`${fbBaseUrl}/chat/completions`, {
|
|
972
989
|
method: "POST",
|
|
973
990
|
headers: {
|