docs: document OpenRouter and Hive LLM provider setup (#6644)

* docs(llm): document OpenRouter and Hive LLM setup

* docs(contributing): add OpenRouter and Hive LLM guidance
This commit is contained in:
Sundaram Kumar Jha
2026-03-22 07:42:44 +05:30
committed by GitHub
parent 07b82a51f6
commit a2cd96a1a7
6 changed files with 87 additions and 8 deletions
+53 -1
View File
@@ -41,6 +41,12 @@ export ANTHROPIC_API_KEY="sk-ant-..."
# OpenAI (optional, for GPT models via LiteLLM)
export OPENAI_API_KEY="sk-..."
# OpenRouter (optional, for OpenRouter-hosted models)
export OPENROUTER_API_KEY="..."
# Hive LLM (optional, for Hive-managed models)
export HIVE_API_KEY="..."
# Cerebras (optional, used by output cleaner and some nodes)
export CEREBRAS_API_KEY="..."
@@ -50,6 +56,49 @@ export GROQ_API_KEY="..."
The framework supports 100+ LLM providers through [LiteLLM](https://docs.litellm.ai/docs/providers). Set the corresponding environment variable for your provider.
### Provider Examples
OpenRouter:
```json
{
"llm": {
"provider": "openrouter",
"model": "x-ai/grok-4.20-beta",
"max_tokens": 8192,
"api_key_env_var": "OPENROUTER_API_KEY",
"api_base": "https://openrouter.ai/api/v1"
}
}
```
Notes:
- Set `provider` to `openrouter`
- Use the raw OpenRouter model ID in `model`, for example `x-ai/grok-4.20-beta`
- `api_base` should be `https://openrouter.ai/api/v1`
- If you paste a model that already starts with `openrouter/`, Hive tolerates and normalizes it
Hive LLM:
```json
{
"llm": {
"provider": "hive",
"model": "queen",
"max_tokens": 32768,
"api_key_env_var": "HIVE_API_KEY",
"api_base": "https://api.adenhq.com"
}
}
```
Notes:
- Set `provider` to `hive`
- Common Hive model values are `queen`, `kimi-2.5`, and `GLM-5`
- Hive LLM requests use the Hive endpoint at `https://api.adenhq.com`
### Search & Tools (optional)
```bash
@@ -191,13 +240,16 @@ cd core && uv pip install -e .
Ensure the environment variable is set in your current shell session:
```bash
echo $ANTHROPIC_API_KEY # Should print your key
echo $ANTHROPIC_API_KEY # Or echo $OPENROUTER_API_KEY / echo $HIVE_API_KEY
```
On Windows PowerShell:
```powershell
$env:ANTHROPIC_API_KEY = "sk-ant-..."
# Or:
$env:OPENROUTER_API_KEY = "your-openrouter-key"
$env:HIVE_API_KEY = "your-hive-key"
```
### Agent not found
+12 -3
View File
@@ -74,8 +74,9 @@ The setup script performs these actions:
1. Checks Python version (3.11+)
2. Installs `framework` package from `/core` (editable mode)
3. Installs `aden_tools` package from `/tools` (editable mode)
4. Fixes package compatibility (upgrades openai for litellm)
5. Verifies all installations
4. Prompts for a default LLM provider, including Hive LLM and OpenRouter
5. Fixes package compatibility (upgrades openai for litellm)
6. Verifies all installations
### API Keys (Optional)
@@ -85,6 +86,8 @@ For running agents with real LLMs:
# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
export ANTHROPIC_API_KEY="your-key-here"
export OPENAI_API_KEY="your-key-here" # Optional
export OPENROUTER_API_KEY="your-key-here" # Optional, for OpenRouter models
export HIVE_API_KEY="your-key-here" # Optional, for Hive LLM
export BRAVE_SEARCH_API_KEY="your-key-here" # Optional, for web search tool
```
@@ -92,8 +95,12 @@ Get API keys:
- **Anthropic**: [console.anthropic.com](https://console.anthropic.com/)
- **OpenAI**: [platform.openai.com](https://platform.openai.com/)
- **OpenRouter**: [openrouter.ai/keys](https://openrouter.ai/keys)
- **Hive LLM**: [Hive Discord](https://discord.com/invite/hQdU7QDkgR)
- **Brave Search**: [brave.com/search/api](https://brave.com/search/api/)
For OpenRouter and Hive LLM configuration snippets, see [configuration.md](./configuration.md).
### Install Claude Code Skills
```bash
@@ -177,7 +184,7 @@ hive/ # Repository root
│ │ ├── builder/ # Agent builder utilities
│ │ ├── credentials/ # Credential management
│ │ ├── graph/ # GraphExecutor - executes node graphs
│ │ ├── llm/ # LLM provider integrations (Anthropic, OpenAI, etc.)
│ │ ├── llm/ # LLM provider integrations (Anthropic, OpenAI, OpenRouter, Hive, etc.)
│ │ ├── mcp/ # MCP server integration
│ │ ├── runner/ # AgentRunner - loads and runs agents
| | ├── observability/ # Structured logging - human-readable and machine-parseable tracing
@@ -633,6 +640,8 @@ def my_custom_tool(param1: str, param2: int) -> Dict[str, Any]:
# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
export ANTHROPIC_API_KEY="your-key-here"
export OPENAI_API_KEY="your-key-here"
export OPENROUTER_API_KEY="your-key-here"
export HIVE_API_KEY="your-key-here"
export BRAVE_SEARCH_API_KEY="your-key-here"
# Or create .env file (not committed to git)
+4
View File
@@ -515,8 +515,12 @@ Add to `.vscode/settings.json`:
```bash
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENROUTER_API_KEY="your-openrouter-key" # Optional
export HIVE_API_KEY="your-hive-key" # Optional
```
Quickstart also supports selecting OpenRouter and Hive LLM interactively. See [configuration.md](./configuration.md) for the full configuration examples.
### Optional Configuration
```bash
+8
View File
@@ -166,6 +166,8 @@ For running agents with real LLMs:
# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
export ANTHROPIC_API_KEY="your-key-here"
export OPENAI_API_KEY="your-key-here" # Optional
export OPENROUTER_API_KEY="your-key-here" # Optional, for OpenRouter models
export HIVE_API_KEY="your-key-here" # Optional, for Hive LLM
export BRAVE_SEARCH_API_KEY="your-key-here" # Optional, for web search
```
@@ -173,8 +175,12 @@ Get your API keys:
- **Anthropic**: [console.anthropic.com](https://console.anthropic.com/)
- **OpenAI**: [platform.openai.com](https://platform.openai.com/)
- **OpenRouter**: [openrouter.ai/keys](https://openrouter.ai/keys)
- **Hive LLM**: [Hive Discord](https://discord.com/invite/hQdU7QDkgR)
- **Brave Search**: [brave.com/search/api](https://brave.com/search/api/)
Quickstart can configure OpenRouter and Hive LLM for you interactively. See [configuration.md](./configuration.md) for the full configuration examples.
## Testing Your Agent
```bash
@@ -218,6 +224,8 @@ uv pip install -e .
```bash
# Verify API key is set
echo $ANTHROPIC_API_KEY
echo $OPENROUTER_API_KEY
echo $HIVE_API_KEY
```