LiteLLM Chat Model icon

LiteLLM Chat Model

LiteLLM-compatible chat model using a JSON options field

LiteLLM Chat Model

AI-generated

Summary

Configure a LiteLLM chat model with the specified model and generation parameters, returning a LangChain ChatOpenAI instance.

Inputs

  • model (required) — The model to use. Choose from the list, or enter a model ID manually.
  • options — Standard parameters automatically translated by LiteLLM for all providers. Custom parameters take precedence over these.
  • customParameters — Extra JSON fields passed directly to the API. Takes precedence over options parameters with matching keys.

Output shape

{ response: instance } where instance is a ChatOpenAI model configured with the provided model and parameters.

The node outputs an AiLanguageModel instance; no item data is consumed for the LLM call.

Examples

Example 1: Basic chat model invocation with GPT-4o.

model: 'gpt-4o'; options: { temperature: 0.7, maxTokens: 1000 }

Links

Discussion