# CNLLM - Chinese LLM Adapter

A Python toolkit giving a single OpenAI-compatible interface across Chinese large language models, so frameworks such as LangChain and LlamaIndex can call them without model-specific adapter code.

CNLLM is a Python toolkit providing a unified, OpenAI-API-compatible interface layer over a range of Chinese large language models, letting them be used inside mainstream frameworks such as LangChain, LlamaIndex, AutoGen, Haystack, and DeepEval without writing separate adapter and parsing code for each vendor. It validates every parameter against each vendor's own native parameter set and reports back explicitly when a parameter is unsupported, with a configurable option to drop unrecognized parameters instead of failing.

Streaming responses can be monitored through a live representation showing the response's lifecycle, with incremental fields accumulated automatically and made available through simple attribute access. A batch mode runs many requests with independent per-request configuration, live progress statistics, a configurable failure policy, and adaptive scheduling that adjusts concurrency and request rate based on observed throughput and rate-limit responses. Supported providers include DeepSeek, Moonshot's Kimi, ByteDance's Doubao, MiniMax, Zhipu's GLM, and Alibaba's Qwen.

Website: https://github.com/kanchengw/cnllm
