# model routing

> A multi-tier routing system that manages local and remote models across diverse GPU hardware and scheduled renders.

model routing is a free AI agent skill on Agensi by NZ1Labs, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [NZ1Labs](https://www.agensi.io/creators/nz1labs)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Uses: 3
- Version: 1.0
- Last updated: 2026-09-17
- Security: scan passed (2026-09-17); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/model-routing
- Tags: ai-agents, llm-ops, automation, ollama, gpu-optimization

## About this skill

### The problem

Running advanced agentic workflows across local hardware often leads to VRAM fragmentation, context window collisions, and unmanaged API costs. Developers struggle to maintain high-performance local coding models while simultaneously running GPU-intensive tasks like ComfyUI renders.

### What it does

- Routes tasks through a three-tier system: Local Routine (27B), Agentic Coder (9B), and Remote Premium fallback.
- Enforces render-exclusive windows to prevent OOM errors during scheduled GPU tasks.
- Satisfies Hermes 64K context floors by managing baked Modelfile parameters across different node specs.
- Offloads lightweight internal operations (triage, title gen, approvals) to auxiliary nodes to save primary GPU compute.

### Frameworks & tools

Ollama, OpenRouter, Hermes, RTX 3060 Dual-GPU (24GB), Windows WSL, and Python-based agent environments.

### Why this beats prompting it yourself

Manual model selection fails during concurrent agent runs and hardware-heavy render cycles. This skill handles the complex logic of VRAM fitting, port-forwarding across network nodes, and specific OpenAI-compatible header requirements for local LLMs.

### Use cases

- Executing repo-level bug fixes on a secondary node while the main GPU renders high-resolution video.
- Maintaining a 192K context window for routine health checks without burning through paid API tokens.
- Scaling auxiliary agent functions to low-spec hardware (4GB VRAM) using specific context bakes.
- Falling back to high-reasoning remote models only when local tiers reach saturation.

### Known limitations

Ollama /v1 endpoints ignore runtime context parameters, requiring context floors to be baked directly into Modelfiles. SSH access to auxiliary nodes is restricted to HTTP API calls only.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the model routing skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this system prevent my GPU from crashing during heavy renders?

This skill manages GPU VRAM by routing tasks across local and remote tiers, preventing 'Out of Memory' (OOM) errors by scheduling renders and LLM tasks so they don't compete for the same hardware resources.

### What specific hardware and software frameworks are required to use this routing system?

The skill is designed for environments using Ollama, OpenRouter, and Python-based agent frameworks, specifically optimized for multi-GPU setups (like dual RTX 3060s) and auxiliary nodes.

### How does the skill handle context window requirements if Ollama's API has limitations?

Since Ollama ignores runtime context parameters via API, this skill uses a specialized method of 'baking' context floors directly into Modelfiles to ensure your 64K or 192K requirements are always met.

### What assets are included in the purchase?

You will receive the routing logic configuration, pre-configured Modelfile templates for different VRAM tiers, and the integration scripts needed to connect your primary node to auxiliary GPU hardware.

### Can I customize when the system falls back to paid remote models like GPT-4 or Claude?

Yes, the system is built to prioritize local hardware first (27B and 9B tiers) and will only trigger a remote API fallback via OpenRouter when local nodes reach full saturation or fail to meet reasoning requirements.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
