> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/use-harness-ai/connect-with-ai/anthropic-model-connector.md).

# Anthropic Model Connector

Configure Claude access for Harness Worker Agents with API keys or AWS, GCP, and Azure cloud provider connectors, including IAM roles and OIDC.

The Anthropic Model Connector defines Claude as the LLM provider and default model for your [Worker Agents](/harness-platform/use-harness-ai/core-capabilities/in-your-pipelines/worker-agent.md). Authenticate with an Anthropic API key, a Bedrock API key, or an existing AWS, GCP, or Azure cloud provider connector.

If your Claude models are exposed through a LiteLLM OpenAI-compatible endpoint, use the [OpenAI Model Connector setup for LiteLLM](/harness-platform/use-harness-ai/connect-with-ai/openai-model-connector.md#litellm-connector-configuration).

***

### What you will learn in this topic <a href="#what-you-will-learn-in-this-topic" id="what-you-will-learn-in-this-topic"></a>

By the end of this topic, you will be able to:

* [Understand which Claude models the connector supports](#supported-models).
* [Choose an authentication method and configure the default model](#connector-configuration).
* [Use cloud provider connectors with IAM roles or OIDC](#cloud-provider-authentication).
* [Use Claude through a LiteLLM OpenAI-compatible endpoint](#claude-through-litellm).
* [Override the default model at runtime](#runtime-model-override).
* [Use the Harness-managed connector if you do not have model access](#harness-managed-connector).

***

### Before you begin <a href="#before-you-begin" id="before-you-begin"></a>

Before you configure the Anthropic Model Connector, ensure you have the following:

* **Harness AI enabled**: Harness AI must be active for your account. Go to [Overview](/harness-platform/use-harness-ai/harness-ai.md#enable-ai) for more information on activating Harness AI.
* **Model provider access**: Access to the Claude models you intend to use through your selected provider. For LiteLLM, use the server, model, and API key prerequisites in the [LiteLLM setup](/harness-platform/use-harness-ai/connect-with-ai/openai-model-connector.md#litellm-connector-configuration).
* **Authentication credentials**: For **Personal Token** or **Bedrock API Key**, store the corresponding API key as a [Harness text secret](/harness-platform/use-harness-platform/secrets/add-use-text-secrets.md). For **Cloud Provider**, configure an AWS, GCP, or Azure connector with the roles and permissions needed for model access.
* **Cloud connector access**: When you use **Cloud Provider**, you must have permission to use the referenced connector.
* **Connector permissions**: Permission to create and manage connectors in your Harness project. Go to [RBAC in Harness](/harness-platform/3.0/harness-platform-resources/platform-access-control/rbac-in-harness.md) for more information on permissions.

***

### Supported models <a href="#supported-models" id="supported-models"></a>

The Anthropic Model Connector supports the following Claude models. Select the model that best fits your Worker Agent use case based on complexity, speed, and cost requirements.

| Model             | Description                                         |
| ----------------- | --------------------------------------------------- |
| Claude Opus 4.8   | Latest and most capable model for complex reasoning |
| Claude Opus 4.7   | High-capability model for complex reasoning         |
| Claude Opus 4.6   | High-capability model for complex reasoning         |
| Claude Sonnet 4.6 | Fast, high-capability model for most tasks          |
| Claude Sonnet 4.5 | Previous-generation fast model                      |
| Claude Haiku 4.5  | Lightweight, low-latency model for simple tasks     |

***

### Connector configuration <a href="#connector-configuration" id="connector-configuration"></a>

In the connector **Details** step, select an **Authentication** method:

| Authentication option | Configuration                                                                                                                                                                                        |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Personal Token**    | Use an Anthropic API key stored as a Harness secret for direct Anthropic access.                                                                                                                     |
| **Bedrock API Key**   | Use an Amazon Bedrock API key stored as a Harness secret and configure the region for your model.                                                                                                    |
| **Cloud Provider**    | Reference an existing **AWS Connector**, **GCP Connector**, or **Azure Connector** to obtain credentials through its configured authentication method, including IAM roles or OpenID Connect (OIDC). |

![Anthropic connector Authentication menu showing Personal Token, Bedrock API Key, and Cloud Provider](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-5645f1ffa691da96643dc8932b2cab936839df95%2Fanthropic-connector-authentication-options.png?alt=media)

After you configure authentication, set the default **Model Name**. Complete the connectivity setup and connection test, then save the connector.

### Cloud provider authentication

Select **Cloud Provider** to reuse authentication from an existing Harness cloud provider connector. Harness uses that connector to obtain credentials for model access. Configure IAM roles, OIDC federation, or other supported credentials on the cloud provider connector before referencing it from the Anthropic connector.

Use the setup guide for your cloud provider:

| Cloud provider selection | Credential setup                                                                                                                                                                                                        |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **AWS Connector**        | Go to [Add an AWS connector](/harness-platform/use-harness-platform/connectors/cloud-providers/add-aws-connector.md) to configure IAM role or OIDC authentication.                                                      |
| **GCP Connector**        | Go to [Connect to Google Cloud Platform](/harness-platform/use-harness-platform/connectors/cloud-providers/connect-to-google-cloud-platform-gcp.md) to configure inherited delegate credentials or OIDC authentication. |
| **Azure Connector**      | Go to [Add a Microsoft Azure connector](/harness-platform/use-harness-platform/connectors/cloud-providers/add-a-microsoft-azure-connector.md) to configure managed identity or OIDC authentication.                     |

The referenced connector must have the cloud permissions required to access your selected model.

To use the cloud provider connector:

1. In **Authentication**, select **Cloud Provider**.
2. In **Select Cloud Provider**, choose **AWS Connector**, **GCP Connector**, or **Azure Connector**.
3. In **Connector**, select the existing Harness connector for that provider.
4. In **Model Name**, select or enter the model identifier for your provider. For example, the AWS configuration below uses `global.anthropic.claude-sonnet-4-6`.
5. Select **Continue** to configure connectivity.
6. Complete the connection test and save the connector.

![Anthropic connector cloud provider menu showing AWS Connector, GCP Connector, and Azure Connector](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-2203b5b0152f680f7354918ac89ecafc38a2c77e%2Fanthropic-connector-cloud-providers.png?alt=media)

![Anthropic connector using Cloud Provider authentication with an AWS connector and the global.anthropic.claude-sonnet-4-6 model](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-ce3dfa5be981a890cba61f4e0df65a5f3a0ade45%2Fanthropic-connector-aws-configuration.png?alt=media)

***

### Claude through LiteLLM

To use a Claude model configured on a LiteLLM server through its OpenAI-compatible API, create an **OpenAI** connector that points to the LiteLLM endpoint. LiteLLM routes the requests to the model configured on your server.

Configure the connector with these values:

* **URL**: Your hosted LiteLLM URL with `/v1` appended, such as `https://litellm.example.com/v1`.
* **API Key**: A Harness secret containing the LiteLLM API key authorized to access the model.
* **Model Name**: The exact model name configured on the LiteLLM server for your Claude model.

Select this connector as the Worker Agent **Model Provider**. In the agent **YAML** tab, explicitly set `with.backend` to `openai` under `agent`, even when LiteLLM routes requests to Claude. **Note**: This is a required manual setting for the OpenAI-compatible LiteLLM flow.

Go to [LiteLLM connector configuration](/harness-platform/use-harness-ai/connect-with-ai/openai-model-connector.md#litellm-connector-configuration) to follow the full connector setup, and [Use the LiteLLM connector in a Worker Agent](/harness-platform/use-harness-ai/connect-with-ai/openai-model-connector.md#use-the-litellm-connector-in-a-worker-agent) to configure the agent.

***

### Runtime model override <a href="#runtime-model-override" id="runtime-model-override"></a>

Override the connector default model on individual Worker Agents to use different Claude models for specific tasks.

Each Worker Agent uses the default model configured on the connector unless you set the optional **Model Name** field on the agent. For Anthropic connectors, the **Model Name** field also accepts an AWS Bedrock inference profile ARN, for example `arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/a1b2c3d4e5f6`.

***

### Next steps <a href="#next-steps" id="next-steps"></a>

* [Worker Agents](/harness-platform/use-harness-ai/core-capabilities/in-your-pipelines/worker-agent.md): Create and configure agents that use this connector.
* [OpenAI Model Connector](/harness-platform/use-harness-ai/connect-with-ai/openai-model-connector.md): Configure OpenAI as your model provider.

{% @harness-feedback/feedback module="harness-ai" pagePath="harness-ai/use-harness-ai/connect-with-ai/anthropic-model-connector" %}
