Connect Models
Connect Models
Section titled “Connect Models”LingXiao supports multiple LLM providers, configured via environment variables or config files.
Supported Providers
Section titled “Supported Providers”- OpenAI (and compatible: DeepSeek, Qwen, Moonshot/Kimi, Gemini, Groq, SiliconFlow, etc.)
- Anthropic
Environment Variables
Section titled “Environment Variables”| Variable | Description |
|---|---|
LINGXIAO_LLM_PROVIDER | auto / openai / anthropic |
LINGXIAO_OPENAI_API_KEY | OpenAI or compatible API key |
LINGXIAO_OPENAI_BASE_URL | OpenAI compatible endpoint |
LINGXIAO_ANTHROPIC_API_KEY | Anthropic key |
LINGXIAO_ANTHROPIC_BASE_URL | Anthropic endpoint |
LINGXIAO_LEADER_MODEL | Leader model |
LINGXIAO_AGENT_MODEL | Worker model |
Config File
Section titled “Config File”Edit ~/.lingxiao/settings.json:
{ "llm": { "provider": "openai", "openai": { "apiKey": "sk-xxx", "baseUrl": "https://api.openai.com/v1" }, "leader_model": "gpt-4o", "agent_model": "gpt-4o-mini" }}Using Compatible Endpoints
Section titled “Using Compatible Endpoints”DeepSeek example:
export LINGXIAO_LLM_PROVIDER=openaiexport LINGXIAO_OPENAI_API_KEY=sk-xxxexport LINGXIAO_OPENAI_BASE_URL=https://api.deepseek.com/v1export LINGXIAO_LEADER_MODEL=deepseek-chatexport LINGXIAO_AGENT_MODEL=deepseek-chatAnthropic example:
export LINGXIAO_LLM_PROVIDER=anthropicexport LINGXIAO_ANTHROPIC_API_KEY=sk-ant-xxxexport LINGXIAO_LEADER_MODEL=claude-sonnet-4-20250514export LINGXIAO_AGENT_MODEL=claude-sonnet-4-20250514Local LLM Gateway
Section titled “Local LLM Gateway”LingXiao includes a local LLM gateway that serves as an OpenAI/Anthropic dual-format proxy:
- Virtual key management
- Per-key RPM/TPM/daily token budget rate limiting
- Request trace logging to
llm_gateway_requeststable - Default port: 62000
Enable in ~/.lingxiao/settings.json:
{ "llm_gateway": { "enabled": true, "provider": "openai", "model": "gpt-4o", "default_rpm": 60, "default_tpm": 200000, "trace_enabled": true }}Next Steps
Section titled “Next Steps”- First Run — Launch your first expert panel