@threadplane/langgraphInterfacev0.3.4

LangGraphClientOptions

Tuning options for the underlying LangGraph SDK Client constructed by the default FetchStreamTransport. Ignored when a custom transport is supplied (the transport owns its own client).

import type { LangGraphClientOptions } from '@threadplane/langgraph';

Declaration

export interface LangGraphClientOptions  {
  defaultHeaders?: Record<string, string>;
  maxRetries?: number;
}

Members

defaultHeaders

Headers attached to every request the SDK client makes, including the run stream. Use this for a per-user session token that your LangGraph deployment's custom authenticate handler validates.

There is deliberately no apiKey option: a deployment credential passed from Angular is bundled into the browser build like any other constant. Keep deployment keys on a same-origin proxy or gateway you own, and point apiUrl at it. The client is constructed with apiKey: null, so the SDK never attaches a key from the environment either.

defaultHeaders?: Record<string, string>;

maxRetries

How many times a failed request — including the initial stream connect — is retried with exponential backoff before the error surfaces. Maps to the SDK's callerOptions.maxRetries. Omitted → the SDK default (currently 4).

Set 0 to fail fast: useful for e2e tests that force a connection failure and assert the error surfaces promptly, rather than after the full multi-second backoff window.

maxRetries?: number;