Multi-Model Router Edge Function — Devops
DevOpsRoute AI requests to different models based on task type. Configure routing rules, set fallbacks, compare responses across models side-by-side.
Edge function Multi-Model Router Route AI requests to different models based on task type. Configure routing rules, set fallbacks, compare responses across models side-by-side.. Deployed on Cloudflare Workers — zero cold starts, globally distributed. Mount it via your Aerostack workspace to call it from any AI agent.
npx aerostack add aerostack/multi-model-router Use with AI Assistants
MCPConnect Claude, Cursor, or any MCP-compatible client — then call this function by slug
① Add MCP Server
Add this once — access all Aerostack functions from your AI tool.
{
"mcpServers": {
"aerostack": {
"url": "https://mcp.aerostack.dev",
"type": "http"
}
}
} ② Call this function
Ask your AI to use the call_function tool with this slug:
call_function({
slug: "multi-model-router",
args: {}
}) Multi-Model Router
Intelligent model routing — send requests to the best model for each task. Configure rules and compare models.
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /chat | Auto-routed chat (picks best model) |
| POST | /compare | Same prompt to multiple models |
| POST | /rules | Set routing rules |
| GET | /rules | Get current rules |
| GET | /models | List available models |
| GET | /health | Status check |
Metadata
Tags
Build and publish your own functions
Write a TypeScript function, deploy it to the edge, and share it with thousands of developers — in minutes.
More Devops Functions
Browse Devops Functions →Semantic Search
by @aerostack
Natural language search over any content. Ingest documents, search by meaning not keywords. Returns ranked results with relevance scores.
Knowledge Base + MCP
by @aerostack
RAG-powered knowledge base with built-in MCP server. Connect to Claude Desktop, Cursor, or any MCP client. Ingest docs, chat, and search via MCP tools.
OpenAI Chat Proxy
by @aerostack
A zero-config proxy for OpenAI /v1/chat/completions with streaming passthrough and CORS support. Replace the API key placeholder and deploy instantly — free public URL included.
Frequently asked questions
What does the Multi-Model Router function do? +
Multi-Model Router is a serverless edge function for devops automation written in cloudflare-worker. Deploy it to Cloudflare Workers via your Aerostack workspace.
How do I deploy the Multi-Model Router function? +
Install the Aerostack CLI and run: ```bash aerostack deploy function @aerostack/multi-model-router ``` It will be live on Cloudflare Workers in seconds.
What runtime does Multi-Model Router use? +
Multi-Model Router runs on cloudflare-worker on the Cloudflare Workers edge runtime — zero cold starts, globally distributed.
Can I customise the Multi-Model Router function? +
Yes. Fork the function from your Aerostack dashboard, modify the source, and redeploy. All changes are version-controlled.