---
agentTools:
  projectIndex: https://developers.pipefy.com/llms.txt
---

# Update LLM Provider

Update the name or configuration of an existing Large Language Model (LLM) provider.

## Before You Begin

🔗 **Use the [GraphQL Playground](https://app.pipefy.com/graphiql)** to execute the mutations in this guide.

➡️ **New to GraphQL?** Learn how to navigate the Playground with our **[Playground Basics Guide](https://developers.pipefy.com/reference/exploring-the-playground)**.

## Prerequisites

1. **Authentication**: Use a [Service Account token](https://developers.pipefy.com/reference/service-accounts).
2. **Permissions**: You must have permissions to `manage AI providers` in the organization.
3. **Organization UUID**: The UUID of the organization where the provider exists.
4. **LLM Provider ID**: The ID of the provider configuration you wish to update. You can get this ID from the `llmProvidersByOrganization` query.

## Step 1: Execute the Mutation

This mutation allows you to modify an existing LLM provider's details, such as its name or its configuration settings.

```graphql
mutation {
  updateLlmProvider(
    input: {
      id: "27"
      organizationUuid: "org-uuid-example"
      name: "OpenAI GPT-4o (Updated)"
      configuration: {
        provider: "openai"
        openai_api_key: "sk-your-new-secret-key"
        model_name: "gpt-4o"
      }
    }
  ) {
    llmProvider {
      id
      name
      configuration
    }
  }
}
```

### Arguments

* **`id`** *(ID, required)*: The ID of the LLM provider configuration to update.
* **`organizationUuid`** *(String, required)*: The UUID of the target organization.
* **`configuration`** *(JSON, required)*: An object containing the provider's new settings. All required configuration keys must be provided.
* **`name`** *(String, optional)*: The new descriptive name for the provider configuration.

## Response Fields

* **`llmProvider`**: The updated LLM provider object, containing:
  * **`id`**: The unique ID of the provider configuration.
  * **`name`**: The newly updated name.
  * **`configuration`**: The updated configuration details.

## Example Response

```json
{
  "data": {
    "updateLlmProvider": {
      "llmProvider": {
        "id": "27",
        "name": "OpenAI GPT-4o (Updated)",
        "configuration": {
          "provider": "openai",
          "model_name": "gpt-4o"
        }
      }
    }
  }
}
```

## Additional Notes

* If the mutation fails due to an invalid `id`, incorrect `organizationUuid`, or lack of permissions, an error will be returned.
* When updating the `configuration`, the entire configuration object must be passed. The system does not perform a partial merge.
* For security, sensitive fields like `openai_api_key` are accepted in the input but will not be returned in the response.

> **This mutation provides a straightforward way to modify and maintain your LLM provider configurations.**