Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
refactor(mcp-host): classify request_timeout explicitly in both providers (#739)
Alfredo Lopeze30d87cbd5c7
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.jsonindex 1a72211cb..0184dca7b 100644--- a/mcp-host/package-lock.json+++ b/mcp-host/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-mcp-host",- "version": "0.1.419",+ "version": "0.1.420","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-mcp-host",- "version": "0.1.419",+ "version": "0.1.420","license": "SEE LICENSE IN LICENSE","dependencies": {"@anthropic-ai/sdk": "^0.32.0",diff --git a/mcp-host/package.json b/mcp-host/package.jsonindex 9a2138e22..b9296a15a 100644--- a/mcp-host/package.json+++ b/mcp-host/package.json@@ -1,6 +1,6 @@{"name": "clerum-mcp-host",- "version": "0.1.419",+ "version": "0.1.420","description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude","main": "dist/main.js","engines": {diff --git a/mcp-host/src/llm/codexSubscription.ts b/mcp-host/src/llm/codexSubscription.tsindex 75f87b50f..f70eb82a2 100644--- a/mcp-host/src/llm/codexSubscription.ts+++ b/mcp-host/src/llm/codexSubscription.ts@@ -412,6 +412,19 @@ export class CodexSubscriptionProvider implements SingleTurnProvider {...(providerDispatched !== undefined ? { providerDispatched } : {}),}}+ // The proxy's 408 for a body upload over its read deadline: the upstream+ // never saw the body. Not an outage, so never retryable: a retryable class+ // would put this provider in failover cooldown for the Host's own slow+ // upload (#739).+ if (code === 'request_timeout') {+ return {+ code: LlmErrorCode.ApiCallFailed,+ retryable: false,+ message: err instanceof Error ? err.message : String(err),+ providerCode: code,+ ...(providerDispatched !== undefined ? { providerDispatched } : {}),+ }+ }if (code === 'provider_unavailable' || code === 'connection_unavailable') {return {code: LlmErrorCode.ModelOverloaded,diff --git a/mcp-host/src/llm/grokSubscription.ts b/mcp-host/src/llm/grokSubscription.tsindex 5af59b690..4e0058a8d 100644--- a/mcp-host/src/llm/grokSubscription.ts+++ b/mcp-host/src/llm/grokSubscription.ts@@ -279,6 +279,19 @@ export class GrokSubscriptionProvider implements SingleTurnProvider {...(providerDispatched !== undefined ? { providerDispatched } : {}),}}+ // The proxy's 408 for a body upload over its read deadline: the upstream+ // never saw the body. Not an outage, so never retryable: a retryable class+ // would put this provider in failover cooldown for the Host's own slow+ // upload (#739).+ if (code === 'request_timeout') {+ return {+ code: LlmErrorCode.ApiCallFailed,+ retryable: false,+ message: err instanceof Error ? err.message : String(err),+ providerCode: code,+ ...(providerDispatched !== undefined ? { providerDispatched } : {}),+ }+ }if (code === 'provider_unavailable' || code === 'connection_unavailable') {return {code: LlmErrorCode.ModelOverloaded,