--- id: langchain-baseten version: "0.2.3" license: MIT license_treatment: permissive maintenance: active --- # langchain-baseten — Integration package connecting Baseten and LangChain License: permissive · Maintenance: active · Downloads: 116.1K/mo ## 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 above — 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 pip install langchain-baseten uv add langchain-baseten 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_current - Install friction: low - Maintenance: active - Downloads: 116.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags langchain baseten integration, baseten chat models langchain, baseten embeddings api, langchain model provider, baseten llm integration, langchain ai model connector, langchain-integration, baseten-models, llm-provider [View on SkillFed](https://skillfed.io/packages/langchain-baseten) · [View on PyPI](https://pypi.org/project/langchain-baseten/)