# Model Router and Telemetry for Codex

> Route Codex tasks to configurable model profiles based on complexity, with separate workflows for tests, implementation, and operations.

Model Router and Telemetry for Codex is a free AI agent skill on Agensi by Alessandro S. Jr, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Alessandro S. Jr](https://www.agensi.io/creators/alesjr)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-12-01
- Security: scan passed (2026-12-01); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/model-router-and-telemetry-for-codex
- Tags: ai-agents, llm-ops, cost-optimization, python, tdd

## About this skill

### Choose the right model for each task

Model Router helps Codex divide work into focused tasks and select a model and reasoning effort for each one using a configurable local policy.

Use an economy profile for routine work and reserve stronger profiles for tasks that need deeper reasoning. You control the model order and profiles in `routing.toml`.

#### What it does

- Breaks mixed requests into tasks with clear responsibilities.
- Routes each task by type and complexity using your configured policy.
- Keeps test authoring, test execution, implementation, and operations in separate scopes.
- Supports sequential test-first workflows when implementation and new tests are requested.
- Records the requested model, reasoning effort, and acceptance criteria for each task.
- Provides a Python CLI to validate contracts and use Codex CLI as an alternative execution path.

#### Optional local telemetry

Enable local telemetry when you want to inspect available usage records. The optional offline dashboard shows known token totals, reported models, and coverage. Collection is disabled by default.

## Requires

- Python
- Codex or a compatible agent
- Optional: Codex CLI
- Optional: tmux

Native routing requires a client that supports explicit model and reasoning-effort selection. Codex CLI is required for the optional CLI execution path. The interactive status bar requires tmux. Local telemetry is optional and disabled by default.

## Known limitations

No parallel dispatch on shared files. CLI cannot inherit parent history for 'all' context mode. Requires routing.toml. No automatic escalation to expensive models on failure.

## 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 Router and Telemetry for Codex 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 skill help manage my API budget?

This skill implements a cost-aware routing protocol that breaks down complex requests into granular units like test authoring or implementation. It then assigns each unit to economy, standard, or strong model profiles to prevent expensive models from being used for low-effort tasks.

### What files or configurations do I need to provide for this to work?

You need a local routing.toml configuration file located alongside the skill to define your specific complexity mappings. For certain advanced dispatch modes, you may also need a local Python CLI environment with appropriate permissions.

### Can this skill help with my development workflow?

The skill enforces a strict sequential Test-Driven Development (TDD) lifecycle where test writing, RED execution, and functional implementation are handled separately. It ensures that testing and routine operations are always routed to economy profiles, regardless of the project's urgency.

### What kind of output does the skill produce for the subagents?

It generates detailed JSON contracts for each task including model selection, reasoning effort, and explicit acceptance criteria. Depending on your choice, it also produces specific context modes that control how much session history is shared with the subagent.

### Are there any specific limitations I should know about?

The skill does not support parallel dispatch on shared files and cannot retrieve parent session history for the all context mode when using the CLI executor. It also requires the user to explicitly define tasks in the routing.toml file.

### How do I tell my agent to start using this routing logic?

You can ask your agent to plan or execute a task using model selection by cost. Specifically, you can direct it to route work according to your routing.toml file for workflows involving TDD or specification-driven development.

---

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.
