Install
openclaw skills install @zenlee123/routerbase-model-routingChoose RouterBase model IDs and routing strategies for chat, image, video, audio, and embeddings workloads. Use when comparing providers, selecting GPT, Clau...
openclaw skills install @zenlee123/routerbase-model-routingUse routerbase to pick and document model choices behind one API key and one OpenAI-compatible integration surface. This skill helps agents turn workload requirements into a practical model shortlist, fallback plan, and validation checklist.
Read references/routerbase-models.md when exact catalog API calls, model examples, or selection heuristics are needed.
curl "https://routerbase.com/api/v1/models?task=chat" \
-H "Authorization: Bearer $ROUTERBASE_API_KEY"
curl "https://routerbase.com/api/v1/pricing" \
-H "Authorization: Bearer $ROUTERBASE_API_KEY"
response_format where the selected model supports JSON mode, and add schema validation in application code.Use explicit application-level fallback logic unless the user has configured RouterBase's smart routing in their account or upstream settings.
const modelPlan = [
"anthropic/claude-sonnet-4-6",
"google/gemini-2.5-flash",
];
for (const model of modelPlan) {
try {
return await client.chat.completions.create({ model, messages });
} catch (error) {
if (!isRetryableRouterBaseError(error)) throw error;
}
}
Classify retryable errors conservatively: transient network failures, timeouts, 429, and 5xx are reasonable candidates; auth errors, invalid model IDs, validation errors, and policy errors should not be retried blindly.
When recommending a routing plan, include:
Avoid pretending prices or supported model IDs are permanent. RouterBase's docs explicitly describe the model and pricing catalog as changing with upstream providers.