llm
TypeScript AI Agent- LLM - Configuration surface and an OpenAI-compatible base client.
- Python parity with praisonaiagents/llm/llm.py
LLM.__init__. Every constructor parameter of the Python class is accepted here and honoured: -
- Request-shaped options reach the Chat Completions body built by {
- Transport-shaped options reach the client built by {
maxIterbounds the tool-calling loop in {eventsare listeners invoked on request start/end, tool calls, errors and retries (Python: litellm callbacks + display callbacks).failoverManagerrotates credentials on retryable failures.promptCaching,webFetchandclaudeMemoryemit the Anthropic-specific request shapes Python emits, and are rejected on models that cannot carry them rather than silently ignored.authresolves credentials from an object, a function or a registered named provider.
Import
Classes
LLMEvent
TypeScript LLMEvent class
LLMEventHooks
TypeScript LLMEventHooks class
LLMFailoverProfile
TypeScript LLMFailoverProfile class
LLMFailoverManager
TypeScript LLMFailoverManager class
LLMFailoverDecision
TypeScript LLMFailoverDecision class
ClaudeMemoryBackend
TypeScript ClaudeMemoryBackend class
LLMConfig
TypeScript LLMConfig class
LLMResponse
TypeScript LLMResponse class
LLM
TypeScript LLM class
LLMGenerateOptions
TypeScript LLMGenerateOptions class
LLMToolLoopOptions
TypeScript LLMToolLoopOptions class
LLMToolCallRecord
TypeScript LLMToolCallRecord class
LLMToolLoopResult
TypeScript LLMToolLoopResult class
LLMRequestOptions
TypeScript LLMRequestOptions class
BaseLLM
TypeScript BaseLLM class
Functions
classifyLLMError()
Function definition.
isAnthropicModel()
Function definition.

