--- title: Use Goose (Block) with a custom provider: 5-minute setup slug: goose-custom-provider canonical_url: https://blog.juscode.co/goose-custom-provider published_at: 2026-05-26T00:00:00+00:00 author: jusCode tags: goose, block, openai-compatible, custom-provider, agent-toolkit, ai-coding tldr: Run `goose configure`, pick OpenAI as the provider, point host to https://api.juscode.co and paste a jcg_ token. Goose's tool-use loop keeps working exactly as before; per-call routing drops typical bills 60-80%. key_takeaways: - Goose works with any OpenAI-compatible endpoint via goose configure. - Set base_url to https://api.juscode.co/v1 and use a jcg_ token with model jusCode-auto. - Goose's tool-use loop is unchanged; routing drops bills 60-80%. --- # Use Goose (Block) with a custom provider [Goose](https://block.github.io/goose/) is Block's open-source agent toolkit, strong on extensions (called "goose-extensions"), tool-use, and giving you full control over the agent loop. It accepts any OpenAI-compatible provider, which makes pointing it at jusCode a 5-minute config change with immediate cost savings. ## The 5-minute setup ```sh goose configure ``` When prompted: ``` ? Which provider? ↳ OpenAI ? Host (without trailing slash) ↳ https://api.juscode.co ? API key ↳ jcg_your_key_here ? Model ↳ jusCode-auto ``` Goose stores this in `~/.config/goose/config.yaml`. Verify: ```yaml GOOSE_PROVIDER__TYPE: openai GOOSE_PROVIDER__HOST: https://api.juscode.co GOOSE_PROVIDER__API_KEY: jcg_… GOOSE_PROVIDER__MODEL: jusCode-auto ``` Done. Start a session: ```sh goose session start ``` ## Getting an API key Sign in at [juscode.co/login](https://juscode.co/login) → [juscode.co/developer](https://juscode.co/developer) → **Keys** tab → **Mint key**. Copy the `jcg_…` token (shown once). Paste into the configure prompt above. ## What works | Feature | Status | |---|---| | `goose session start` interactive loop | ✅ | | Tool extensions (`goose-extensions`) | ✅ | | Memory between sessions | ✅ | | Custom system prompts | ✅ | | Streaming responses | ✅ | | Plan-then-execute mode | ✅ | | Image inputs (vision) | ✅ auto-routes to vision-capable model | ## Pinning a specific model `jusCode-auto` lets jusCode pick per call. If you want every Goose interaction to hit a specific upstream: ```yaml GOOSE_PROVIDER__MODEL: anthropic/claude-sonnet-4.5 # or GOOSE_PROVIDER__MODEL: nousresearch/hermes-4-405b # or GOOSE_PROVIDER__MODEL: openai/gpt-5 ``` jusCode normalizes provider prefixes, so you don't need separate accounts at each upstream. ## Why Goose benefits from per-call routing Goose sessions tend to be tool-heavy: the agent calls `developer__list_files`, then `developer__read_file`, then `developer__write_file`, then `developer__shell` to run tests. That's 4 LLM round-trips just to apply one edit and verify it. Most of those round-trips are tactical (parse a directory listing, propose a small edit) and don't need a frontier model. jusCode's per-call routing sends the tactical steps to a small fast model (Qwen3 8B, Hermes 70B) and reserves the frontier model for steps that actually need reasoning (architect a refactor, debug a confusing failure). On real Goose workloads we see 60-80% cost reduction with no task-completion regression. ## Goose-extensions still work If you have custom goose-extensions (Slack integration, internal API wrappers, custom tool sets), they keep working unchanged: extensions communicate via Goose's tool-call protocol, which is OpenAI-compatible, which is what jusCode speaks. No extension-side change required. ## Common gotchas - **`HOST` is the base URL without `/v1`.** Goose appends `/v1/chat/completions` itself. So set `https://api.juscode.co`, not `https://api.juscode.co/v1`. - **Streaming is on by default** in Goose. If you see "Connection closed by peer" mid-stream, that's network, not the gateway. Retry the session. - **Goose retries failed tool calls** up to N times. If you hit `429 RATE_LIMIT` on a burst, either wait or raise the per-key rpm in your [dashboard](https://juscode.co/developer) → Tenant tab. ## Multi-engineer setup Each engineer mints their own `jcg_` key via `/developer` (separate keys = per-user spend attribution). They each run `goose configure` once with their own key. The owner can set per-user monthly soft caps under the Tenant tab to prevent any one engineer's runaway loop from draining the team wallet. ## Setup checklist 1. Sign up at [juscode.co/login](https://juscode.co/login). 2. Mint a `jcg_` key at [/developer](https://juscode.co/developer) → Keys. 3. `goose configure` → OpenAI provider, host `https://api.juscode.co`, paste key. 4. `goose session start`, run a normal workflow. 5. Check spend on the [Usage tab](https://juscode.co/developer). 6. (Multi-engineer) set per-user caps under Tenant tab. ## Related reading - [OpenAI-compatible drop-in (Cursor, Aider, Cline, Continue, Goose…)](/docs/openai-drop-in/) - [Cline + custom endpoint](/blog/cline-custom-endpoint/) - [Continue.dev custom model](/blog/continue-custom-model/) - [The cheapest LLM API for coding agents in 2026](/blog/cheapest-llm-api-for-coding-2026/) --- *Raw markdown: [/blog/goose-custom-provider.md](/blog/goose-custom-provider.md)* ## FAQ ### How do I point Goose at a cheaper endpoint? Use goose configure: base_url https://api.juscode.co/v1, a jcg_ token, and model jusCode-auto. Behavior is unchanged. ### Does Goose lose any features on a custom endpoint? No. Tool use, edits, and memory keep working; only the model selection moves behind the gateway. ### How much does per-call routing save? Typically 60-80% on real coding-agent workloads, because most steps do not need a frontier model.