Skip to main content
skill CX Codex GP ChatGPT official · OpenAI

dynamo-router-starter — Codex skill: what it does, how to install

Configures Dynamo router modes, switches traffic to KV cache, and runs an endpoint smoke check to confirm model inference.

Install into Codex · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openai/plugins --skill dynamo-router-starter -a codex
Open on GitHub

What dynamo-router-starter does

This skill brings up or patches Dynamo router modes both locally via CLI and on Kubernetes clusters. It handles multiple routing strategies: round-robin, kv, least-loaded, device-aware-weighted, direct, and random. On Kubernetes, it modifies frontend deployment environment variables to apply the desired DYN_ROUTER_MODE.

Health verification relies on scripts/check_router_health.py. The script polls /v1/models and sends a single /v1/chat/completions request. If backend workers do not emit KV cache events, KV mode hangs on pending events unless switched to approximate mode via DYN_ROUTER_USE_KV_EVENTS=false.

Prerequisites include Python 3.10+ with the dynamo package, network access to the frontend port, and at least one worker with a loaded model. A single smoke request does not measure throughput; latency and capacity evaluations require dedicated benchmarking tools.

What it helps with

  • Start a local Dynamo frontend under a selected routing mode
  • Patch Kubernetes frontend deployments to use KV-aware routing
  • Run smoke checks against /v1/models and completion endpoints
  • Switch KV routing into approximate mode when workers omit cache events

Example prompts for the agent

  • Start a local Dynamo frontend in round-robin mode on port 8000 and verify health
  • Patch the Kubernetes frontend service to use KV routing and run a smoke test
  • Configure approximate KV routing without waiting for worker cache events

How to install dynamo-router-starter

1Skills CLI (Vercel)

npx skills add openai/plugins --skill dynamo-router-starter -a codex

2Manually: put the files in place

.agents/skills/dynamo-router-starter/SKILL.md

For all projects use ~/.agents/skills/

Step by step, with commands for each platform: Codex skills: how to install, where they live, how to call them

Questions about dynamo-router-starter

How to install dynamo-router-starter in Codex?

Run npx skills add openai/plugins --skill dynamo-router-starter -a codex. This places the skill file at .agents/skills/dynamo-router-starter/SKILL.md.

What does dynamo-router-starter do?

It configures Dynamo router balancing modes and validates inference availability using the scripts/check_router_health.py smoke test script.

Why does KV mode hang during smoke testing?

KV mode hangs when backend workers do not broadcast cache events. Set the environment variable DYN_ROUTER_USE_KV_EVENTS to false to enable approximate mode.

Source text

SKILL.md · Apache-2.0
---
name: dynamo-router-starter
description: Start or patch Dynamo router modes and run router endpoint smoke checks. Use for round-robin, KV-aware, least-loaded, or device-aware routing setup; use recipe-runner for recipe deployment and troubleshoot for failure diagnosis.
license: Apache-2.0
metadata:
  author: Dan Gil <[email protected]>
  tags:
    - dynamo
    - router
    - smoke-test
    - bring-up
---

# Dynamo Router Starter

<!--
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: CC-BY-4.0
-->

## Purpose

Make Dynamo routing feel easy by getting a baseline router mode running, enabling
KV-aware routing when appropriate, and proving the endpoint works. Keep the user
focused on exact commands and success signals, not router internals.

## Prerequisites

- Python 3.10+ with the `dynamo` package importable (`python3 -m dynamo.frontend --help` works).
- For Kubernetes runs: `kubectl` configured with access to the target namespace and a deployed Dynamo recipe.
- Network reachability to the frontend service (port-forward or direct).
- A model already loaded into at least one worker (`/v1/models` returns at least one entry).

## Required Inputs

Collect or infer:

- local Python/CLI or Kubernetes recipe path
- desired mode: `round-robin`, `kv`, `least-loaded`, `device-aware-weighted`, `direct`, or `random`
- frontend port or Kubernetes frontend service
- whether workers publish KV events; if not, use approximate KV mode
- model name for smoke requests, if `/v1/models` cannot discover it

## Instructions

### 1. Establish A Baseline

For local bring-up with already registered workers:

```bash
python3 -m dynamo.frontend --router-mode round-robin --http-port 8000
```

For Kubernetes, inspect the selected recipe `deploy.yaml` and locate the
frontend service. If the recipe is not already deployed, use
`dynamo-recipe-runner` first.

### 2. Enable KV Routing

For local frontend:

```bash
python3 -m dynamo.frontend --router-mode kv --http-port 8000
```

For Kubernetes, patch only the frontend service env:

```yaml
envs:
  - name: DYN_ROUTER_MODE
    value: kv
```

If backend workers are not publishing KV cache events, set approximate mode
instead of leaving the router waiting for events:

```yaml
envs:
  - name: DYN_ROUTER_USE_KV_EVENTS
    value: "false"
```

### 3. Smoke Test

After port-forwarding the frontend service or starting local frontend, run:

```bash
python3 scripts/check_router_health.py \
  --base-url http://127.0.0.1:8000
```

This must verify `/v1/models` and, when a model is discoverable, one
`/v1/chat/completions` request.

### 4. Compare Modes Carefully

When comparing round-robin vs KV routing:

- use the same model, workers, prompt set, concurrency, and sampling settings
- send repeated-prefix prompts if demonstrating KV reuse
- label the result as a smoke comparison unless enough benchmark samples were collected
- do not claim throughput improvement from a single chat request

If the endpoint is unhealthy or workers are missing, switch to
`dynamo-troubleshoot`.

## Available Scripts

| Script | Purpose | Arguments |
|---|---|---|
| `scripts/check_router_health.py` | Smoke-test `/v1/models` and one chat completion against a Dynamo frontend | `--base-url`, `--retries`, `--timeout` |

Invoke via the agentskills.io `run_script()` protocol:

```python
run_script("scripts/check_router_health.py", args=["--base-url", "http://127.0.0.1:8000"])
```

## Examples

Local KV-routed frontend on port 8000, then smoke-test it:

```bash
python3 -m dynamo.frontend --router-mode kv --http-port 8000 &
python3 scripts/check_router_health.py --base-url http://127.0.0.1:8000
```

Kubernetes-deployed frontend reachable via port-forward:

```bash
kubectl port-forward svc/qwen-vllm-disagg-frontend 8000:8000 -n dynamo-demo &
python3 scripts/check_router_health.py --base-url http://127.0.0.1:8000 --retries 3
```

Equivalent through the agent protocol:

```python
run_script("scripts/check_router_health.py", args=["--base-url", "http://127.0.0.1:8000", "--retries", "3"])
```

## Output Contract

Return:

- mode selected and why
- local command or Kubernetes env patch
- frontend service or URL
- smoke-test result
- any limitation, such as approximate KV mode or missing worker KV events
- next command to run for a fuller comparison

## Limitations

- Smoke test is one chat completion; it is not a benchmark. Use `dynamo-benchmark` for throughput/latency numbers.
- KV-aware mode without worker KV-event publication degrades to approximate mode; this skill flags but does not fix the underlying worker config.
- Mode comparisons require matched workloads; cross-mode latency claims need separate benchmark runs.

## Troubleshooting

| Symptom | Likely cause | Next step |
|---|---|---|
| `/v1/models` returns empty list | No worker registered with the frontend | Verify worker pods are Ready; confirm they connect to the same etcd/NATS |
| Smoke chat request times out | Frontend up, workers not serving | Switch to `dynamo-troubleshoot`; inspect worker logs |
| KV mode hangs | Workers do not publish KV cache events | Set `DYN_ROUTER_USE_KV_EVENTS=false` (approximate mode) |
| Connection refused on port-forward | Port-forward dropped or wrong service name | Re-run port-forward; verify the frontend service name matches the recipe |

## Benchmark

See `BENCHMARK.md` for the NVCARPS-EVAL performance report (auto-generated by the NVSkills CI pipeline). To refresh, re-run `/nvskills-ci` on an upstream PR touching this skill.

## References

- Read `references/router-modes.md` for the compact mode/env map.
- Use `scripts/check_router_health.py` for endpoint smoke tests.

© Dan Gil · Apache-2.0 · openai/plugins

Similar skills

All skills for AI and ML →

From the same set596

The whole set →
physical-ai-infrastructure-setup-and-resilient-scaling This skill guides setup and checks for NVIDIA Physical AI infrastructure used in synthetic data generation on MicroK8s or Azure AKS. It covers OSMO deployment and infrastructure recovery too. CX Codex GP ChatGPT ★ 7,604repo stars omniverse-usd-performance-tuning An orchestrator for slow loading, memory pressure and low FPS in USD scenes. It walks the agent through profiling phases up to a final report. CX Codex GP ChatGPT ★ 7,604repo stars omniverse-realtime-viewer Orchestrates OpenUSD real-time viewer apps using NVIDIA Omniverse. Selects implementation recipes and enforces core rendering rules. CX Codex GP ChatGPT ★ 7,604repo stars omniverse-cad-to-simready Coordinates the path from a CAD model or other source asset to SimReady USD and packaging. Use it to handle conversion, material and physics assignment, validation, and conformance checks. CX Codex GP ChatGPT ★ 7,604repo stars dynamo-interconnect-check Checks whether the NIXL/UCX/NCCL transport in a Dynamo deployment actually works. Run it before you trust disaggregated serving numbers. CX Codex GP ChatGPT ★ 7,604repo stars cuopt-user-rules A skill that tells the agent how to help with NVIDIA cuOpt: routing, LP, MILP, QP, installation and the server. CX Codex GP ChatGPT ★ 7,604repo stars aiq-research Routes deep research queries to an active NVIDIA AI-Q Blueprint server and retrieves structured reports with citations. Useful when automating multi-step topic research. CX Codex GP ChatGPT ★ 7,604repo stars aiq-deploy This skill deploys and checks NVIDIA AI-Q Blueprint infrastructure, then helps with troubleshooting or shutdown when the service needs attention. CX Codex GP ChatGPT ★ 7,604repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor