debug-inference
できること
このスキルは、AI が OpenShell のプロバイダーを経由したモデル呼び出しの失敗理由を調べる手助けをします。プロバイダー、許可されたエンドポイント、ローカルのモデルサーバーの場所を確認します。ホスト型またはローカルのモデルに AI アプリを接続する開発者向けです。
使う場面
- ✓OpenShell 内でアプリのモデル呼び出しが失敗し、原因がわからないとき。
- ✓Ollama や vLLM などのローカルモデルを OpenShell サンドボックスに接続したいとき。
- ✓古いマネージド推論エンドポイントから、プロバイダーのネイティブなエンドポイントへ移行しているとき。
スキルのリンク
https://github.com/NVIDIA/OpenShell/blob/main/skills/debug-inference/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のアプリが、OpenShell の中からローカルの Ollama モデルに接続できません。原因を調べてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AI はゲートウェイとサンドボックスを確認し、プロバイダーとそのプロファイルを調べ、エンドポイントに到達できるか、許可されているかをテストします。そのうえで、考えられる原因を説明します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Debug Inference
Diagnose inference as ordinary provider-authorized network traffic. OpenShell no longer supplies a managed inference route, rewrites request shapes, or selects a model. The application calls the provider's native endpoint and owns its base URL, model, request format, and timeout.
Use installed openshell --help output as the authority for command syntax.
Refer to the published provider management guide
and provider profile guide
for current behavior.
Diagnostic Workflow
1. Confirm Gateway and Sandbox Context
openshell status
openshell gateway info
openshell sandbox get <sandbox>
For a host-local model server, host.openshell.internal identifies the machine
running the gateway. It does not identify the operator's laptop when the gateway
is remote. A server listening only on 127.0.0.1 may also be unreachable from a
container; bind it to an address reachable from the gateway runtime.
2. Inspect the Provider and Its Profile
openshell provider get <provider>
openshell profile export <profile-id> -o yaml
Check that the profile:
- Names the exact endpoint host, port, and protocol the client calls.
- Allows the client binary.
- Declares the credential key and intended authentication style.
- Uses narrow HTTP rules when the provider should expose only part of an API.
For a custom or self-hosted OpenAI-compatible endpoint, import an endpoint-bearing profile. A base URL stored only in provider configuration does not authorize a new endpoint.
openshell profile lint -f ./provider-profile.yaml
openshell profile import -f ./provider-profile.yaml
openshell provider create --name <provider> --type <profile-id>
Add the required --credential KEY or --credential KEY=VALUE arguments shown
by the profile. Never broaden endpoint policy merely to silence a credential
binding error.
3. Confirm Attachment
openshell sandbox provider list <sandbox>
openshell sandbox provider attach <sandbox> <provider> --wait --timeout 30
Save the change's receipt_id and use openshell sandbox provider status <sandbox> <provider> --receipt <receipt-id> --wait --timeout 30 to check when it takes effect. Success confirms that the sandbox applied the credentials, policy, and environment for new processes. If the result is pending, failed, withheld, or superseded, inspect its reason before launching the client.
Launch the client after the attachment wait succeeds so it receives the updated environment:
openshell sandbox exec <sandbox> -- <client-command>
After updating an ordinary static provider, wait for that change and launch a new client. An existing process keeps its revision-scoped reference; readiness does not make the old reference resolve the replacement value. Diagnose managed-refresh credentials according to their own lifecycle.
Keep credentials and issued references out of diagnostic output. Acknowledged detach revokes future credential resolution and removes the reference from future process environments. Requests already forwarded may still finish:
openshell sandbox provider detach <sandbox> <provider> --wait --timeout 30
4. Verify Native Client Configuration
The application must use the real upstream contract:
- Native provider base URL, not the retired managed virtual endpoint.
- Real model ID, not a placeholder that OpenShell used to rewrite.
- Native OpenAI, Anthropic, Vertex, or other provider request shape.
- Application-owned timeout and retry settings.
- The credential environment variable declared by the attached profile.
Probe the exact endpoint from a newly launched sandbox process. Start with a non-secret discovery endpoint when the provider offers one, then send a minimal inference request using the provider's documented API shape.
5. Interpret Common Failures
| Symptom | Likely cause | Fix |
|---|---|---|
credential_placeholder_in_request_body |
A body reference is invalid/revoked, or classification metadata is unavailable | Check the controlled denial reason; remove the reference from conversation history or restore provider access. Do not enable body credential rewriting or bypass flags to send tool output. Unknown literals and valid issued placeholders pass unchanged, including the model provider’s own placeholder. Header resolution |
よくある質問
OpenShell はモデルを選んだり、リクエストを書き換えたりしますか?
いいえ。アプリはプロバイダーのネイティブなエンドポイントを呼び出し、自分でモデル、ベース URL、リクエストの形式を設定します。
ローカルのモデルサーバーにも対応しますか?
はい。ゲートウェイのマシン上で動く Ollama、vLLM、LM Studio などのサーバーに対応します。
モデルサーバーが localhost でしか待ち受けていない場合はどうなりますか?
そのようなサーバーは、コンテナからは到達できない可能性があるため、ゲートウェイが到達できるアドレスで待ち受けるべきだと、スキルは注意しています。
詳細
作者による元の説明
Debug inference clients that use an attached provider and its native endpoint, including hosted APIs and host-local Ollama, vLLM, SGLang, TRT-LLM, LM Studio, or NIM. Use for provider attachment, endpoint policy, credential substitution, topology, and migration from the removed managed inference endpoint. Trigger keywords - debug inference, managed inference endpoint, local inference, ollama, lm studio, vllm, sglang, trtllm, NIM, inference failing, model server unreachable, credential_endpoint_mismatch, host.openshell.internal.
repo: NVIDIA/OpenShell
人気
- GitHubのスター
- 21k
- ランキング
- #10365
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
create-github-issue
21kgh コマンドラインツールとプロジェクトのテンプレートを使い、エージェントがバグ、機能要望、タスクの GitHub Issue を作成するのを支援します。
create-github-pr
21k作業の準備ができているかを確認したうえで、gh ツールを使って、あなたのブランチから GitHub のプルリクエストを作成します。
review-github-pr
21kGitHub のプルリクエストを読み、その変更点、重要な設計上の判断、注目すべきコードを平易な言葉で説明する方法を、エージェントに教えます。
watch-github-actions
21kエージェントが GitHub Actions の実行状況を確認し、終わるまで追跡して、失敗したジョブのログを読めるようにします。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。