Skip to content
Need an API key for this client? One token for Claude, GPT-6.2, Gemini 4 & DeepSeek V4 — top up via USDT or Alipay

Connect Block Goose (CLI & Desktop) to byesu API ​

Key Takeaways

  • OpenAI-compatible provider (goose configure): Set OPENAI_HOST=https://byesu.com (do NOT add /v1) and OPENAI_BASE_PATH=v1/chat/completions with OPENAI_API_KEY=sk-... to run gpt-6.2-sol, deepseek-v4-pro, gemini-4-argon, or claude-sonnet-5-5.
  • Native Anthropic provider (0.1x cache reads): Set ANTHROPIC_HOST=https://byesu.com and ANTHROPIC_API_KEY=sk-... to run claude-opus-5-5 and claude-sonnet-5-5 over native /v1/messages with 0.1x cached input reads.
  • Lead/Worker routing (~/.config/goose/config.yaml): Pair GOOSE_LEAD_MODEL: claude-opus-5-5 with GOOSE_MODEL: claude-sonnet-5-5 (or deepseek-v4-pro) on one pay-as-you-go balance to keep multi-turn MCP agent sessions at a fraction of list rates.
  • Avoid the #1 Goose 404 trap: Goose automatically appends v1/chat/completions to OPENAI_HOST, so entering https://byesu.com/v1 creates a double /v1/v1 path.

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.1x prompt caching)
  • API Key: One sk-... token in the default auto group (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:

bash
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:

  1. Choose Anthropic from the provider list.
  2. Enter your credentials when prompted:
    text
    ANTHROPIC_API_KEY: sk-your-byesu-token
    ANTHROPIC_HOST:    https://byesu.com
  3. Enter a custom model name such as claude-sonnet-5-5 or claude-opus-5-5.

Route B: OpenAI Provider (GPT-6.2, DeepSeek V4, Gemini 4 & Multi-Vendor) ​

  1. Choose OpenAI from the provider list.
  2. 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
  3. Enter any console model ID — such as gpt-6.2-sol, deepseek-v4-pro, deepseek-v4.1-flash, or gemini-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:

yaml
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: 2

Prefer 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:

yaml
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: 3

For headless SSH boxes, Docker containers, or CI jobs where no OS keyring daemon is running, export your credentials directly:

bash
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.1x cached reads: Routing Claude 5.5 via GOOSE_PROVIDER: anthropic (ANTHROPIC_HOST=https://byesu.com) keeps Anthropic cache_control breakpoints intact so cached MCP schemas and conversation history bill down to 0.1x (Prompt Caching Guide). On gpt-6.2-sol and deepseek-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/completions or model_not_found): Check OPENAI_HOST in ~/.config/goose/config.yaml — remove /v1 so it reads https://byesu.com, and verify OPENAI_BASE_PATH: v1/chat/completions. Also check exact model spelling (claude-sonnet-5-5, not claude-3-7-sonnet or claude-sonnet-5.5; see Claude 404 fix).
  • 401 Unauthorized despite updating env vars: Goose checks your OS Keychain first unless GOOSE_DISABLE_KEYRING=1 is set. Re-run goose configure to overwrite the stored keychain secret, or export GOOSE_DISABLE_KEYRING=1 (Claude 401 fix, OpenAI 401 fix).
  • no available channel: Ensure your sk-... key was created in the default auto group (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.

Got a problem? Contact support or join our group.