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

# Enable AI Shifts

> Connect Amazon Bedrock, Google Vertex AI, or OpenAI and enable models so Fleetshift agents can transform code.

Agent shifts use an AI model to analyze code and generate changes. Before your team can
run agent shifts, you need to connect an AI provider and enable the models you want to
use.

## Prerequisites

* [Fleetshift setup](/docs/portal/core-features-and-plugins/fleetshift/getting-started#connect-events)
  complete (webhooks connected)
* An AWS account with access to Amazon Bedrock, a GCP project with access to Vertex AI, or an OpenAI API key
* Permission to update Portal settings (app settings or plugin settings, depending on the provider)

## Configure the AI provider

Fleetshift supports Amazon Bedrock, Google Vertex AI, and OpenAI as AI providers. You
can configure one or more — Bedrock and Vertex AI power Claude models, while OpenAI
unlocks GPT and o-series models.

<Tabs>
  <Tab title="Amazon Bedrock">
    Bedrock is configured as a Portal-wide AI provider in app settings.

    1. Go to `App Settings > AI Models`.
    2. Under `Amazon Bedrock`, select your credential source:
       * `Default credentials` uses the AWS credentials already configured in
         `App Settings > Integrations > AWS`.
       * `Custom` uses Bedrock-specific credentials. Enter the access key, secret key,
         and region.
    3. Click `Save`.

    If you choose `Default credentials`, make sure your AWS integration already has an
    access key and secret key configured under `App Settings > Integrations > AWS`.

    The AWS credentials need the following IAM permission:

    ```text theme={"theme":{"light":"github-light","dark":"dracula"}}
    bedrock:InvokeModel
    ```
  </Tab>

  <Tab title="Google Vertex AI">
    Vertex AI is configured in the Fleetshift plugin settings.

    1. Go to `Plugin Settings > Fleetshift`.
    2. Under the AI section, enter your GCP project ID and region.
    3. Create a GCP service account in your project and provide its key JSON.
       Fleetshift uses this identity when running AI shifts.
    4. Click `Save`.

    The GCP service account needs the following IAM role:

    ```text theme={"theme":{"light":"github-light","dark":"dracula"}}
    roles/aiplatform.user
    ```
  </Tab>

  <Tab title="OpenAI">
    OpenAI is configured through the AI Gateway in app settings.

    1. Go to `App Settings > AI Models`.
    2. Under `OpenAI`, enter your API key.
    3. Click `Save`.

    Once your OpenAI key is configured, the shift creation wizard enables
    **opencode** — a multi-model agent harness that runs GPT and o-series models.
    When you create a new shift, you'll see opencode as a harness option alongside
    Claude Code. Select opencode and pick a GPT model (GPT-5.5, GPT-4.1, etc.)
    from the model dropdown.

    Both harness options are always visible in the wizard, but you can only select
    a harness if its provider is configured. Without an OpenAI key, opencode is
    visible but disabled — and vice versa for Claude Code without Bedrock or Vertex.

    The API key needs access to the models you plan to use. Check your
    [OpenAI account](https://platform.openai.com/settings) to confirm model
    availability.
  </Tab>
</Tabs>

## Enable Claude models

Fleetshift agents are powered by Claude when using Amazon Bedrock or Google Vertex AI.
You need to enable the Claude models you plan to use with your chosen provider.

<Tabs>
  <Tab title="Amazon Bedrock">
    1. In the AWS Console, go to `Amazon Bedrock > Model access`.
    2. Request access to the Claude models you want to make available.
  </Tab>

  <Tab title="Google Vertex AI">
    1. In the GCP Console, go to `Vertex AI > Model Garden`.
    2. Enable the Claude models you want to make available.
  </Tab>
</Tabs>

## Available models

You choose which model to use when creating each shift — this is not a global setting.

### Claude models (Bedrock / Vertex AI)

| Model         | When to use it                                            |
| ------------- | --------------------------------------------------------- |
| Claude Opus   | Recommended for best results on code transformations.     |
| Claude Sonnet | Faster and lower cost; suitable for simpler coding tasks. |

### OpenAI models (via opencode)

OpenAI models are available through the **opencode** harness. When you configure an
OpenAI API key in the AI Gateway, the shift creation wizard shows opencode as a harness
option. Select it and pick from the GPT models below.

| Model   | When to use it                                              |
| ------- | ----------------------------------------------------------- |
| GPT-5.5 | Most capable OpenAI model for complex code transformations. |
| GPT-5   | Strong general-purpose model for code transformations.      |
| GPT-4.1 | Fast and capable; good balance of quality and speed.        |

<Note>
  If you have both OpenAI and Claude providers configured, you can switch
  between them on an existing shift. Edit the shift's model in the shift
  configuration page, then re-run targets — useful for iterating on a prompt or
  building on top of previous work with a different model.
</Note>

## Next step

You're ready to [create and run your first shift](/docs/portal/core-features-and-plugins/fleetshift/create-and-run).
