@code-yeongyu/senpi-ai 2026.10.30-1 → 2026.10.30-2
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/api/anthropic-messages.js +6 -4
- package/dist/api/simple-options.js +1 -0
- package/dist/providers/data/.manifest.json +1 -1
- package/dist/providers/data/opengateway.json +1 -1
- package/dist/providers/data/openrouter.json +1 -1
- package/dist/providers/data/venice.json +1 -1
- package/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/utils/retry.js +8 -3
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -175,6 +175,12 @@ export interface StreamOptions extends ProviderRequestOptions<Model<Api>> {
|
|
|
175
175
|
* Adapter support is explicit; unsupported adapters do not invoke it.
|
|
176
176
|
*/
|
|
177
177
|
onProviderStreamEvent?: (data: unknown, model: Model<Api>) => void | Promise<void>;
|
|
178
|
+
/**
|
|
179
|
+
* Called whenever the response body delivers bytes, keep-alives included (SSE `ping` events, `:` comments).
|
|
180
|
+
* Liveness only: it says the connection is alive, not that the model produced anything. Adapter support is
|
|
181
|
+
* explicit; unsupported adapters do not invoke it.
|
|
182
|
+
*/
|
|
183
|
+
onTransportActivity?: () => void;
|
|
178
184
|
temperature?: number;
|
|
179
185
|
/**
|
|
180
186
|
* Arbitrary sampling parameters merged into the request body as-is, after the named request
|
package/dist/utils/retry.js
CHANGED
|
@@ -406,15 +406,15 @@ export function isRetryableAssistantError(message) {
|
|
|
406
406
|
}
|
|
407
407
|
/**
|
|
408
408
|
* Matches the agent-loop stream watchdog failures ("Idle timeout waiting for
|
|
409
|
-
* provider stream after <n>ms"
|
|
410
|
-
* <n>ms"), the WebSocket liveness verdict ("WebSocket liveness timeout after
|
|
409
|
+
* provider stream after <n>ms", "Provider stream start timed out after
|
|
410
|
+
* <n>ms" and "Provider stream sent only keep-alives and timed out after <n>ms"), the WebSocket liveness verdict ("WebSocket liveness timeout after
|
|
411
411
|
* <n>ms (<k> pings unanswered)"), and the Responses completion-phase verdict
|
|
412
412
|
* ("Provider stream stalled after the last output item: response.completed
|
|
413
413
|
* timed out after <n>ms"). These anchored shapes
|
|
414
414
|
* distinguish provider-stream stalls from unrelated extension, command, or MCP
|
|
415
415
|
* timeout diagnostics.
|
|
416
416
|
*/
|
|
417
|
-
const PROVIDER_STREAM_STALL_ERROR_PATTERN = /^(?:Idle timeout waiting for provider stream after \d+ms|Provider stream start timed out after \d+ms(?: \([^)]*\))?|WebSocket liveness timeout after \d+ms \(\d+ pings unanswered\)|Provider stream stalled after the last output item: response\.completed timed out after \d+ms)$/i;
|
|
417
|
+
const PROVIDER_STREAM_STALL_ERROR_PATTERN = /^(?:Idle timeout waiting for provider stream after \d+ms|Provider stream start timed out after \d+ms(?: \([^)]*\))?|Provider stream sent only keep-alives and timed out after \d+ms(?: \([^)]*\))?|WebSocket liveness timeout after \d+ms \(\d+ pings unanswered\)|Provider stream stalled after the last output item: response\.completed timed out after \d+ms)$/i;
|
|
418
418
|
const PROVIDER_TRANSPORT_TIMEOUT_ERROR_PATTERN = /^Request timed out\.?$/i;
|
|
419
419
|
export function isProviderStreamStallError(message) {
|
|
420
420
|
return message.stopReason === "error" && PROVIDER_STREAM_STALL_ERROR_PATTERN.test(message.errorMessage ?? "");
|
|
@@ -426,6 +426,11 @@ const PROVIDER_STALL_PHASES = [
|
|
|
426
426
|
symptom: "accepted the request but never started sending a response",
|
|
427
427
|
setting: "retry.provider.streamStartTimeoutMs",
|
|
428
428
|
},
|
|
429
|
+
{
|
|
430
|
+
pattern: /^Provider stream sent only keep-alives and timed out after (\d+)ms/i,
|
|
431
|
+
symptom: "kept the connection alive but sent no response",
|
|
432
|
+
setting: "retry.provider.keepAliveTimeoutMs",
|
|
433
|
+
},
|
|
429
434
|
{
|
|
430
435
|
pattern: /^Idle timeout waiting for provider stream after (\d+)ms/i,
|
|
431
436
|
symptom: "started the response and then went silent",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-yeongyu/senpi-ai",
|
|
3
|
-
"version": "2026.10.30-
|
|
3
|
+
"version": "2026.10.30-2",
|
|
4
4
|
"description": "Unified LLM API with automatic model discovery and provider configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@anthropic-ai/sdk": "0.127.0",
|
|
90
90
|
"@aws-sdk/client-bedrock-runtime": "3.1136.0",
|
|
91
|
-
"@earendil-works/pi-telemetry": "npm:@code-yeongyu/senpi-telemetry@2026.10.30-
|
|
91
|
+
"@earendil-works/pi-telemetry": "npm:@code-yeongyu/senpi-telemetry@2026.10.30-2",
|
|
92
92
|
"@google/genai": "2.23.0",
|
|
93
93
|
"@smithy/node-http-handler": "4.12.1",
|
|
94
94
|
"google-auth-library": "10.6.2",
|