For coding agents
This site publishes machine-readable documentation for coding agents alongside the human pages.
Machine-readable docs
Section titled “Machine-readable docs”/llms.txtis the compact index and is linked in the site header./llms-full.txtcontains the assembled documentation body for retrieval when the index is not enough.
Start with llms.txt, follow only the pages relevant to the task, and prefer canonical reference pages over copied command tables in prompts or project notes.
Discover models at runtime
Section titled “Discover models at runtime”The installed CLI and running server are authoritative for the active build:
claude-code-proxy modelsclaude-code-proxy models --fullcurl -s http://127.0.0.1:18765/v1/modelsUse the compact CLI output for a provider overview. Use --full when a Cursor model alias must be resolved. Do not maintain an exhaustive model list in agent memory because provider catalogs and account access change.
Minimal environment contract
Section titled “Minimal environment contract”To launch Claude Code through a running local proxy, set:
ANTHROPIC_BASE_URL=http://127.0.0.1:18765ANTHROPIC_AUTH_TOKEN=unusedANTHROPIC_MODEL=<routable-model-id>ANTHROPIC_SMALL_FAST_MODEL=<routable-model-id>CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK=1ANTHROPIC_* and CLAUDE_CODE_* configure the Claude Code client. CCP_*, PORT, and config.json configure the proxy process. Keep those layers separate when editing settings or debugging a launch.
Authoritative references
Section titled “Authoritative references”Use these pages for exact operational details:
- Command reference for CLI syntax and exit behavior
- Configuration for keys, environment variables, precedence, and defaults
- Files and storage for credential, log, error, and traffic paths
- HTTP API for local route contracts
- Compatibility and limitations for translation boundaries
- Changelog for released behavior
For a source checkout, implementation and tests are the final authority when documentation and behavior disagree. Relevant surfaces include src/main.rs, src/config.rs, src/registry.rs, src/server.rs, src/paths.rs, src/providers/, and integration tests under tests/.
Diagnostics workflow
Section titled “Diagnostics workflow”- Check liveness with
curl http://127.0.0.1:18765/healthz. - Check the selected model with
claude-code-proxy models. - Check provider credentials with
<provider> auth status. - Read the monitor request detail and structured
proxy.log. - Read the redacted payload under
errors/for a failed response. - Enable verbose logging or traffic capture only for a focused reproduction.
A source checkout includes ./scripts/debug-proxy, which starts an isolated proxy on a random loopback port and prints every artifact path.
Handle sensitive data safely
Section titled “Handle sensitive data safely”- Never print, commit, upload, or paste provider credentials, refresh tokens, session cookies, or account identifiers.
- Treat Claude prompts, source excerpts, tool output, file paths, and traffic captures as user data.
- Share the smallest redacted error payload that explains the failure.
- Ask before sending diagnostics to an external service.
- Keep traffic capture disabled outside a focused debugging session.
- Delete sensitive temporary captures after the investigation.
- Do not bind the unauthenticated listener beyond loopback without an access control layer.
Structured logs redact known credential fields, but verbose values and prompts can still contain secrets supplied by the user or tools. Inspect before sharing.