Skip to main content
Grid supports Claude Code, Codex, OpenCode, and Pi on macOS and Linux. A team’s routes can use Baseten Model APIs or Anthropic, OpenAI, and xAI models.

Coding agents

Grid configures Claude Code, Codex, OpenCode, and Pi installed on your machine. The routes in each agent’s model picker depend on the API that agent supports and the route’s model capabilities. Before running setup, install the Baseten CLI and sign in. Your admin must add you to a team with routes. Replace <TEAM_NAME_OR_ID> with that team’s name or ID. Setup replaces existing model and endpoint settings. See what setup changes before applying it to an agent you’ve already configured.
Claude Code can use team routes that serve the Anthropic Messages API. Setup configures the main, background, and fallback models. You can also choose a separate subagent model.Install the Claude Code CLI so setup can find claude on your PATH. Setup doesn’t detect the Claude desktop app.To connect Claude Code:Run the following command:
Setup writes ~/.claude/settings.json. If you set CLAUDE_CONFIG_DIR, it writes settings.json in that directory instead.
Review and confirm the planned changes, then restart your coding agent. Its model picker should list your team’s compatible routes. Send a test request to verify that the selected route works.

Platforms

Grid configures coding agents installed on macOS and Linux. Windows isn’t supported. Web and cloud versions of coding agents, such as Claude Code on the web and Codex cloud tasks, run on the provider’s servers and don’t read your machine’s settings, so they don’t use Grid.

Find the routes available to your team

The models available to you depend on your team. To list its routes, replace the placeholder with your team’s name or ID and run the following command:
Use the route’s ID with setup’s model-role flags. A model ID from a provider’s catalog isn’t enough; an admin must first add that model to your team. Setup then filters the team’s routes for the API and model capabilities your coding agent supports.

Model roles

Choose routes for the model roles your coding agent supports. Replace <TEAM_NAME_OR_ID> with your team’s name or ID and each route placeholder with the ID of an existing team route.

Choose the main model

Claude Code, Codex, OpenCode, and Pi support choosing a primary route. To set Claude Code’s main model, run the following command:
Without an explicit primary route, setup uses the team’s harness default when available, otherwise the first route the coding agent lists.

Choose the background model

Claude Code and OpenCode support a separate model for lightweight background tasks. To set OpenCode’s background model, run the following command:
Without an explicit background route, setup uses the team’s harness default when available, otherwise deepseek-ai/DeepSeek-V4.1-Flash. Codex and Pi don’t support this option.

Choose the subagent model

Claude Code and OpenCode support choosing a model for subagents. To set Claude Code’s subagent model, run the following command:
Without an explicit subagent route, setup uses the coding agent’s own setting. Codex and Pi don’t support this option.

Choose the fallback model

Only Claude Code supports choosing a fallback route. To set the model it uses when the primary model is unavailable, run the following command:
Without an explicit fallback route, setup uses the primary route. See baseten grid setup for every option.

Model providers

A route can point at:
  • A Baseten Model API, billed at your organization’s Model API prices.
  • An Anthropic, OpenAI, or xAI model, called through a team connection that holds your provider API key. The provider bills that key.
The Management API also supports Vertex AI and Amazon Bedrock connections. Configure those through Create a connection; the CLI connection procedure supports Anthropic, OpenAI, and xAI. Dedicated deployments aren’t supported as routes.

Model requirements

A route appears in your coding agent’s model picker only when Baseten has model metadata for its model, and that metadata shows the model:
  • Supports tool calling.
  • Has positive context and output limits, with a context window at least as large as its output limit.
  • Lists only text or image input modalities, with at least one modality specified.
  • Uses reasoning effort levels the CLI recognizes, when reasoning metadata is present.
Setup skips routes that don’t meet these requirements and prints warning: skipping routes without usable model metadata with their names. If a model your admin added is missing from your agent, ask them to check it against these requirements.