Dynamoルーターのモードを起動・更新し、ルーターエンドポイント(接続先)の動作確認を実行します。 **次のような場合に使用:** - ラウンドロビン(順番に負荷を振り分ける方式)、KV対応、最小負荷、またはデバイス対応のルーティング設定 - recipe-runner を使用したレシピ配置 - 故障診断のためのトラブルシューティング
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.
ベースラインのルーターモードを起動し、適切な場合にはKV対応ルーティングを有効にし、エンドポイントの動作を確認することで、Dynamoルーティングをシンプルに扱えるようにします。ルーター内部の仕組みではなく、具体的なコマンドと成功の確認に集中できるようユーザーをサポートします。
dynamo パッケージがインポート可能であること(python3 -m dynamo.frontend --help が動作すること)kubectl、およびデプロイ済みのDynamoレシピ/v1/models が1件以上のエントリを返すこと)以下を収集または推論してください:
round-robin、kv、least-loaded、device-aware-weighted、direct、または random/v1/models でモデルを自動検出できない場合のモデル名(スモークテスト用)登録済みワーカーを使用したローカル起動の場合:
python3 -m dynamo.frontend --router-mode round-robin --http-port 8000
Kubernetes環境の場合は、選択したレシピの deploy.yaml を確認してフロントエンドサービスを特定してください。
レシピがまだデプロイされていない場合は、先に dynamo-recipe-runner を使用してください。
ローカルフロントエンドの場合:
python3 -m dynamo.frontend --router-mode kv --http-port 8000
Kubernetes環境の場合は、フロントエンドサービスの環境変数のみをパッチします:
envs:
- name: DYN_ROUTER_MODE
value: kv
バックエンドワーカーがKVキャッシュイベントを発行していない場合は、ルーターがイベント待機状態のままになるのを防ぐため、近似モードを設定してください:
envs:
- name: DYN_ROUTER_USE_KV_EVENTS
value: "false"
フロントエンドサービスをポートフォワードするか、ローカルフロントエンドを起動した後、以下を実行してください:
python3 scripts/check_router_health.py \
--base-url http://127.0.0.1:8000
このスクリプトは /v1/models を検証し、モデルが検出可能な場合は /v1/chat/completions へのリクエストを1件実行する必要があります。
round-robin とKVルーティングを比較する際は:
エンドポイントが正常でない場合やワーカーが不足している場合は、dynamo-troubleshoot に切り替えてください。
| スクリプト | 目的 | 引数 |
|---|---|---|
scripts/check_router_health.py |
Dynamoフロントエンドの /v1/models とチャット補完1件をスモークテストする |
--base-url、--retries、--timeout |
agentskills.io の run_script() プロトコル経由で呼び出します:
run_script("scripts/check_router_health.py", args=["--base-url", "http://127.0.0.1:8000"])
ポート8000でKVルーティングのローカルフロントエンドを起動し、スモークテストを実行する:
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デプロイ済みフロントエンド:
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
agentプロトコル経由での同等の操作:
run_script("scripts/check_router_health.py", args=["--base-url", "http://127.0.0.1:8000", "--retries", "3"])
以下を返してください:
dynamo-benchmark を使用してください。| 症状 | 想定される原因 | 次のステップ |
|---|---|---|
/v1/models が空のリストを返す |
フロントエンドにワーカーが登録されていない | ワーカーPodがReady状態であることを確認し、同一のetcd/NATSに接続しているかを検証する |
| スモークチャットリクエストがタイムアウトする | フロントエンドは起動しているが、ワーカーがリクエストを処理していない | dynamo-troubleshoot に切り替え、ワーカーのログを確認する |
| KVモードがハングする | ワーカーがKVキャッシュイベントを発行していない | DYN_ROUTER_USE_KV_EVENTS=false を設定する(近似モード) |
| ポートフォワードで接続が拒否される | ポートフォワードが切断されたか、サービス名が誤っている | ポートフォワードを再実行し、フロントエンドサービス名がレシピと一致しているか確認する |
NVSkills CIパイプラインが自動生成するNVCARPS-EVALパフォーマンスレポートについては、BENCHMARK.md を参照してください。
更新するには、このスキルに変更を加えた上流のPRで /nvskills-ci を再実行してください。
references/router-modes.md を参照してください。scripts/check_router_health.py を使用してください。<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: CC-BY-4.0 -->
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.
dynamo package importable (python3 -m dynamo.frontend --help works).kubectl configured with access to the target namespace and a deployed Dynamo recipe./v1/models returns at least one entry).Collect or infer:
round-robin, kv, least-loaded, device-aware-weighted, direct, or random/v1/models cannot discover itFor local bring-up with already registered workers:
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.
For local frontend:
python3 -m dynamo.frontend --router-mode kv --http-port 8000
For Kubernetes, patch only the frontend service env:
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:
envs:
- name: DYN_ROUTER_USE_KV_EVENTS
value: "false"
After port-forwarding the frontend service or starting local frontend, run:
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.
When comparing round-robin vs KV routing:
If the endpoint is unhealthy or workers are missing, switch to
dynamo-troubleshoot.
| 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:
run_script("scripts/check_router_health.py", args=["--base-url", "http://127.0.0.1:8000"])
Local KV-routed frontend on port 8000, then smoke-test it:
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:
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:
run_script("scripts/check_router_health.py", args=["--base-url", "http://127.0.0.1:8000", "--retries", "3"])
Return:
dynamo-benchmark for throughput/latency numbers.| 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 |
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/router-modes.md for the compact mode/env map.scripts/check_router_health.py for endpoint smoke tests.原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。