LangChain DeepSeek

The official LangChain integration package for DeepSeek chat and reasoning models.

SDK
PyPI
v1.1.1
147,170 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
92 /100 Excellent
Development Activity 100
Maintenance 100
Community 76
Maturity 52
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
80 /100 Excellent
Architecture 82
Code Quality 84
Innovation 70
Learning Curve 84

LangChain DeepSeek is the official integration package connecting DeepSeek’s hosted models to the LangChain ecosystem. It exposes ChatDeepSeek, a chat-model class that speaks DeepSeek’s OpenAI-compatible API while surfacing LangChain features such as tool calling, structured output, streaming, and reasoning-content handling for DeepSeek’s reasoner models.

Built on langchain-core and langchain-openai, it lets you drop DeepSeek into any LangChain or LangGraph application with the same interface used for other providers, so chains, agents, and RAG pipelines can swap in DeepSeek models with minimal code change.

What You Get

  • A ChatDeepSeek chat-model class configured via the DEEPSEEK_API_KEY environment variable
  • Tool/function calling and structured (Pydantic) output support through the LangChain interface
  • Streaming and reasoning-content handling for DeepSeek’s reasoner models
  • Drop-in compatibility with LangChain and LangGraph chains, agents, and RAG pipelines

Common Use Cases

  • Using DeepSeek chat and reasoning models inside existing LangChain applications
  • Building tool-using agents or RAG pipelines backed by DeepSeek
  • Swapping DeepSeek in as a provider without rewriting LangChain chain code

Under The Hood

Architecture - The package is a thin partner integration living at libs/partners/deepseek in the LangChain monorepo. Its core is chat_models.py, where ChatDeepSeek subclasses BaseChatOpenAI from langchain-openai and points the OpenAI client at DeepSeek’s API base (api.deepseek.com/v1, plus a beta endpoint). A model-profile registry under data/_profiles supplies per-model capability metadata, and a model_validator wires the DEEPSEEK_API_KEY secret from the environment.

Tech Stack - Pure Python (>=3.10), built with hatchling, depending on langchain-core and langchain-openai (which brings the openai client and pydantic). Distributed on PyPI independently while versioned inside the monorepo; ships a py.typed marker.

Code Quality - By reusing BaseChatOpenAI the package keeps its own surface small and focused, overriding only DeepSeek-specific behavior such as reasoning-content parsing and endpoint selection. It has a tests directory and inherits the monorepo’s CI, linting, and release tooling.

API Design - Excellent ergonomics: install, set DEEPSEEK_API_KEY, and instantiate ChatDeepSeek(model=…) exactly like any other LangChain chat model. Tool calling, structured output, and streaming come through the shared runnable interface, so no DeepSeek-specific boilerplate is required.

Used by 80 apps in this directory

Python
67%
Apache 2.0

Agent Control

AI Agents

314

An open-source runtime control plane for AI agents — define safety guardrails once, apply them across agents built on LangChain, CrewAI, Google ADK, or AWS Strands, and update controls without redeploying code.

View details
74
Repo Health
71
Technical
67
Dependency
Built with
Python 67%
TypeScript 32%
Updated 4 days ago
Python
100%
Apache 2.0

Agno

AI Development · Automation · Devops

42,358

Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.

View details
93
Repo Health
87
Technical
66
Dependency
Built with
Python 100%
Updated 4 days ago
Python
92%
Apache 2.0

ART

AI Development

10,779

Give your LLM agents on-the-job training—ART lets you apply GRPO reinforcement learning to any multi-step agentic workflow with minimal code changes.

View details
85
Repo Health
82
Technical
73
Dependency
Built with
Python 92%
Updated 5 days ago
Python
92%
Apache 2.0

ART

AI Development

10,779

Give your LLM agents on-the-job training—ART lets you apply GRPO reinforcement learning to any multi-step agentic workflow with minimal code changes.

View details
85
Repo Health
82
Technical
73
Dependency
Built with
Python 92%
Updated 5 days ago
Python
62%
MIT

AutoGen

AI Development · Automation

61,194

Build autonomous and human-in-the-loop multi-agent AI systems with a layered, event-driven Python and .NET framework pioneered at Microsoft Research.

View details
56
Repo Health
78
Technical
73
Dependency
Built with
Python 62%
C# 25%
TypeScript 12%
Updated 5 months ago
TypeScript
72%
MIT

Claude Context

AI Code Assistants · Mcp

12,573

An MCP server and VS Code extension by Zilliz that turns your entire codebase into semantically searchable context for Claude Code, Cursor, and Gemini CLI, using vector embeddings and Merkle-tree change detection.

View details
46
Repo Health
71
Technical
71
Dependency
Built with
TypeScript 72%
Python 13%
JavaScript 11%
Updated 2 months ago
TypeScript
72%
MIT

Claude Context

AI Code Assistants · Mcp

12,573

An MCP server and VS Code extension by Zilliz that turns your entire codebase into semantically searchable context for Claude Code, Cursor, and Gemini CLI, using vector embeddings and Merkle-tree change detection.

View details
46
Repo Health
71
Technical
71
Dependency
Built with
TypeScript 72%
Python 13%
JavaScript 11%
Updated 2 months ago
TypeScript
72%
MIT

Claude Context

AI Code Assistants · Mcp

12,573

An MCP server and VS Code extension by Zilliz that turns your entire codebase into semantically searchable context for Claude Code, Cursor, and Gemini CLI, using vector embeddings and Merkle-tree change detection.

View details
46
Repo Health
71
Technical
71
Dependency
Built with
TypeScript 72%
Python 13%
JavaScript 11%
Updated 2 months ago
TypeScript
72%
MIT

Claude Context

AI Code Assistants · Mcp

12,573

An MCP server and VS Code extension by Zilliz that turns your entire codebase into semantically searchable context for Claude Code, Cursor, and Gemini CLI, using vector embeddings and Merkle-tree change detection.

View details
46
Repo Health
71
Technical
71
Dependency
Built with
TypeScript 72%
Python 13%
JavaScript 11%
Updated 2 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers