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.
This commit is contained in:
Ishaan Jaffer 2026-05-06 16:10:10 -07:00
parent 6f3895b07c
commit 595f660899
No known key found for this signature in database

View file

@ -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";