For the complete documentation index, see llms.txt. This page is also available as Markdown.

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. 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.


What you will learn in this topic

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


Before you begin

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 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.

  • Authentication credentials: For Personal Token or Bedrock API Key, store the corresponding API key as a Harness text secret. 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 for more information on permissions.


Supported models

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

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

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 to configure IAM role or OIDC authentication.

GCP Connector

Go to Connect to Google Cloud Platform to configure inherited delegate credentials or OIDC authentication.

Azure Connector

Go to Add a Microsoft Azure connector 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
Anthropic connector using Cloud Provider authentication with an AWS connector and the global.anthropic.claude-sonnet-4-6 model

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 to follow the full connector setup, and Use the LiteLLM connector in a Worker Agent to configure the agent.


Runtime model override

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

Last updated

Was this helpful?