baseten grid setup once to point your coding agent at your team’s models on Baseten Grid. Setup finds the supported coding agents you have installed, adds your team’s routes to each agent’s model picker, and creates a Grid API key for your machine.
Before you begin
- Your organization uses Grid, and an admin has added you to a team that has at least one route.
- You use a supported coding agent on macOS or Linux.
What setup changes
Setup replaces each coding agent’s model and endpoint settings with your team’s routes and doesn’t save the previous values. Setup keeps your MCP servers, plugins, and other settings. If you’ve customized your agent’s model or endpoint settings, copy its configuration file before you run setup. To see which files setup changes, runbaseten grid setup --dry-run --verbose.
Setup also creates a Grid API key for your machine and team, named baseten-harness-<hostname>-<suffix>. Later runs reuse that key. If the key was deleted, setup creates a new one.
Connect your coding agents
To connect your coding agents to Grid:-
Install or update the Baseten CLI to the latest version. With Homebrew, run the following commands:
If you already have the CLI, run
brew upgrade baseteninstead. -
Sign in to your organization:
-
Run
baseten grid setupand pick the coding agents to configure:If you’re on more than one team, pass--teamwith the team’s name or ID. Setup saves the team, andbaseten grid synckeeps using it. To skip the picker, pass--harnessonce for each coding agent: - Review the planned changes and confirm.
- Restart your coding agent so it reads the new settings.
- In your coding agent’s model picker, choose one of your team’s routes, then send a test request to verify the connection.
baseten grid route list to find route IDs:
Check your setup
Runbaseten grid status to see each coding agent’s installed version, configuration path, and configured routes:
Send a test request
Restart your coding agent, choose a team route in its model picker, and send a short prompt:Check your tools
If you use MCP servers, ask your agent to perform a read-only task with one of your configured tools. Confirm that the agent makes the tool call and uses its result. Preserving the configuration doesn’t verify that a server is authenticated or reachable. Claude account connectors and MCP servers configured in Claude Code are different. Claude account connectors don’t work while Claude Code points at Grid. Configure the tools as MCP servers in Claude Code instead; an external MCP manager can provide those servers.Pick up new routes
When your admin adds or changes routes, runbaseten grid sync. Sync reapplies your last setup on every configured coding agent with the team’s current routes and reuses your existing key:
--yes.
Sync has no --team option. To change which coding agents or team you use, run baseten grid setup again.
Remove Grid from a coding agent
baseten grid teardown removes the Baseten integration settings so the coding agent’s own defaults apply. It keeps unrelated settings and doesn’t restore previous values.
To remove Grid from a coding agent:
-
Preview what teardown removes:
Supported options for
<AGENT>areclaude-code,codex,opencode, andpi. -
Run teardown:
- If you copied a configuration file before setup, copy your previous model and endpoint settings back into it.
-
For Codex, sign back in to OpenAI:
- Restart the coding agent, choose your previous model, and send a short request to verify the connection.
--harness, it removes every integration configured at its default path.
Troubleshooting
Setup reportsthere are <n> teams; pass --team: you’re on more than one team. Run baseten org team list to see your teams, then pass --team with the team whose models you want.
Setup reports team <team> has no routes: your team doesn’t have any routes yet. Ask your admin to add models to it.
Setup reports that your team has no routes a coding agent can call: Claude Code uses only routes that serve the Anthropic Messages API, and Codex uses only routes that serve the OpenAI Responses API. Ask your admin for a model that your coding agent can call.
A route is missing from your coding agent: first list the routes available in the intended team:
warning: skipping routes without usable model metadata, the route’s model doesn’t meet the model requirements.
Codex still shows its previous models after setup or sync: setup and sync restart Codex’s background server so it reads the new model catalog. If you declined the restart or it failed, sync retries it. The restart interrupts in-progress turns; Codex keeps the thread history.
To retry a pending Codex restart:
- Finish active work in Codex.
-
Run sync:
- Confirm the restart when prompted.
- Reopen Codex and check that its model picker lists your team’s routes.
list routes: baseten API error (HTTP 403): the CLI is signed in to an organization that doesn’t use Grid, or you aren’t on the team that owns the routes. If you belong to more than one Baseten organization, run baseten auth login again and sign in to the one that uses Grid. Otherwise, ask your admin to add you to the team.
A Grid command reports no team matched or HTTP 403 after you sign in: if BASETEN_API_KEY is set in your shell, the CLI uses that key instead of your sign-in. To see which credential it uses, run the following command:
Using API key from BASETEN_API_KEY, run unset BASETEN_API_KEY and try the command again. If you ran setup with that key, run baseten grid setup again so your coding agent gets a Grid API key.
For more information, see the baseten grid CLI reference.