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

# Update LLM Integration

> Updates an existing LLM integration.

`Unary` · [`Runner Configurations`](/docs/api-reference/generated/runner-configuration/overview)

Updates an existing LLM integration.

Use this method to:

* Modify integration settings
* Update credentials
* Change configuration

### Examples

* Update integration:

  Updates OAuth credentials.

  ```yaml theme={null}
  id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
  apiKey: "sk-..."
  ```

## Endpoint

```text theme={null}
POST /api/gitpod.v1.RunnerConfigurationService/UpdateLLMIntegration
```

Send a Bearer token as described in [Authentication](/docs/api-reference#authenticate-requests). If your organization uses a custom management-plane domain, replace `https://app.ona.com` with that domain.

## Request example

<CodeGroup>
  ```bash cURL theme={null}
  export ONA_HOST=https://app.ona.com
  export ONA_API_KEY=<your-token>

  curl --request POST \
    --url "$ONA_HOST/api/gitpod.v1.RunnerConfigurationService/UpdateLLMIntegration" \
    --header "Authorization: Bearer $ONA_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
    "id": "<id>"
  }'
  ```

  ```python Python theme={null}
  import gitpod.v1.runner_configuration_pb2 as runner_configuration_pb2
  from ona_sdk import create_client_from_env

  ona = create_client_from_env()
  request = runner_configuration_pb2.UpdateLLMIntegrationRequest(
      id="<id>",
  )
  response = ona.services.runner_configuration.update_llm_integration(request)
  print(response)
  ```

  ```typescript TypeScript theme={null}
  import { create } from "@bufbuild/protobuf";
  import { createClientFromEnv } from "@gitpod/sdk";
  import { UpdateLLMIntegrationRequestSchema } from "@gitpod/sdk/gitpod/v1/runner_configuration_pb";

  async function main() {
    const ona = createClientFromEnv();
    const request = create(UpdateLLMIntegrationRequestSchema, {
      id: "<id>",
    });
    const response = await ona.services.runnerConfiguration.updateLLMIntegration(request);
    console.log(response);
  }

  main().catch(console.error);
  ```

  ```go Go theme={null}
  package main

  import (
  	"context"
  	"fmt"
  	"log"

  	"connectrpc.com/connect"
  	"github.com/gitpod-io/gitpod-sdk-go/sdk"
  	gitpodpb "github.com/gitpod-io/gitpod-sdk-go/v1"
  )

  func main() {
  	ona, err := sdk.NewFromEnv()
  	if err != nil {
  		log.Fatal(err)
  	}

  	request := connect.NewRequest(&gitpodpb.UpdateLLMIntegrationRequest{
  		Id: "<id>",
  	})
  	response, err := ona.Services.RunnerConfiguration.UpdateLLMIntegration(context.Background(), request)
  	if err != nil {
  		log.Fatal(err)
  	}
  	fmt.Println(response.Msg)
  }
  ```

  ```json Request body theme={null}
  {
    "id": "<id>"
  }
  ```
</CodeGroup>

## Request

`gitpod.v1.UpdateLLMIntegrationRequest`

| Field            | Type                                                                                   | Required | Description                                                                                                                                                                                               |
| ---------------- | -------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`             | string                                                                                 | No       | Constraints: `string.uuid=true`.                                                                                                                                                                          |
| `endpoint`       | string                                                                                 | No       |                                                                                                                                                                                                           |
| `models`         | array of [SupportedModel](#enum-gitpod-v1-supported-model)                             | No       | models can be updated to change the supported LLM models Set list of supported models to the given list. Empty list means no updates to the models. Constraints: `repeated.items.enum.defined_only=true`. |
| `apiKey`         | string                                                                                 | No       | api\_key can be set to update the LLM provider's API key. The cleartext secret will be encrypted with the runner's public key before being stored.                                                        |
| `maxTokens`      | 64-bit integer string                                                                  | No       | max\_tokens can be set to update the maximum number of tokens to generate before stopping.                                                                                                                |
| `phase`          | [LLMIntegrationPhase](#enum-gitpod-v1-llm-integration-phase)                           | No       | phase can be set to update the status/phase of the LLM integration                                                                                                                                        |
| `requestHeaders` | array of [LLMIntegrationRequestHeader](#type-gitpod-v1-llm-integration-request-header) | No       | request\_headers set optional headers for the LLM integration.                                                                                                                                            |

## Response

`gitpod.v1.UpdateLLMIntegrationResponse`

This message has no fields.

## Related types

<a id="type-gitpod-v1-llm-integration-request-header" />

<Accordion title="LLMIntegrationRequestHeader">
  LLMIntegrationRequestHeader represents a custom header to be passed to LLM requests.
  The value field contains:

  * Plain text values in update requests (will be encrypted server-side).
  * Encrypted binary values on read requests (decrypt directly to get original value).

  `gitpod.v1.LLMIntegrationRequestHeader`

  | Field        | Type                                                                                   | Required | Description                                                                                                                                                   |
  | ------------ | -------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `key`        | string                                                                                 | No       |                                                                                                                                                               |
  | `value`      | base64 string                                                                          | No       |                                                                                                                                                               |
  | `headerType` | [LLMIntegrationRequestHeaderType](#enum-gitpod-v1-llm-integration-request-header-type) | No       | header\_type controls how value is interpreted. Unspecified values are treated as literals for backward compatibility. Constraints: `enum.defined_only=true`. |
</Accordion>

<a id="enum-gitpod-v1-llm-integration-phase" />

<Accordion title="LLMIntegrationPhase">
  LLMIntegrationPhase represents the current status/phase of an LLM integration

  | Value                               | Number | Description                                                      |
  | ----------------------------------- | -----: | ---------------------------------------------------------------- |
  | `LLM_INTEGRATION_PHASE_UNSPECIFIED` |      0 |                                                                  |
  | `LLM_INTEGRATION_PHASE_AVAILABLE`   |      1 | The integration can be used to make requests                     |
  | `LLM_INTEGRATION_PHASE_UNAVAILABLE` |      2 | The integration cannot be used, likely due to insufficient funds |
  | `LLM_INTEGRATION_PHASE_DISABLED`    |      3 | The integration cannot be used because the user disabled it      |
</Accordion>

<a id="enum-gitpod-v1-llm-integration-request-header-type" />

<Accordion title="LLMIntegrationRequestHeaderType">
  LLMIntegrationRequestHeaderType describes how an LLM integration request
  header value is resolved.

  | Value                                                | Number | Description                                                                              |
  | ---------------------------------------------------- | -----: | ---------------------------------------------------------------------------------------- |
  | `LLM_INTEGRATION_REQUEST_HEADER_TYPE_UNSPECIFIED`    |      0 | Existing untyped headers are literal values.                                             |
  | `LLM_INTEGRATION_REQUEST_HEADER_TYPE_LITERAL`        |      1 | The configured value is sent as-is when the request does not already contain the header. |
  | `LLM_INTEGRATION_REQUEST_HEADER_TYPE_CEL_EXPRESSION` |      2 | The configured value is a CEL expression evaluated by a supported agent.                 |
</Accordion>

<a id="enum-gitpod-v1-supported-model" />

<Accordion title="SupportedModel">
  SupportedModel enumerates the LLM models available for agent executions

  | Value                                 | Number | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | ------------------------------------- | -----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `SUPPORTED_MODEL_UNSPECIFIED`         |      0 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_SONNET_3_5`          |      1 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_SONNET_3_7`          |      2 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_SONNET_3_7_EXTENDED` |      3 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_SONNET_4`            |      4 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_SONNET_4_EXTENDED`   |      5 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_SONNET_4_5`          |      8 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_SONNET_4_5_EXTENDED` |      9 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_SONNET_4_6`          |     18 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_SONNET_4_6_EXTENDED` |     19 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_SONNET_5`            |     32 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_OPUS_4`              |      6 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_OPUS_4_EXTENDED`     |      7 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_OPUS_4_5`            |     14 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_OPUS_4_5_EXTENDED`   |     15 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_OPUS_4_6`            |     16 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_OPUS_4_6_EXTENDED`   |     17 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_OPUS_4_7`            |     22 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_OPUS_4_8`            |     31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_HAIKU_4_5`           |     21 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_OPENAI_4O`           |     10 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_OPENAI_4O_MINI`      |     11 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_OPENAI_O1`           |     12 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_OPENAI_O1_MINI`      |     13 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `SUPPORTED_MODEL_OPENAI_AUTO`         |     23 | SUPPORTED\_MODEL\_OPENAI\_AUTO flags a request as OpenAI-bound without encoding a specific model slug. The actual model is chosen by the client (today: native Codex via \~/.codex/config.toml) and captured from the upstream Responses-API response.model field for metering and rate-card lookup. This keeps the proto stable across OpenAI model-catalog churn. Reserved numbers 24-30 are intentionally left free for future OpenAI routing sentinels if we ever need to distinguish sub-families. |
</Accordion>
