From 595f66089984f83efe541d77a4ddf2154c9a7ec4 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Wed, 6 May 2026 16:10:10 -0700 Subject: [PATCH] fix(agent-sdk): align SessionStatus and RunStatus enums with backend wire values Backend (LIT-2890) emits provisioning/ready/busy/error/terminated for session status and queued/running/finished/cancelled/error for run status. Update the SDK type aliases so callers compare against the actual values the proxy returns over the wire. --- sdks/typescript-agent-sdk/src/types.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sdks/typescript-agent-sdk/src/types.ts b/sdks/typescript-agent-sdk/src/types.ts index 057ae52f6a5..4c88a8180ad 100644 --- a/sdks/typescript-agent-sdk/src/types.ts +++ b/sdks/typescript-agent-sdk/src/types.ts @@ -66,18 +66,18 @@ export interface CreateSessionOptions { } export type SessionStatus = - | "pending" - | "running" - | "idle" - | "terminated" - | "failed"; + | "provisioning" + | "ready" + | "busy" + | "error" + | "terminated"; export type RunStatus = | "queued" | "running" - | "completed" - | "failed" - | "cancelled"; + | "finished" + | "cancelled" + | "error"; /** Lightweight info returned by list endpoints. */ export interface AgentInfo { @@ -149,7 +149,7 @@ export class LiteLLMAgentError extends Error { message: string, options: { code: string; status?: number; retryable?: boolean } = { code: "unknown", - } + }, ) { super(message); this.name = "LiteLLMAgentError";