From 737bf7ba6339504836dca11bff681da2d2c2e028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=85=E5=B0=8F=E5=91=861=E5=8F=B7?= Date: Sat, 14 Feb 2026 00:41:00 +0000 Subject: [PATCH] fix(venice): disable streaming to prevent SDK crash with usage-only chunks (#15819) Venice.ai API returns SSE chunks containing only usage metadata without a choices array. The SDK crashes trying to access choices[0] on these chunks with: Cannot read properties of undefined (reading '0') Changes: - Disable streaming by default for all Venice models - Apply to both static catalog and dynamically discovered models - Users can explicitly enable streaming in config if needed This is a workaround until the SDK handles Venice's streaming format. Fixes #15819 --- src/agents/venice-models.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/agents/venice-models.ts b/src/agents/venice-models.ts index 32bd2f93b99..098724c73b4 100644 --- a/src/agents/venice-models.ts +++ b/src/agents/venice-models.ts @@ -300,6 +300,11 @@ export function buildVeniceModelDefinition(entry: VeniceCatalogEntry): ModelDefi cost: VENICE_DEFAULT_COST, contextWindow: entry.contextWindow, maxTokens: entry.maxTokens, + // Disable streaming by default for Venice to avoid SDK crash with usage-only chunks + // See: https://github.com/openclaw/openclaw/issues/15819 + params: { + streaming: false, + }, }; } @@ -381,6 +386,10 @@ export async function discoverVeniceModels(): Promise { cost: VENICE_DEFAULT_COST, contextWindow: apiModel.model_spec.availableContextTokens || 128000, maxTokens: 8192, + // Disable streaming to avoid SDK crash with usage-only chunks (#15819) + params: { + streaming: false, + }, }); } }