-
Notifications
You must be signed in to change notification settings - Fork 169
Model Providers
weego edited this page May 28, 2026
·
1 revision
LightAgent uses OpenAI-compatible chat completion APIs. Most providers work by setting:
modelapi_keybase_url
agent = LightAgent(
model="gpt-4.1",
api_key="your_openai_api_key",
base_url="https://api.openai.com/v1",
)agent = LightAgent(
model="openai/gpt-4.1",
api_key="your_openrouter_api_key",
base_url="https://openrouter.ai/api/v1",
)OpenRouter model names are provider-routed names such as openai/gpt-4.1 or another model listed in your OpenRouter account.
Use the provider's OpenAI-compatible endpoint:
agent = LightAgent(
model="provider_model_name",
api_key="provider_api_key",
base_url="https://provider.example.com/v1",
)Check whether the selected model supports tool calling if you use Tools, MCP, or Skills.
Start vLLM with its OpenAI-compatible server:
vllm serve Qwen/Qwen2.5-7B-Instruct --host 0.0.0.0 --port 8000agent = LightAgent(
model="Qwen/Qwen2.5-7B-Instruct",
api_key="local",
base_url="http://localhost:8000/v1",
)Run llama.cpp in server mode:
llama-server -m ./models/model.gguf --host 0.0.0.0 --port 8080agent = LightAgent(
model="local-model",
api_key="local",
base_url="http://localhost:8080/v1",
)Recent Ollama versions expose an OpenAI-compatible API:
agent = LightAgent(
model="llama3.1",
api_key="ollama",
base_url="http://localhost:11434/v1",
)-
[LA-401]: check API key, account status, or auth headers. -
[LA-404]: checkbase_urland exact model name. -
[LA-413]: reduce history, prompt size, or tool output. -
[LA-429]: reduce concurrency or use provider-side quota controls. - Tool calls missing: confirm the provider and model support OpenAI-compatible function calling.
More detail: Model Provider Configuration.
LightAgent Wiki - see the repository, releases, and issues.
- Home
- Quick Start
- Core Concepts
- API Reference
- Examples Cookbook
- Migration Guide
- Tools
- Tool Generator
- Memory
- MCP
- Skills
- LightFlow
- Tree of Thought
- Self-Learning
- Multi-Agent
- Tracing and Debugging
- Langfuse Observability
- Model Providers
- browser-use Integration
- Testing and CI
- Deployment Guide
- Architecture
- Security
- Known Limitations
- FAQ
- FAQ 中文
- Roadmap
- Release Process
- Contributing