> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Grid supported coding agents and models

> The coding agents, platforms, model providers, and model capabilities that Baseten Grid supports.

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](#model-requirements).

Before running setup, [install the Baseten CLI and sign in](https://docs.baseten.co/grid/developers/set-up.md#connect-your-coding-agents). 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](https://docs.baseten.co/grid/developers/set-up.md#what-setup-changes) before applying it to an agent you've already configured.

> [tab] Claude Code
>
> 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](#choose-the-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:
>
> ```sh theme={"system"}
> baseten grid setup --harness claude-code \
>   --team "<TEAM_NAME_OR_ID>"
> ```
>
> > [accordion] Claude Code configuration
> >
> > Setup writes `~/.claude/settings.json`. If you set `CLAUDE_CONFIG_DIR`, it writes `settings.json` in that directory instead.

> [tab] Codex
>
> Codex can use team routes that serve the OpenAI Responses API. Setup configures its main model. Background, subagent, and fallback route options don't apply to Codex.
>
> Setup finds the Codex CLI or the Codex agent bundled with the ChatGPT or Codex desktop app. Grid configures that coding agent; ChatGPT chat doesn't use Grid.
>
> > [!WARNING]
> >
> > Setup signs Codex out of OpenAI and ChatGPT and disables ChatGPT login while Grid is configured. It can restart the Codex background server and asks first when sessions are attached. Finish active work before running setup.
>
> **To connect Codex**:
>
> Run the following command:
>
> ```sh theme={"system"}
> baseten grid setup --harness codex \
>   --team "<TEAM_NAME_OR_ID>"
> ```
>
> > [accordion] Codex configuration
> >
> > Setup writes `~/.codex/config.toml`. If you set `CODEX_HOME`, it writes `config.toml` in that directory instead. The CLI and desktop app share this configuration.
> >
> > Setup looks for `codex` on your `PATH`. On macOS, it also checks `ChatGPT.app` and `Codex.app` in `/Applications` and `~/Applications`. On Linux, it checks the Codex bundled with the ChatGPT `.deb` installation under `/usr/lib/chatgpt`.

> [tab] OpenCode
>
> OpenCode can use team routes across the supported providers. Setup chooses the API for each route from its target and configures the main and background models. You can also choose a separate [subagent model](#choose-the-subagent-model). The fallback route option doesn't apply to OpenCode.
>
> Setup finds the OpenCode CLI or the CLI bundled with the OpenCode desktop app. Both use the same configuration file.
>
> **To connect OpenCode**:
>
> Run the following command:
>
> ```sh theme={"system"}
> baseten grid setup --harness opencode \
>   --team "<TEAM_NAME_OR_ID>"
> ```
>
> > [accordion] OpenCode configuration
> >
> > Setup uses `~/.config/opencode`, or `$XDG_CONFIG_HOME/opencode` if you set `XDG_CONFIG_HOME`. It writes `opencode.jsonc` when that file exists; otherwise, it writes `opencode.json`.
> >
> > Setup preserves OpenCode's configuration format. It writes the format both OpenCode 1 and 2 read, unless your file already uses OpenCode 2's native format.
> >
> > Setup looks for `opencode` on your `PATH` and in `~/.opencode/bin`. On macOS, it also checks `OpenCode.app` and `OpenCode Beta.app` in `/Applications` and `~/Applications`. On Linux, it checks `/opt/OpenCode/resources/opencode-cli`.

> [tab] Pi
>
> Pi can use team routes across the supported providers. Setup chooses the API for each route from its target and configures the main model. Background, subagent, and fallback route options don't apply to Pi.
>
> Install the Pi CLI so setup can find `pi` on your `PATH`.
>
> **To connect Pi**:
>
> Run the following command:
>
> ```sh theme={"system"}
> baseten grid setup --harness pi \
>   --team "<TEAM_NAME_OR_ID>"
> ```
>
> > [accordion] Pi configuration
> >
> > Setup writes the team models and Grid API key to `~/.pi/agent/models.json`. It also writes the default provider and model to `~/.pi/agent/settings.json`.
> >
> > If you set `PI_CODING_AGENT_DIR`, setup writes both files 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](https://docs.baseten.co/grid/developers/set-up.md#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:

```sh theme={"system"}
baseten grid route list --team "<TEAM_NAME_OR_ID>"
```

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](#model-requirements) 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:

```sh theme={"system"}
baseten grid setup --harness claude-code --team "<TEAM_NAME_OR_ID>" --primary-route-id "<PRIMARY_ROUTE_ID>"
```

Without an explicit primary route, setup uses the team's [harness default](https://docs.baseten.co/grid/set-up.md#set-harness-defaults) 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:

```sh theme={"system"}
baseten grid setup --harness opencode --team "<TEAM_NAME_OR_ID>" --background-route-id "<BACKGROUND_ROUTE_ID>"
```

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:

```sh theme={"system"}
baseten grid setup --harness claude-code --team "<TEAM_NAME_OR_ID>" --subagent-route-id "<SUBAGENT_ROUTE_ID>"
```

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:

```sh theme={"system"}
baseten grid setup --harness claude-code --team "<TEAM_NAME_OR_ID>" --fallback-route-id "<FALLBACK_ROUTE_ID>"
```

Without an explicit fallback route, setup uses the primary route.

See [`baseten grid setup`](https://docs.baseten.co/reference/cli/baseten/grid#setup) for every option.

## Model providers

A route can point at:

* A Baseten [Model API](https://docs.baseten.co/inference/model-apis/overview.md), billed at your organization's Model API prices.
* An Anthropic, OpenAI, or xAI model, called through a team [connection](https://docs.baseten.co/grid/set-up.md#connect-model-providers) 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](https://docs.baseten.co/reference/management-api/routes/create-route-connection.md); 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.
