skillfed

langchain-baseten

Integration package connecting Baseten and LangChain

langchain-baseten v0.2.3 116.1K downloads/30d#12,218 on PyPI0
Permissive license MIT Active released

What it is and what it does

langchain-baseten bridges Baseten's hosted language models and embeddings into LangChain's ecosystem. It provides two main classes: ChatBaseten for conversational models and BasetenEmbeddings for vector generation. Both support Baseten's Model APIs (using model slugs on shared infrastructure) and dedicated deployment URLs for custom or performance-optimized models.

The package handles authentication via API key and environment variables, manages HTTP communication with Baseten's endpoints, and wraps responses in LangChain's standard message and embedding formats. It depends on langchain-core for the base interfaces, langchain-openai for OpenAI-compatible protocol handling, and baseten-performance-client for optimized embedding operations.

Use it for:

  • Build a chatbot using Baseten-hosted models (e.g., GLM-5.2) within a LangChain application without custom API code.
  • Generate embeddings for semantic search or RAG pipelines using Baseten's dedicated embedding deployments.
  • Switch between shared Model APIs and custom dedicated deployments without changing application code.
  • Integrate Baseten models into LangChain chains and agents that already use other LangChain providers.
  • Use environment variables to manage Baseten credentials across development and production deployments.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Integrates Baseten's chat models and embeddings into LangChain applications, enabling use of Baseten-hosted models through LangChain's standard interfaces.

Yes. The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and provides straightforward integration for developers already using LangChain who want to use Baseten models. Install friction is low and Python version support is current. Suitable for production use if you have a Baseten account and models deployed.

Install

langchain-baseten on PyPI

pip

pip install langchain-baseten

uv

uv add langchain-baseten

poetry

poetry add langchain-baseten

Installing langchain-baseten

Before you install

Low friction installation with three runtime dependencies. Package is actively maintained with a recent release (18 days old) and no known vulnerabilities.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects.

Quickstart

pip install langchain-baseten

from langchain_baseten import ChatBaseten

model = ChatBaseten(
    model="zai-org/GLM-5.2",
    api_key="your-api-key"
)
response = model.invoke("Hello, how are you?")

Requires Python 3.10 or later and a valid Baseten API key (set via BASETEN_API_KEY environment variable or passed directly).

Verify before relying

  • Whether Baseten's Performance Client dependency introduces any system-level requirements or compilation steps.
  • Specific latency or throughput characteristics when using Model APIs vs. dedicated deployment URLs.
  • Whether custom models deployed to Baseten require additional configuration beyond model URL and API key.

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0.0,>=3.10.0)
Install friction low — pure-Python wheel
Runtime dependencies 3 — baseten-performance-client, langchain-core, langchain-openai
Maintenance actively maintained — 18 days since the last release
Last repo commit
First released
Downloads 116,100/month — #12,218 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: langchain_baseten-0.2.3-py3-none-any.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Artificial Intelligence

Tags

langchain baseten integrationbaseten chat models langchainbaseten embeddings apilangchain model providerbaseten llm integrationlangchain ai model connector
langchain-integrationbaseten-modelsllm-provider

More Artificial Intelligence packages

litellm

LiteLLM provides a unified Python interface to…

permissive · top 100 on PyPI

huggingface-hub

Client library and CLI tool for downloading,…

permissive · top 100 on PyPI

langchain

LangChain provides a framework for building…

permissive · top 1,000 on PyPI

hf-xet

hf-xet provides chunk-based deduplication and…

permissive · top 1,000 on PyPI

tokenizers

Tokenizers converts raw text into token…

permissive · top 1,000 on PyPI

transformers

Transformers provides a unified framework for…

permissive · top 1,000 on PyPI

baseten-performance-client

A high-performance Python HTTP client for…

unclear · top 15,000 on PyPI

langchain-sambanova

Connects LangChain applications to SambaNova's…

permissive · top 15,000 on PyPI

unique-toolkit

Provides high-level abstractions and services…

unclear · top 15,000 on PyPI

langchain-elasticsearch

Integrates Elasticsearch with LangChain to…

permissive · top 15,000 on PyPI

llama-index-embeddings-langchain

Integrates Langchain embedding models with…

permissive · top 15,000 on PyPI

langchain-together

Connects LangChain applications to Together…

permissive · top 15,000 on PyPI

langchain-cohere

Connects LangChain applications to Cohere's…

permissive · top 5,000 on PyPI

langchain-google-genai

Integrates Google's Gemini AI models (chat,…

permissive · top 5,000 on PyPI

langchain-openai

Provides LangChain integrations for OpenAI's…

permissive · top 1,000 on PyPI

langchain-ibm

Integrates IBM watsonx.ai models with…

permissive · top 15,000 on PyPI