· rangkumin.tech

How to Set Up Goose With an OpenAI-Compatible API (AtmoRouter)

goose, Block's open-source agent, can point at any OpenAI-compatible endpoint. This AtmoRouter-authored guide walks through both setup routes, the OPENAI_HOST and base path split that causes most 401s and 404s, and illustrative cost math for a 25-turn session.

Why it matters

goose ships first-class support for a long list of named providers, but the plain OpenAI-compatible path is the one worth knowing if you route across several models. Give it one base URL and it will use whatever model IDs that endpoint serves. The catch is that goose reads OPENAI_HOST, not OPENAI_BASE_URL, so the wrong variable sends your key to the default host and fails like an auth problem.

The second route registers AtmoRouter as a named custom provider through a JSON file, with your model list and per-token prices for goose's cost readout. The two routes disagree on paths: a bare host for OPENAI_HOST, a full request path for base_url. Mixing them either doubles or drops the chat completions path.

Cost is where the model row matters. On identical illustrative traffic, the cheapest catalogue entry costs under $0.001 per session while ali/qwen4-max lands near $0.096, which is the practical argument for a gateway: changing the row is a config edit, not a migration. The post is AtmoRouter-authored and the arithmetic is illustrative, not a benchmark.

Sources

Choose English or Indonesian. Up to two editions a day. Unsubscribe anytime.