Skip to navigation

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.

Setup

1

Install goose

brew install block-goose-cli

Other platforms: see the goose installation guide.

2

Set environment variables

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

export GOOSE_PROVIDER="openai"
export GOOSE_MODEL="gpt-4o"
export OPENAI_API_KEY="YOUR_RESPAN_API_KEY"
export OPENAI_HOST="https://api.respan.ai"
export OPENAI_BASE_PATH="api/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://api.respan.ai/api/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.

3

Run goose

goose

For a one-shot, non-interactive run:

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.

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.