# Power LangChain with the best open-source models

Markdown version of https://kymaapi.com/for/langchain, for agents and crawlers. Same content as the HTML page.

- Generated: 2026-10-28T21:43:30.265Z
- HTML page: https://kymaapi.com/for/langchain
- Model catalog: https://kymaapi.com/models.md
- Pricing: https://kymaapi.com/pricing.md

For LangChain

Use Kyma as the model provider for your LangChain chains and agents. Just point ChatOpenAI at Kyma: active models, auto-failover, pay per use. No OpenAI or Anthropic key needed.

- [Create account](https://kymaapi.com/signup)
- [Setup Guide](https://kymaapi.com/for/langchain#setup)

### Best Open Models

Qwen 3.6 Plus for quality, Kimi K2.6 for agents and tools, DeepSeek V4 Flash for value: pick any model with a single string change in ChatOpenAI.

### Auto-Failover

For eligible failures, Kyma API tries another compatible route when available. Requests can still fail.

### OpenAI-Compatible

LangChain's ChatOpenAI class talks to any OpenAI-compatible endpoint. Set the base URL to Kyma and check feature support for your chosen model.

## Recommended Models for LangChain

Ranked by quality, context length, tool support, and cost for real LangChain workloads.

- 1 · Qwen 3.6 Plus · Vision input · Supports reasoning, tool use, vision input. Compare current prices and measured uptime on the model page. · `qwen-3.6-plus` · Reasoning
- 2 · Kimi K2.6 · Vision input · Supports reasoning, tool use, vision input. Compare current prices and measured uptime on the model page. · `kimi-k2.6` · Reasoning
- 3 · DeepSeek V4 Flash · Tool use · Supports reasoning, tool use. Compare current prices and measured uptime on the model page. · `deepseek-v4-flash` · Reasoning
- 4 · Gemma 4 31B · Vision input · Supports reasoning, tool use, vision input. Compare current prices and measured uptime on the model page. · `gemma-4-31b` · Reasoning
- 5 · Qwen 3 Coder · Tool use · Supports tool use. Compare current prices and measured uptime on the model page. · `qwen-3-coder` · Tool use

## Setup guide

1. [Create account](https://kymaapi.com/signup) → 2. Point ChatOpenAI at Kyma → 3. Run your LangChain app.

**Python (langchain-openai)**

```
# pip install langchain-openai
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="qwen-3.6-plus",
    base_url="https://kymaapi.com/v1",
    api_key="kyma-xxxxx",  # get yours at kymaapi.com
)

resp = llm.invoke("Explain LangChain in one sentence.")
print(resp.content)
```

**JavaScript / TypeScript (@langchain/openai)**

```
// npm install @langchain/openai
import { ChatOpenAI } from "@langchain/openai";

const llm = new ChatOpenAI({
  model: "qwen-3.6-plus",
  apiKey: "kyma-xxxxx", // get yours at kymaapi.com
  configuration: {
    baseURL: "https://kymaapi.com/v1",
  },
});

const resp = await llm.invoke("Explain LangChain in one sentence.");
console.log(resp.content);
```

## Pro Tips

Pick the right model for each chain to balance output quality and cost for your workload.

1

Use `kimi-k2.6` for LangChain agents and tool-calling workflows that need long context

2

Use `deepseek-v4-flash` for high-volume chains where value and a 1M context window matter

3

Use `gemma-4-31b` to cut costs on simple prompts and cheap vision tasks

## Build with LangChain and Kyma API

$0.50 signup credit for eligible free-tier models after email verification. No card required.

[Create account](https://kymaapi.com/signup)

## Explore more

Browse the recommended models for LangChain and compare them against the rest of the catalog.

- [Qwen 3.6 Plus](https://kymaapi.com/models/qwen-3.6-plus)
- [Kimi K2.6](https://kymaapi.com/models/kimi-k2.6)
- [DeepSeek V4 Flash](https://kymaapi.com/models/deepseek-v4-flash)
- [Gemma 4 31B](https://kymaapi.com/models/gemma-4-31b)
- [Qwen 3 Coder](https://kymaapi.com/models/qwen-3-coder)
- [Compare models](https://kymaapi.com/compare)
- [Live model rankings](https://kymaapi.com/rankings)
- [Pricing](https://kymaapi.com/pricing)
- [LangChain setup guide](https://docs.kymaapi.com/guides/langchain)
