nexi-model-router

Diagnoses model selection and intent routing decisions in the Nexi assistant engine.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/aicodepro/ai-agent-nexi --skill nexi-model-router-aicodepro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nexi-model-router
Source: https://github.com/aicodepro/ai-agent-nexi/tree/main/.opencode/skills/nexi-model-router
Command: npx skills add https://github.com/aicodepro/ai-agent-nexi --skill nexi-model-router-aicodepro

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debugging why Nexi picked the wrong model or misrouted a user utterance is hard because routing logic is split across a capability registry, a tiered intent pipeline, and three separate tool lists that fail silently when inconsistent. ## Core Features & Use Cases - Model selection debugging: Explains how select_model(task) in engine/model_registry.py picks models from measured capability rows, env overrides, and available API keys, and how which_model(slots) / why(task) expose live decisions and rejection reasons. - Intent routing analysis: Documents the tiered pipeline in engine/groq_intent_router_v2.py (semantic e5 embedding match, small model, large model, compound ReAct planner handoff, keyword fallback). - Known-quirk catalog: Captures Groq-specific behaviors such as gpt-oss rejecting response_format=json_object, harmony token leakage breaking multi-turn tool loops, and llama-3.3-70b returning null tool arguments. - Use Case: When a new tool silently routes to chat instead of executing, use this Skill to discover the 3-list trap — the tool must be registered in _TOOLS, ALLOWED_INTENTS, and TOOL_INTENTS in engine/tool_registry.py — and run tests/test_tool_intent_consistency.py to verify. ## Quick Start Ask the assistant to explain why Nexi used the wrong model for a task or why a specific utterance was misrouted to chat.

Frequently Asked Questions about nexi-model-router

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug why the wrong LLM model was selected for a task?

Call which_model(slots) or why(task) in engine/model_registry.py to see the live decision and rejection reasons instead of grepping env vars. The selector picks the highest-ranked model whose capabilities match the task and whose provider API key is set.

Why does a new tool silently route to chat instead of executing?

The tool must be registered in all three lists in engine/tool_registry.py: _TOOLS, ALLOWED_INTENTS, and TOOL_INTENTS. Missing any one causes a silent failure with no exception. Run tests/test_tool_intent_consistency.py after editing any of the three lists.

Why does Groq return HTTP 400 for json_object response format?

The gpt-oss-20b and gpt-oss-120b models reject response_format=json_object. GROQ_INTENT_MODEL must resolve to a model whose capability row has json_object set to True, such as scout.

Why do tool calls break on the second turn of a ReAct loop?

gpt-oss models leak harmony channel tokens into tool names on multi-turn tool loops, so their multiturn_tools capability is False. REACT_MODEL must be a model with multiturn_tools True, such as llama-3.3-70b.

Should I hardcode a model name to fix a routing bug?

No. Never inline a literal model string as a fix. Instead adjust the model's capability row in the MODELS registry or set the task's env override so selection stays data-driven.