LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangSmith
  • Client
  • Run Trees
  • Traceable
  • Evaluation
  • Schemas
  • Langchain
  • Jest
  • Vitest
  • Wrappers
  • Anonymizer
  • Jestlike
  • Vercel
  • Anthropic
  • Sandbox
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangSmith
ClientRun TreesTraceableEvaluationSchemasLangchainJestVitestWrappersAnonymizerJestlikeVercelAnthropicSandbox
Language
Theme
JavaScriptlangsmithindexClientConfig
Interface●Since v0.1

ClientConfig

Copy
interface ClientConfig

Properties

property
anonymizer: (values: KVMap) => KVMap | Promise<KVMap>

A function applied for masking serialized run inputs and outputs, before sending to the API. Can be called with raw inputs, raw outputs, or a nested { error: string } object for errors.

If a hideInputs or hideOutputs function is present, the client will call it instead of the anonymizer as appropriate.

property
apiKey: string
property
apiUrl: string
property
autoBatchTracing: boolean
property
batchSizeBytesLimit: number

Maximum size of a batch of runs in bytes.

property
batchSizeLimit: number

Maximum number of operations to batch in a single request.

property
blockOnRootRunFinalization: boolean
property
cache: boolean | PromptCache
property
callerOptions: AsyncCallerParams
property
debug: boolean
property
disablePromptCache: boolean

Disable prompt caching for this client. By default, prompt caching is enabled globally.

property
fetchImplementation: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>

Custom fetch implementation. Useful for testing.

property
fetchOptions: RequestInit
property
headers: Record<string, string>

HTTP headers for the response that caused the error

property
hideInputs: boolean | (inputs: KVMap) => KVMap | Promise<KVMap>
property
hideMetadata: boolean | (metadata: KVMap) => KVMap | Promise<KVMap>
property
hideOutputs: boolean | (outputs: KVMap) => KVMap | Promise<KVMap>
property
manualFlushMode: boolean

Whether to require manual .flush() calls before sending traces. Useful if encountering network rate limits at trace high volumes.

property
maxIngestMemoryBytes: number

Maximum total memory (in bytes) for both the AutoBatchQueue and batchIngestCaller queue. When exceeded, runs/batches are dropped. Defaults to 1GB.

property
omitTracedRuntimeInfo: boolean

Whether to omit runtime information from traced runs. If true, runtime information (SDK version, platform, etc.) and LangChain environment variable metadata will not be stored in runs. Defaults to false.

property
timeout_ms: number
property
traceBatchConcurrency: number
property
tracingMode: TracingMode
property
tracingSamplingRate: number
property
webUrl: string
property
workspaceId: string

The workspace ID. Required for org-scoped API keys.

View source on GitHub