Install
openclaw skills install lynkrIntelligent LLM routing proxy with complexity-based tier routing, agentic workflow detection, and multi-provider failover. Drop-in replacement for direct provider APIs.
openclaw skills install lynkrLynkr routes AI coding requests to the best available model based on task complexity, cost, and provider health. It supports 12+ providers and works as an OpenAI-compatible proxy.
npm install -g lynkr
lynkr --port 8081
Then point your AI coding tool at http://localhost:8081/v1.
Set tier routing in your environment:
MODEL_PROVIDER=ollama
TIER_SIMPLE=ollama:qwen2.5-coder:7b
TIER_MEDIUM=openrouter:anthropic/claude-sonnet-4-20250514
TIER_COMPLEX=bedrock:anthropic.claude-sonnet-4-20250514-v1:0
TIER_REASONING=bedrock:anthropic.claude-sonnet-4-20250514-v1:0
When running under OpenClaw, enable model name rewriting so the actual provider and model appear in responses:
OPENCLAW_MODE=true
This replaces the generic model: "auto" in responses with the actual provider/model that handled the request (e.g., ollama/qwen2.5-coder:7b or bedrock/claude-sonnet-4).
Add to your openclaw.json:
{
"models": {
"providers": [
{
"name": "lynkr",
"type": "openai-compatible",
"base_url": "http://localhost:8081/v1",
"api_key": "any-value",
"models": ["auto"]
}
]
},
"agents": {
"defaults": {
"models": {
"primary": "lynkr/auto",
"fallback": "lynkr/auto"
}
}
}
}
X-Lynkr-*)X-Agent-Role header for multi-agent framework routing hintsEvery response includes routing metadata:
| Header | Description |
|---|---|
X-Lynkr-Provider | Provider that handled the request |
X-Lynkr-Model | Model used |
X-Lynkr-Tier | Complexity tier (SIMPLE/MEDIUM/COMPLEX/REASONING) |
X-Lynkr-Complexity-Score | Numeric score 0-100 |
X-Lynkr-Routing-Method | How the route was decided |
X-Lynkr-Cost-Optimized | Whether cost optimization changed the provider |