Provider Overview
Human uses a vtable-driven provider interface. All AI model backends implement hu_provider_t and are selected by name at runtime.
Provider vtable interface
Section titled “Provider vtable interface”Each provider implements:
| Method | Description |
|---|---|
chat | Non-streaming chat completion |
chat_with_tools | Chat with tool calls (optional) |
stream_chat | Streaming completion (optional) |
supports_native_tools | Whether provider uses OpenAI-style tool schema |
get_name | Provider identifier |
deinit | Cleanup |
Optional methods: warmup, supports_streaming, supports_vision.
Provider types
Section titled “Provider types”Native providers (core)
Section titled “Native providers (core)”These have dedicated implementations with format-specific handling:
| Name | Type | Default base URL |
|---|---|---|
| openai | Native | https://api.openai.com/v1 |
| anthropic | Native | https://api.anthropic.com |
| gemini | Native | https://generativelanguage.googleapis.com |
| Native | (same as gemini) | |
| ollama | Native | http://localhost:11434 |
| openrouter | Native | https://openrouter.ai/api/v1 |
| compatible | Native | (configurable) |
| claude_cli | Native | (Claude CLI) |
| codex_cli | Native | (Codex CLI) |
| openai-codex | Native | (OpenAI Codex) |
Compatible providers (OpenAI chat API)
Section titled “Compatible providers (OpenAI chat API)”These use the compatible backend with preset base URLs:
Local providers
Section titled “Local providers”| Name | Default base URL |
|---|---|
| lmstudio, lm-studio | http://localhost:1234/v1 |
| vllm | http://localhost:8000/v1 |
| llamacpp, llama.cpp | http://localhost:8080/v1 |
| sglang | http://localhost:30000/v1 |
| osaurus | http://localhost:1337/v1 |
| litellm | http://localhost:4000 |
No API key is required for local providers.
Selecting a provider
Section titled “Selecting a provider”Set default_provider in config or pass --provider on the CLI:
./human agent --provider ollama --model llama3For compatible providers, add a providers entry with your API key:
{ "providers": [{ "name": "groq", "api_key": "gsk_..." }], "default_provider": "groq"}