Skip to Content

goose (gateway)

Route goose ’s LLM calls through the Respan gateway for automatic logging, caching, and model switching. goose’s OpenAI provider accepts a custom host and path, so only your RESPAN_API_KEY is needed.

Paste this into your coding agent:

Help me set up the Respan gateway with the goose integration. Follow https://www.respan.ai/docs/integrations/gateway/goose.md

Setup

Install goose

Terminal
brew install block-goose-cli

Other platforms: see the goose installation guide .

Set environment variables

Add to your shell profile (.bashrc, .zshrc, or PowerShell $PROFILE):

Terminal
export GOOSE_PROVIDER="openai" export GOOSE_MODEL="gpt-4o" export OPENAI_API_KEY="YOUR_RESPAN_API_KEY" export OPENAI_HOST="https://gateway.respan.ai" export OPENAI_BASE_PATH="chat/completions"

OPENAI_HOST is the origin only. OPENAI_BASE_PATH is the path goose appends to it, so the two together resolve to https://gateway.respan.ai/chat/completions.

You can set the same values interactively with goose configure, choose Configure Providers, then OpenAI, and enter the host and key when prompted.

No separate OpenAI API key needed. The Respan gateway handles provider authentication.

Run goose

Terminal
goose

For a one-shot, non-interactive run:

Terminal
goose run -t "your prompt"

All LLM calls now route through Respan.

Switch models

Change GOOSE_MODEL to use any of the 1000+ models available through the gateway.

Terminal
export GOOSE_MODEL="gpt-4o" # export GOOSE_MODEL="claude-sonnet-4-5-20250929" # export GOOSE_MODEL="gemini/gemini-3.5-flash"

See the full model list .