Key takeaways

Most China LLM APIs expose OpenAI-compatible chat endpoints—point LangChain ChatOpenAI (or equivalents) at the vendor base URL and model ID. Do not assume tool-calling parity; test function schemas per vendor (/en/articles/china-llm-agent-tool-calling-2026). SDK overview: /en/articles/china-llm-openai-compatible-sdk-2026.

Minimal wiring

Set api_key + base_url from the vendor console → pick exact model string → enable streaming if UX needs it → wrap retries with timeout budgets (/en/articles/china-llm-latency-failover-2026). For RAG, separate embedding vs chat clients (/en/articles/china-llm-embedding-rag-setup-2026).

Vendor notes

DeepSeek: strong default for coding agents. Qwen/DashScope: check region endpoints. GLM: enterprise tool stability. Kimi: long-context chains—watch token spend. Always verify live model names; Swift Horse does not mirror private catalogs.

Next steps on Swift Horse

Overseas access /en/articles/access-china-llm-api-overseas → JSON /en/articles/china-llm-json-structured-output-2026 → optimization /en/articles/china-llm-optimization-guide-2026.

FAQ

Do Chinese LLMs work with LangChain?

Usually yes via OpenAI-compatible chat APIs—confirm base URL and model IDs per vendor.

LangChain or LlamaIndex?

Either works with compatible clients—pick by your RAG/agent patterns, not the China LLM brand.

Why do tool calls fail?

Schema and vendor support differ—see /en/articles/china-llm-agent-tool-calling-2026.

Is this official LangChain documentation?

No—independent Swift Horse integration guide.