Connect Block Goose (CLI & Desktop) to byesu API
Key Takeaways
- OpenAI-compatible provider (
goose configure): SetOPENAI_HOST=https://byesu.com(do NOT add/v1) andOPENAI_BASE_PATH=v1/chat/completionswithOPENAI_API_KEY=sk-...to rungpt-6.2-sol,deepseek-v4-pro,gemini-4-argon, orclaude-sonnet-5-5.- Native Anthropic provider (
0.1xcache reads): SetANTHROPIC_HOST=https://byesu.comandANTHROPIC_API_KEY=sk-...to runclaude-opus-5-5andclaude-sonnet-5-5over native/v1/messageswith0.1xcached input reads.- Lead/Worker routing (
~/.config/goose/config.yaml): PairGOOSE_LEAD_MODEL: claude-opus-5-5withGOOSE_MODEL: claude-sonnet-5-5(ordeepseek-v4-pro) on one pay-as-you-go balance to keep multi-turn MCP agent sessions at a fraction of list rates.- Avoid the
#1Goose404trap: Goose automatically appendsv1/chat/completionstoOPENAI_HOST, so enteringhttps://byesu.com/v1creates a double/v1/v1path.
Goose (by Block) is a local, open-source developer agent available as both a fast Rust-powered CLI (goose session) and a macOS/Linux/Windows Desktop app with first-class Model Context Protocol (MCP) extensions. Pointing Goose at byesu lets you power MCP tool loops, shell automation, and Lead/Worker model pairs from a single auto group token.
Exact host & path parameters for Goose
- OpenAI provider:
OPENAI_HOST=https://byesu.com+OPENAI_BASE_PATH=v1/chat/completions - Anthropic provider:
ANTHROPIC_HOST=https://byesu.com(native/v1/messages+0.1xprompt caching) - API Key: One
sk-...token in the defaultautogroup (Sign up & get key)
Step 0: Run the 5-Second Gateway Smoke Test
Create an sk-... token in the byesu Console under the default auto group (Quickstart). Verify connectivity and both OpenAI/Anthropic wire protocols in your terminal before running goose configure:
curl -fsSL https://docs.byesu.com/setup/test.sh | sh(For non-interactive terminals: BYESU_KEY="sk-your-byesu-token" curl -fsSL https://docs.byesu.com/setup/test.sh | bash.) You can also generate tailored YAML and shell exports in the Client & SDK Config Generator.
Option 1: Interactive Setup via goose configure (CLI & Desktop)
Run goose configure in your terminal → select Configure Providers:
Route A: Anthropic Provider (Recommended for Claude 0.1x Prompt Caching)
- Choose Anthropic from the provider list.
- Enter your credentials when prompted:text
ANTHROPIC_API_KEY: sk-your-byesu-token ANTHROPIC_HOST: https://byesu.com - Enter a custom model name such as
claude-sonnet-5-5orclaude-opus-5-5.
Route B: OpenAI Provider (GPT-6.2, DeepSeek V4, Gemini 4 & Multi-Vendor)
- Choose OpenAI from the provider list.
- Enter the exact host and base path below:text
OPENAI_API_KEY: sk-your-byesu-token OPENAI_HOST: https://byesu.com OPENAI_BASE_PATH: v1/chat/completions - Enter any console model ID — such as
gpt-6.2-sol,deepseek-v4-pro,deepseek-v4.1-flash, orgemini-4-argon.
Do NOT put /v1 at the end of OPENAI_HOST in Goose
Unlike most OpenAI SDKs, Goose separates OPENAI_HOST (https://byesu.com) from OPENAI_BASE_PATH (v1/chat/completions). Putting https://byesu.com/v1 into OPENAI_HOST produces https://byesu.com/v1/v1/chat/completions and triggers HTTP 404.
In Goose Desktop, open Settings → Models → Configure Providers, pick Anthropic or OpenAI, and fill in the exact same Host (https://byesu.com) and API Key (sk-...).
Option 2: ~/.config/goose/config.yaml & Lead/Worker Multi-Model Routing
Goose features a built-in Lead / Worker architecture: the Lead model handles initial architectural planning turns (and steps back in automatically if a tool call fails repeatedly), while the Worker model executes fast file edits, MCP tool calls, and test runs.
Edit ~/.config/goose/config.yaml to pair claude-opus-5-5 as your Lead planner with claude-sonnet-5-5 as your fast Worker over native /v1/messages:
GOOSE_PROVIDER: anthropic
ANTHROPIC_HOST: https://byesu.com
# Primary fast worker for MCP tools, file edits, and bash commands
GOOSE_MODEL: claude-sonnet-5-5
# Lead architect for the first 3 planning turns + automatic fallback on errors
GOOSE_LEAD_PROVIDER: anthropic
GOOSE_LEAD_MODEL: claude-opus-5-5
GOOSE_LEAD_TURNS: 3
GOOSE_LEAD_FAILURE_THRESHOLD: 2
GOOSE_LEAD_FALLBACK_TURNS: 2Prefer mixing vendors — for example, Claude Opus 5.5 or GPT-6.2 Sol as Lead and DeepSeek V4 Pro (deepseek-v4-pro) as your high-throughput Worker? Route through the openai provider on one BYESU_API_KEY:
GOOSE_PROVIDER: openai
OPENAI_HOST: https://byesu.com
OPENAI_BASE_PATH: v1/chat/completions
# High-throughput worker with automatic zero-surcharge prefix caching
GOOSE_MODEL: deepseek-v4-pro
# Deep-reasoning lead planner (or gpt-6.2-sol)
GOOSE_LEAD_PROVIDER: openai
GOOSE_LEAD_MODEL: claude-opus-5-5
GOOSE_LEAD_TURNS: 3For headless SSH boxes, Docker containers, or CI jobs where no OS keyring daemon is running, export your credentials directly:
export GOOSE_DISABLE_KEYRING=1
export ANTHROPIC_HOST="https://byesu.com"
export ANTHROPIC_API_KEY="sk-your-byesu-token"
export OPENAI_HOST="https://byesu.com"
export OPENAI_BASE_PATH="v1/chat/completions"
export OPENAI_API_KEY="sk-your-byesu-token"
goose run --text "Inspect failing vitest specs in packages/api and patch the schema validator."Prompt Caching & MCP Extension Economics
Goose's Developer, Git, Memory, and custom MCP extensions easily inject 8,000–25,000 tokens of tool schemas at the top of every session turn.
- Preserve
0.1xcached reads: Routing Claude 5.5 viaGOOSE_PROVIDER: anthropic(ANTHROPIC_HOST=https://byesu.com) keeps Anthropiccache_controlbreakpoints intact so cached MCP schemas and conversation history bill down to0.1x(Prompt Caching Guide). Ongpt-6.2-solanddeepseek-v4-pro, automatic prefix caching likewise slashes repeated tool-definition overhead. - Keep MCP server lists stable mid-session: Toggling MCP extensions on or off mid-session mutates the top-of-prompt tool array and invalidates the prefix cache; enable your standard workspace extensions once at session start.
- Pay-as-you-go funding: Top up your gateway balance via USDT (TRC20 / BEP20) or Alipay with live per-model rates visible in the console after sign-in.
Troubleshooting
404 Not Found(/v1/v1/chat/completionsormodel_not_found): CheckOPENAI_HOSTin~/.config/goose/config.yaml— remove/v1so it readshttps://byesu.com, and verifyOPENAI_BASE_PATH: v1/chat/completions. Also check exact model spelling (claude-sonnet-5-5, notclaude-3-7-sonnetorclaude-sonnet-5.5; see Claude 404 fix).401 Unauthorizeddespite updating env vars: Goose checks your OS Keychain first unlessGOOSE_DISABLE_KEYRING=1is set. Re-rungoose configureto overwrite the stored keychain secret, or exportGOOSE_DISABLE_KEYRING=1(Claude 401 fix, OpenAI 401 fix).no available channel: Ensure yoursk-...key was created in the defaultautogroup (no available channel).
FAQ
Why does Block Goose return HTTP 404 when OPENAI_HOST ends with /v1?
Goose automatically appends OPENAI_BASE_PATH (v1/chat/completions) to OPENAI_HOST. Set OPENAI_HOST=https://byesu.com (without /v1) so the final request hits https://byesu.com/v1/chat/completions.
Should I connect Goose via the Anthropic or OpenAI provider on byesu?
Use Anthropic (ANTHROPIC_HOST=https://byesu.com) when running Claude Opus 5.5 / Sonnet 5.5 for native 0.1x cache_control caching, and use OpenAI (OPENAI_HOST=https://byesu.com, OPENAI_BASE_PATH=v1/chat/completions) when mixing GPT-6.2, DeepSeek V4, and Gemini 4. Both accept the same auto-group key.
How do I configure Goose Lead/Worker multi-model routing in config.yaml?
Set GOOSE_LEAD_MODEL: claude-opus-5-5 (for initial planning and error recovery) alongside GOOSE_MODEL: claude-sonnet-5-5 or deepseek-v4-pro (for fast tool execution) in ~/.config/goose/config.yaml.
How do I bypass macOS or Linux Keychain errors when running Goose over SSH?
Set export GOOSE_DISABLE_KEYRING=1 and pass ANTHROPIC_API_KEY or OPENAI_API_KEY as standard environment variables.