docs: surface Claude Code setup #392
By default, all runs share the same config directory and overwrite the same agentic-settings.json. Concurrent invocations (or multiple terminals using different gateways) can clobber each other’s settings/state. Consider making the default config dir unique per run (e.g., using mktemp -d) or unique per gateway/model (e.g., hash of $gateway_url + $model), while still allowing AGENTIC_CLAUDE_CONFIG_DIR to force a stable location.
Passing the bearer token via curl -H ... puts the secret in the process command line, which can be visible to other local users via process inspection tools. A safer approach is to pass secrets via a restricted-permissions temp config file (curl --config <file>) or another mechanism that avoids exposing the token in argv.
The script assumes the gateway model catalog is always in the OpenAI-style {object, data:[...]} shape. In this repo’s test fixtures, another /v1/models response shape ({models:[...]}) also exists, so this will be brittle across gateway/server versions. Consider normalizing the response in one jq expression (e.g., selecting from .data // .models) and then using that normalized list for both model selection/validation and context window lookup.
By default, all runs share the same config directory and overwrite the same agentic-settings.json. Concurrent invocations (or multiple terminals using different gateways) can clobber each other’s settings/state. Consider making the default config dir unique per run (e.g., using mktemp -d) or unique per gateway/model (e.g., hash of $gateway_url + $model), while still allowing AGENTIC_CLAUDE_CONFIG_DIR to force a stable location.
The wrapper now hard-requires curl and jq (and exits with an explicit error if missing). It would be helpful to mention these prerequisites in this section so users don’t discover it only at runtime.
[!WARNING]
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add acopilot-code-review.ymlfile specifying one with theruns-onattribute. See the docs for more details.
<!-- ccr-overview-v2 -->
Copilot review overview
Review effort: Lite
Findings: 4 <picture><source media="(prefers-color-scheme: dark)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/medium-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/medium-v2-light.svg"><img src="https://github.githubassets.com/static/images/icons/copilot-code-review/medium-v2-light.png" alt="Medium severity" width="62" height="18" align="texttop"></picture> · 1 <picture><source media="(prefers-color-scheme: dark)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-light.svg"><img src="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-light.png" alt="Low severity" width="62" height="18" align="texttop"></picture>
<details open>
<summary><strong>Open (5)</strong></summary>
curl -H ... puts the secret in the process command line, which can…](#discussion_r4139385440) · New{object, data:[...]}…](#discussion_r4139385476) · Newcurl and jq (and exits with an explicit error if missing). It…](#discussion_r4139385538) · New</details>
<details>
<summary><strong>What changed in this PR</strong></summary>
This PR surfaces self-hosted Claude Code setup in the docs/navigation and updates the agentic-claude.sh wrapper to generate a Claude Code model-override settings file by discovering models from the gateway.
Changes:
scripts/agentic-claude.sh to query the gateway model catalog, write an isolated Claude settings override, and pass context/output token limits to Claude Code.| File | Description |
| ---- | ----------- |
| scripts/tests/agentic-launchers-test.sh | Updates test harness fakes/assertions for gateway model discovery, settings generation, and context token propagation. |
| scripts/agentic-claude.sh | Implements gateway /v1/models discovery, context window parsing, and writes agentic-settings.json used via --settings. |
| mkdocs.yaml | Adds a visible nav entry pointing to the Claude Code self-hosted setup section. |
| docs/guides/harness-cli-testing.md | Documents unrecognized_model behavior and how the wrapper/CLI generates a canonical-model override. |
| README.md | Links README users directly to the self-hosted Claude Code setup instructions. |
</details>
---
💡 <a href="/vllm-project/agentic-api/new/main?filename=.github/skills/code-review/SKILL.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add a code-review agent skill</a> or configure MCP servers for context-aware, tailored reviews. <a href="https://docs.github.com/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review?tool=webui#mcp-servers-and-agent-skills" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn more in the docs.</a>
addressed in 72a167b: the default is now a unique temporary configuration directory per invocation, removed after Claude exits. AGENTIC_CLAUDE_CONFIG_DIR remains the explicit persistent-state override.
addressed in 72a167b: the bearer header now lives in a mode-600 temporary curl config file, so the token is not placed in curl argv. The launcher test asserts the command line excludes the token.
addressed in 72a167b: model selection and context-window extraction now normalize .data // .models and use either id or slug. The launcher test covers both response shapes.
addressed in 72a167b: the default is now a unique temporary configuration directory per invocation, removed after Claude exits. AGENTIC_CLAUDE_CONFIG_DIR remains the explicit persistent-state override.
addressed in 72a167b: the guide now lists curl and jq as wrapper prerequisites.
Approved these changes.
maralbahari
franciscojavierarceo
Summary
unrecognized_modelfix and the supported attach commandTest Plan
bash -n scripts/agentic-claude.sh scripts/tests/agentic-launchers-test.shbash scripts/tests/agentic-launchers-test.shgit diff --check