Which LLM Providers Are Supported by the AI Agent Book? Complete Registry Guide
The AI Agent Book supports 10 canonical LLM providers including OpenAI, Google Gemini, DeepSeek, Moonshot (Kimi), and Alibaba Cloud (DashScope), with additional aliases like "moonshot" and "qwen" that resolve to their respective backends.
The AI Agent Book is an open-source framework that standardizes interactions with large language models through a unified provider registry. Located in agentbook/providers/registry.py, this registry serves as the single source of truth for all supported LLM backends, mapping canonical names and user-friendly aliases to endpoint configurations and authentication requirements.
The Provider Registry Architecture
The framework decouples provider identity from connection details using a two-layer system defined in agentbook/providers/registry.py.
Canonical Providers and Aliases
The PROVIDERS dictionary defines canonical provider names—the internal identifiers used by the resolution engine—alongside their default endpoints, models, and required environment variables. To improve CLI ergonomics, the _ALIASES mapping permits alternative names. For example, "moonshot" resolves to the "kimi" provider, while "qwen" and "bailian" both map to "dashscope".
Complete List of Supported LLM Providers
The following providers are registered in the current release:
Cloud Providers (China)
dashscope— Alibaba Cloud Bailian service. Default endpoint:https://dashscope.aliyuncs.com/compatible-mode/v1. Default model:qwen3.7-plus. Key:DASHSCOPE_API_KEY. Aliases:qwen,bailian.doubao— Volces ARK platform. Default endpoint:https://ark.cn-beijing.volces.com/api/v3. Default model:doubao-seed-1-6-thinking-250715. Key:ARK_API_KEY. Alias:ark.kimi— Moonshot AI. Default endpoint:https://api.moonshot.cn/v1. Default model:kimi-k3. Keys:MOONSHOT_API_KEYorKIMI_API_KEY. Alias:moonshot.deepseek— DeepSeek API. Default endpoint:https://api.deepseek.com. Default model:deepseek-v4-flash. Key:DEEPSEEK_API_KEY.zhipu— Zhipu AI (BigModel). Default endpoint:https://open.bigmodel.cn/api/paas/v4. Default model:glm-5.2. Key:ZHIPU_API_KEY.siliconflow— SiliconFlow hosted API. Default endpoint:https://api.siliconflow.cn/v1. Default model:Qwen/Qwen3.5-397B-A17B. Key:SILICONFLOW_API_KEY.
International Cloud Providers
openai— OpenAI API. Default endpoint:https://api.openai.com/v1. Default model:gpt-4o. Key:OPENAI_API_KEY.gemini— Google Gemini (OpenAI-compatible endpoint). Default endpoint:https://generativelanguage.googleapis.com/v1beta/openai. Default model:gemini-2.5-flash. Keys:GEMINI_API_KEYorGOOGLE_API_KEY. Alias:google.openrouter— OpenRouter aggregator. Default endpoint:https://openrouter.ai/api/v1. Model: configurable viaOPENROUTER_DEFAULT_MODEL. Key:OPENROUTER_API_KEY.
Local Deployment
ollama— Local Ollama server. Default endpoint:http://localhost:11434/v1. Default model:qwen3:8b. Key:OLLAMA_API_KEY(placeholder).
Querying Supported Providers Programmatically
The SUPPORTED_PROVIDERS tuple exposes every valid name recognized by the framework. Import the supported_providers() function from the registry module to retrieve the current list:
from agentbook.providers.registry import supported_providers
print(supported_providers())
# ('ark', 'dashscope', 'doubao', 'deepseek', 'gemini', 'google',
# 'kimi', 'moonshot', 'ollama', 'openai', 'openrouter',
# 'qwen', 'bailian', 'zhipu')
This set represents the union of keys from PROVIDERS and _ALIASES, ensuring that both canonical names and aliases are accepted by the CLI and library functions.
Resolving Provider Backends
The resolution logic in agentbook/providers/resolution.py converts a provider name into a Backend dataclass containing the final endpoint, model, and API key. Use resolve_backend() to instantiate connections:
from agentbook.providers.resolution import resolve_backend
# Resolve using canonical name
backend = resolve_backend("kimi")
print(backend.provider) # → "kimi"
print(backend.base_url) # → "https://api.moonshot.cn/v1"
print(backend.model) # → "kimi-k3"
Using Aliases in Resolution
Aliases resolve transparently to their canonical providers:
from agentbook.providers.resolution import resolve_backend
# "moonshot" is an alias for "kimi"
backend = resolve_backend("moonshot")
assert backend.provider == "kimi"
OpenRouter Fallback Behavior
When a provider's specific API key is absent but OPENROUTER_API_KEY is set, the framework automatically routes requests through OpenRouter:
import os
from agentbook.providers.resolution import resolve_backend
os.environ["OPENROUTER_API_KEY"] = "sk-or-..."
backend = resolve_backend("kimi") # No MOONSHOT_API_KEY set
print(backend.using_openrouter) # → True
print(backend.base_url) # → "https://openrouter.ai/api/v1"
Core Provider Files
| File | Role |
|---|---|
agentbook/providers/registry.py |
Central data table (PROVIDERS) and alias mapping (_ALIASES). |
agentbook/providers/models.py |
Dataclasses (Provider, Backend) describing metadata and resolved connections. |
agentbook/providers/resolution.py |
Resolution logic, key lookup, model mapping, and OpenRouter fallback. |
tests/test_providers.py |
Validation suite for provider keys and alias resolution. |
Summary
- The AI Agent Book supports 10 canonical LLM providers ranging from international APIs (OpenAI, Google, OpenRouter) to Chinese cloud services (Alibaba, Volces, Moonshot, DeepSeek, Zhipu, SiliconFlow) plus local Ollama deployment.
- Aliases expand usability by allowing intuitive names like "moonshot" or "qwen" instead of requiring canonical identifiers.
- Configuration is environment-driven; each provider requires a specific
*_API_KEYvariable defined in the registry. - OpenRouter provides automatic failover when native provider keys are unavailable.
- Programmatic discovery is available via
supported_providers()inagentbook/providers/registry.py.
Frequently Asked Questions
How do I check if my preferred provider is supported by the AI Agent Book?
Import the supported_providers() function from agentbook.providers.registry and call it to return a tuple of all valid names, including aliases. If your provider appears in this list, the framework can resolve its backend configuration.
What is the difference between a canonical provider name and an alias?
Canonical names are the official identifiers used internally (e.g., "kimi"), while aliases are convenience mappings (e.g., "moonshot") that resolve to the same backend. The PROVIDERS dictionary stores canonical data, and _ALIASES maps alternative names to these canonical keys.
Can I use the AI Agent Book with a local LLM server?
Yes. The ollama provider supports local inference via http://localhost:11434/v1. Set OLLAMA_API_KEY to any placeholder value (the field is required but unused), and specify your local model name when resolving the backend.
What happens if I don't have an API key for a specific provider?
The resolution logic in agentbook/providers/resolution.py checks for the provider-specific key first. If missing, it falls back to OpenRouter when OPENROUTER_API_KEY is present, setting using_openrouter=True and routing requests to https://openrouter.ai/api/v1 instead of the native endpoint.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →