Skip to content

Conversation

@ishaan-jaff
Copy link
Contributor

@ishaan-jaff ishaan-jaff commented Dec 10, 2025

[Feat] New Provider - add langgraph

This PR adds LangGraph as a new provider to LiteLLM, enabling users to call LangGraph agents via the standard OpenAI chat completions format. The implementation supports both streaming and non-streaming responses.

This PR adds LangGraph as a new provider to LiteLLM, enabling users to call LangGraph agents via the standard OpenAI chat completions format. The implementation supports both streaming and non-streaming responses.

Usage

Basic Completion

import litellm

response = litellm.completion(
    model="langgraph/agent",
    messages=[{"role": "user", "content": "What is 25 * 4?"}],
    api_base="http://localhost:2024",
)

print(response.choices[0].message.content)

Streaming

import litellm

response = litellm.completion(
    model="langgraph/agent",
    messages=[{"role": "user", "content": "What is the weather in Tokyo?"}],
    api_base="http://localhost:2024",
    stream=True,
)

for chunk in response:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Proxy Configuration

model_list:
  - model_name: langgraph-agent
    litellm_params:
      model: langgraph/agent
      api_base: http://localhost:2024

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature
✅ Test

Changes

@vercel
Copy link

vercel bot commented Dec 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
litellm Error Error Dec 10, 2025 8:28pm

@ishaan-jaff ishaan-jaff merged commit 5ee3216 into main Dec 10, 2025
8 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants