@pentatonic-ai/ai-agent-sdk 0.10.27 → 0.10.28
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/index.cjs
CHANGED
|
@@ -878,7 +878,7 @@ function fireAndForgetEmit(clientConfig, sessionOpts, messages, result, model) {
|
|
|
878
878
|
}
|
|
879
879
|
|
|
880
880
|
// src/telemetry.js
|
|
881
|
-
var VERSION = "0.10.
|
|
881
|
+
var VERSION = "0.10.28";
|
|
882
882
|
var TELEMETRY_URL = "https://sdk-telemetry.philip-134.workers.dev";
|
|
883
883
|
function machineId() {
|
|
884
884
|
const raw = typeof process !== "undefined" ? `${process.env?.USER || process.env?.USERNAME || "u"}:${process.platform || "x"}:${process.arch || "x"}` : "browser";
|
package/dist/index.js
CHANGED
|
@@ -847,7 +847,7 @@ function fireAndForgetEmit(clientConfig, sessionOpts, messages, result, model) {
|
|
|
847
847
|
}
|
|
848
848
|
|
|
849
849
|
// src/telemetry.js
|
|
850
|
-
var VERSION = "0.10.
|
|
850
|
+
var VERSION = "0.10.28";
|
|
851
851
|
var TELEMETRY_URL = "https://sdk-telemetry.philip-134.workers.dev";
|
|
852
852
|
function machineId() {
|
|
853
853
|
const raw = typeof process !== "undefined" ? `${process.env?.USER || process.env?.USERNAME || "u"}:${process.platform || "x"}:${process.arch || "x"}` : "browser";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pentatonic-ai/ai-agent-sdk",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.28",
|
|
4
4
|
"description": "TES SDK — LLM observability and lifecycle tracking via Pentatonic Thing Event System. Track token usage, tool calls, and conversations. Manage things through event-sourced lifecycle stages with AI enrichment and vector search.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -121,6 +121,16 @@ STUDENT_API_KEY = os.environ.get("STUDENT_API_KEY", "")
|
|
|
121
121
|
STUDENT_MODEL = os.environ.get("STUDENT_MODEL", "nuextract-2.0-4b-ft")
|
|
122
122
|
STUDENT_TIMEOUT_SEC = float(os.environ.get("STUDENT_TIMEOUT_SEC", "60"))
|
|
123
123
|
STUDENT_MAX_TOKENS = int(os.environ.get("STUDENT_MAX_TOKENS", "768"))
|
|
124
|
+
# Student-path concurrency — SEPARATE from CONCURRENT_LLM_CALLS. That knob is
|
|
125
|
+
# tuned for the teacher (N concurrent 27B *batch* calls of EVENTS_PER_LLM_CALL
|
|
126
|
+
# events each); the cascade reused it to bound student calls, throttling a 4B
|
|
127
|
+
# model — which batches 30–60 single-event calls at <5% KV cache on an L4 — to
|
|
128
|
+
# just 6/worker. Under a bursty backlog that left the student GPU-pinned but
|
|
129
|
+
# starved (Running:1, Waiting:0, KV:0.1%; 25k-backlog incident 2026-07-08). Each
|
|
130
|
+
# student call is ONE event (tiny KV), so it parallelises far higher. Tune per
|
|
131
|
+
# the box's KV-cache headroom. Do NOT raise CONCURRENT_LLM_CALLS to fix student
|
|
132
|
+
# throughput — that also raises teacher 27B concurrency (OOM risk).
|
|
133
|
+
STUDENT_CONCURRENT_CALLS = int(os.environ.get("STUDENT_CONCURRENT_CALLS", "48"))
|
|
124
134
|
# Fraction of student-passing events ALSO sent to the teacher — NOT a quality
|
|
125
135
|
# lever, this is the monitoring + active-learning sample (drift detection and
|
|
126
136
|
# fresh teacher-gold on live traffic). Default conservative-ish 5%.
|
|
@@ -2649,7 +2659,10 @@ async def _process_cascade(
|
|
|
2649
2659
|
gates: a pass writes the student's extraction (producer='student'); a fail/
|
|
2650
2660
|
sample escalates to the teacher. Disjoint — the student writes XOR the event
|
|
2651
2661
|
is escalated, so there is nothing to supersede."""
|
|
2652
|
-
|
|
2662
|
+
# STUDENT_CONCURRENT_CALLS, not CONCURRENT_LLM_CALLS: the student is a cheap
|
|
2663
|
+
# single-event 4B call that batches far higher than the teacher's 27B
|
|
2664
|
+
# batch-calls (see the config note). Reusing the teacher knob starved it.
|
|
2665
|
+
sem = asyncio.Semaphore(STUDENT_CONCURRENT_CALLS)
|
|
2653
2666
|
|
|
2654
2667
|
async def _student(item):
|
|
2655
2668
|
async with sem:
|