Drop in SpendGuard in 30 seconds (base URL tools, one config line)
If your agent stack already uses an OpenAI-compatible client, SpendGuard
drops in by changing one base URL. Start the SpendGuard egress proxy at
http://localhost:9000/v1, point your tool at it, and every model call
flows through SpendGuard’s pre-call budget gate and KMS-signed audit
chain before it ever hits the upstream provider. No SDK install, no code
change, no rebuild. Find your tool in the matrix below, copy the line
your tool’s docs specify, and the next call is governed.
How Pattern 2 works
Section titled “How Pattern 2 works”Each of these tools already supports a custom OpenAI-compatible base URL. SpendGuard runs an OpenAI-compatible endpoint of its own; setting the env var (or one config line) routes the tool’s traffic through SpendGuard before it reaches OpenAI / Anthropic / Bedrock. Pattern 2 contrasts with Pattern 1 (in-process SDK middleware, used for the adapter integrations) and Pattern 3 (egress proxy + CA install, used for closed BYOK CLIs like Claude Code and Codex).
Start the proxy locally (30 seconds)
Section titled “Start the proxy locally (30 seconds)”git clone https://github.com/m24927605/agentic-spendguard.gitcd agentic-spendguardexport OPENAI_API_KEY=sk-...make demo-up DEMO_MODE=proxyThe egress proxy binds on http://localhost:9000/v1. Point any of the
tools below at that URL.
Find your tool
Section titled “Find your tool”The matrix lists the exact env var name or config key each tool’s
maintainer docs specify. The Verified column distinguishes rows we
have run end-to-end against the egress proxy (Live), rows whose
configuration matches the maintainer’s published docs but we have not
ourselves smoke-tested (Spec), and rows the tool’s own changelog
documents natively without SpendGuard-specific testing (Vendor-native).
Use the quick filter below to narrow by setting type (env var, config file, or admin UI), search by tool name, and jump straight to the per-tool section.
Showing all 14 tools.
| Tool | Vendor | Setting type | What to set | Verified | Jump |
|---|---|---|---|---|---|
| LiteLLM (proxy mode) | LiteLLM | Env var | export OPENAI_API_BASE=http://localhost:9000/v1 | Spec | Jump ↓ |
| Aider | Aider | Env var | export OPENAI_API_BASE=http://localhost:9000/v1 | Spec | Jump ↓ |
| Continue | Continue | Config file | apiBase: http://localhost:9000/v1 | Spec | Jump ↓ |
| Cline / Roo Code (BYOK) | Cline | Admin UI | OpenAI Compatible provider, Base URL http://localhost:9000/v1 | Spec | Jump ↓ |
| OpenHands (BYOK) | All Hands AI | Admin UI | Settings → LLM → Custom Provider → Endpoint | Spec | Jump ↓ |
| Goose | Block | Env var | export OPENAI_HOST=http://localhost:9000 | Spec | Jump ↓ |
| Zed AI | Zed | Config file | api_url = "http://localhost:9000/v1" | Vendor-native | Jump ↓ |
| GitHub Copilot CLI (BYOK) | GitHub | Env var | export COPILOT_PROVIDER_BASE_URL=http://localhost:9000/v1 | Vendor-native | Jump ↓ |
| Tabnine Enterprise | Tabnine | Admin UI | Admin → AI Models → Connect Custom LLM → Endpoint URL | Spec | Jump ↓ |
| AnythingLLM | Mintplex Labs | Admin UI | Admin → LLM Configuration → Custom OpenAI-compatible base URL | Spec | Jump ↓ |
| LobeChat | LobeHub | Admin UI | Settings → Language Model → Custom Base URL | Spec | Jump ↓ |
| Cody self-hosted | Sourcegraph | Config file | cody.completions.endpoint in site-config.json | Spec | Jump ↓ |
| Augment (BYOK) | Augment | Admin UI | Settings → BYOK → LLM Custom Endpoint | Spec | Jump ↓ |
| Dify | Dify | Config file | Custom Model Provider plugin manifest: base_url | Spec | Jump ↓ |
No tools match your filter. Try clearing the search or selecting All.
The static matrix below carries the upstream-source links and the row numbering the rest of this page references; the picker above is a quick-filter layer over the same data.
| # | Tool | Provider field | Exact value | Upstream source | Verified | Recipe |
|---|------|----------------|-------------|-----------------|----------|--------|
| 1 | LiteLLM (proxy mode) | Env var | OPENAI_API_BASE=http://localhost:9000/v1 | docs.litellm.ai | Spec | Open ↗ |
| 2 | Aider | Env var | OPENAI_API_BASE=http://localhost:9000/v1 | aider.chat | Spec | Open ↗ |
| 3 | Continue | YAML apiBase | apiBase: http://localhost:9000/v1 | docs.continue.dev | Spec | Open ↗ |
| 4 | Cline / Roo Code (BYOK) | UI field | Custom OpenAI provider, Base URL http://localhost:9000/v1 | docs.cline.bot | Spec | Open ↗ |
| 5 | OpenHands (BYOK) | UI field | LLM custom endpoint http://localhost:9000/v1 | docs.all-hands.dev | Spec | Open ↗ |
| 6 | Goose | Env var | OPENAI_HOST=http://localhost:9000 | block.github.io/goose | Spec | Open ↗ |
| 7 | Zed AI | TOML key | api_url = "http://localhost:9000/v1" | zed.dev | Vendor-native | Open ↗ |
| 8 | GitHub Copilot CLI (BYOK) | Env var | COPILOT_PROVIDER_BASE_URL=http://localhost:9000/v1 | docs.github.com | Vendor-native | Open ↗ |
| 9 | Tabnine Enterprise | Admin UI | BYO LLM endpoint http://localhost:9000/v1 | docs.tabnine.com | Spec | Open ↗ |
| 10 | AnythingLLM | Admin UI | Generic OpenAI provider, Base URL http://localhost:9000/v1 | docs.anythingllm.com | Live | Open ↗ |
| 11 | LobeChat | Env var | OPENAI_PROXY_URL=http://localhost:9000/v1 | lobehub.com | Live | Open ↗ |
| 12 | Cody self-hosted Enterprise | Site config | Sourcegraph relay endpoint http://localhost:9000/v1 | sourcegraph.com | Spec | Open ↗ |
| 13 | Augment (BYOK) | UI field | LLM custom endpoint http://localhost:9000/v1 | docs.augmentcode.com | Spec | Open ↗ |
| 14 | Dify | Plugin manifest | Custom Model Provider plugin → base URL http://localhost:9000/v1 | docs.dify.ai | Spec | Open ↗ |
| 15 | CrewAI Studio (via LiteLLM) | Indirect | Use row 1 — point CrewAI at the LiteLLM proxy, point LiteLLM at SpendGuard | docs.litellm.ai | Spec | Open ↗ |
| 16 | OpenClaw | Config file | models.providers.spendguard.baseUrl: http://localhost:9000/v1 with api: "openai-completions" | github.com/openclaw/openclaw | Live | Open ↗ |
Already running SpendGuard in production? Swap http://localhost:9000/v1
for your SpendGuard egress proxy URL — a Kubernetes Service URL, a
sidecar URL inside the pod, or a hosted SpendGuard URL. The relative
path is always /v1. See the Helm deployment guide
for the production hostname pattern.
Per-tool setup
Section titled “Per-tool setup”Each section below is the H3 anchor the matrix above links to. Copy the code block, set it in your shell or config, and the next call from that tool routes through SpendGuard. The full walkthrough — verification steps and known gotchas — lives in each tool’s recipe page in the sidebar.
LiteLLM
LiteLLM proxy mode reads OPENAI_API_BASE for the upstream endpoint
when you set the OpenAI provider with no explicit base URL on a route.
Export the var before litellm --config config.yaml (or set it in your
config.yaml environment block).
export OPENAI_API_BASE=http://localhost:9000/v1Source: LiteLLM proxy config settings.
Aider
Aider picks up OPENAI_API_BASE from the environment and routes every
chat completion through it. Set the env var in the shell you launch
aider from.
export OPENAI_API_BASE=http://localhost:9000/v1Source: Aider OpenAI-compatible APIs guide.
Continue
Continue reads apiBase from each model entry in config.yaml (under
the model’s config block for the OpenAI provider). Edit the YAML and
reload the IDE extension.
models: - name: SpendGuard-gated GPT-4o provider: openai model: gpt-4o config: apiBase: http://localhost:9000/v1Source: Continue model customization.
Cline / Roo Code (BYOK)
In the Cline or Roo Code extension settings, pick the OpenAI Compatible provider and fill the Base URL field. No env var required — this is a UI-only setting that persists in the workspace config.
Provider: OpenAI CompatibleBase URL: http://localhost:9000/v1API Key: <any value the proxy will forward upstream>Source: Cline BYOK guide.
OpenHands (BYOK)
OpenHands’ UI exposes a Custom LLM endpoint field under Settings → LLM → Custom Provider. Enter the SpendGuard egress URL there; OpenHands will use it for every model call in the workspace.
Settings → LLM → Custom Provider → Endpointhttp://localhost:9000/v1Source: OpenHands custom LLM configs.
Goose
Goose reads OPENAI_HOST (host, not full base URL — Goose appends
/v1 itself for the OpenAI provider). Export the variable in the shell
you launch goose from.
export OPENAI_HOST=http://localhost:9000Source: Goose installation guide.
Zed AI
Zed AI configuration is TOML inside settings.json (Zed reads JSON or
TOML depending on file extension). Add an api_url to the OpenAI
provider block.
[ai.openai]api_url = "http://localhost:9000/v1"Source: Zed AI configuration.
GitHub Copilot CLI (BYOK)
The GA-2026-04-07 BYOK release of gh copilot honours
COPILOT_PROVIDER_BASE_URL for the OpenAI-compatible provider. Export
the var; gh copilot picks it up on the next invocation.
export COPILOT_PROVIDER_BASE_URL=http://localhost:9000/v1Source: GitHub Copilot CLI BYOK reference.
Tabnine Enterprise
Tabnine Enterprise’s admin UI has a Connect Custom LLM form for self-hosted endpoints. Paste the SpendGuard egress URL into the endpoint field and save; the change rolls out to every Tabnine seat on the tenant.
Admin → AI Models → Connect Custom LLM → Endpoint URLhttp://localhost:9000/v1Source: Tabnine connect custom LLM.
AnythingLLM
AnythingLLM ships a Generic OpenAI provider tile under
Settings → LLM Preference. Pick the tile, set the Base URL to your
SpendGuard egress endpoint (trailing /v1 required), and any non-empty
API Key. The full per-tool walkthrough — four exact fields, Docker /
Desktop / Cloud notes, the DEMO_MODE=anythingllm_real smoke — lives in
the AnythingLLM recipe.
Settings → LLM Preference → Generic OpenAI → Base URLhttp://localhost:9000/v1Source: AnythingLLM custom OpenAI base URL.
LobeChat
LobeChat honours an OPENAI_PROXY_URL env var that rewrites the
OpenAI upstream for every server-side chat at /api/chat/openai. Set
it at container boot and every chat routes through SpendGuard with no
LobeChat code change. The full per-tool walkthrough — Docker /
Vercel / Cloud / Client-mode notes, the DEMO_MODE=lobechat_real
smoke — lives in the LobeChat recipe.
docker run -e OPENAI_PROXY_URL=http://localhost:9000/v1 \ -e ACCESS_CODE=... -p 3210:3210 lobehub/lobe-chat:1.40.0Source: LobeChat — OPENAI_PROXY_URL env var.
OpenClaw
OpenClaw supports custom provider entries under models.providers.
Set the provider baseUrl to the SpendGuard egress endpoint and use
api: "openai-completions" for OpenAI-compatible chat traffic. The
full per-tool walkthrough — fixture config, local / Docker URLs,
DEMO_MODE=openclaw_base_url smoke, and D40b plugin boundary — lives in
the OpenClaw recipe.
{ "models": { "providers": { "spendguard": { "baseUrl": "http://localhost:9000/v1", "api": "openai-completions" } } }}Source: OpenClaw model providers.
Cody self-hosted Enterprise
Sourcegraph Cody self-hosted uses a site-config block for the
completions relay endpoint. Edit site-config.json to point the
relay at SpendGuard.
{ "cody.completions.endpoint": "http://localhost:9000/v1"}Source: Cody self-hosted install guide.
Augment (BYOK)
Augment’s BYOK flow has an LLM custom endpoint field on the workspace settings page. Paste the SpendGuard URL and save; Augment uses it for every model call.
Settings → BYOK → LLM Custom Endpointhttp://localhost:9000/v1Source: Augment BYOK setup.
Dify
Dify wires custom OpenAI-compatible endpoints through its Model Provider Plugin mechanism. The plugin manifest declares the base URL; load it into your Dify workspace and pick it as the default provider.
type: model-providerprovider: openai-compatiblebase_url: http://localhost:9000/v1Source: Dify model provider plugin.
What works today
Section titled “What works today”The matrix above is the drop-in surface: tools whose maintainer docs
publicly document a custom OpenAI-compatible base URL on 2026-06-06. The
Verified column reflects SpendGuard’s own claim per row; for the
runtime-verified client SDKs (openai-python, LangChain ChatOpenAI,
LangGraph, openai-agents shorthand, streaming) see the README’s
What works today table.
What to do next
Section titled “What to do next”- Provision a real budget on Kubernetes
- Open the SpendGuard dashboard
- Cover the rest of your stack (Pattern 3 egress proxy)
- Wire a framework SDK (Pattern 1)
- How SpendGuard compares to Cloudflare AI Gateway, Databricks Unity, Portkey
The per-tool deep-dive pages linked in the Recipe column above are
the SLICE-2 / D33 / D34 walkthroughs (prerequisites, exact config
block, verification step, gotchas). At Slice 1 each Open ↗ link
resolves to a Coming soon stub; the env var or config line for that
tool is in the matrix above and repeated in the per-tool H3 sections
on this page.