Refract Guides · Connect a target

LiteLLM Proxy Targets in Refract

LiteLLM gives every provider an OpenAI-compatible facade. Pointing Refract at the proxy tests the same endpoint, keys, and fallbacks your app uses.

Target string

Put the LiteLLM model_name alias after openai_compat: and the proxy URL in --base-url.

openai_compat:claude-opus-5-5 --base-url http://localhost:4000/v1

Configure credentials

# litellm_config.yaml maps the alias claude-opus-5-5 to anthropic/claude-opus-5-5
litellm --config ./litellm_config.yaml --port 4000
export OPENAI_API_KEY=sk-...   # the proxy key, not the upstream provider key

Run a scan

refract scan --target openai_compat:claude-opus-5-5 --base-url http://localhost:4000/v1 --pack ./packs/api-secret-leak.jsonl --db ./runs.sqlite --sarif refract-litellm.sarif

Keep secrets out of evidence

The proxy holds provider credentials; Refract only needs the proxy key. Refract does not log that key or any upstream provider secret.

Verify and gate

refract gate --scan scan-a1b2c3d4 --db ./runs.sqlite --max-fn 0 --max-fp-rate 0.05 --min-mcc 0.70