> 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-ai/use-harness-ai/connect-with-ai.md).

# Connect with AI

Select and configure the right model connector for your Harness AI Worker Agents.

Model connectors enable Harness AI Worker Agents to access large language models (LLMs) from Anthropic and OpenAI. Choose the connector that matches your AI model provider and configure it to run autonomous agents inside your pipelines.

Anthropic and OpenAI model connectors support **Cloud Provider** authentication through existing AWS, GCP, and Azure connectors. Reuse the cloud connector's IAM role, OpenID Connect (OIDC), or other supported authentication method to obtain model access credentials. You can also use an OpenAI connector with a hosted LiteLLM OpenAI-compatible endpoint.

***

### 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 available model connector options](#available-model-connectors).
* [Select the right connector for your use case](#choose-a-connector).
* [Configure your chosen model connector](#configure-your-connector).

***

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

Before you configure a model connector, ensure you have the following:

* **Harness AI enabled**: Harness AI must be active for your account. Go to [Overview](/harness-ai/use-harness-ai/harness-ai.md#enable-ai) for more information on activating Harness AI.
* **Model access**: An API key for your chosen model provider or LiteLLM server, or an AWS, GCP, or Azure connector configured with credentials and permissions for model access.
* **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.

***

### Available model connectors <a href="#available-model-connectors" id="available-model-connectors"></a>

Harness AI supports three model connector types to access different LLM providers.

#### Anthropic Model Connector <a href="#anthropic-model-connector" id="anthropic-model-connector"></a>

Connect to Claude models using an Anthropic API key, a Bedrock API key, or cloud provider connector authentication.

**Supported models**:

* Claude Opus (latest)
* Claude Sonnet (latest)
* Claude Haiku (latest)

**Connection methods**:

* Direct Anthropic API
* AWS Bedrock (cross-region inference profiles supported)
* Cloud provider authentication through an AWS, GCP, or Azure connector

**Best for**: Teams using Claude models for Worker Agents, especially those with AWS Bedrock infrastructure.

Go to [Anthropic Model Connector](/harness-ai/use-harness-ai/connect-with-ai/anthropic-model-connector.md) for more information on configuration steps.

#### Anthropic Connector (OAuth) <a href="#anthropic-connector-oauth" id="anthropic-connector-oauth"></a>

Connect to Claude.ai using OAuth authentication for direct access to Anthropic hosted models.

**Authentication method**:

* OAuth 2.0 with Claude.ai

**Best for**: Teams who prefer OAuth authentication and direct access to Claude.ai without managing API keys.

Go to [Anthropic Connector](/harness-ai/use-harness-ai/connect-with-ai/anthropic-harness-connector.md) for more information on configuration steps.

#### OpenAI Model Connector <a href="#openai-model-connector" id="openai-model-connector"></a>

Connect to GPT models with configurable reasoning effort levels.

Authenticate with an API key or an AWS, GCP, or Azure cloud provider connector. For LiteLLM, configure the server URL, API key, and exact model name using the [LiteLLM setup](/harness-ai/use-harness-ai/connect-with-ai/openai-model-connector.md#litellm-connector-configuration).

**Supported models**:

* GPT-5.5 with reasoning effort configuration

**Reasoning effort levels**:

* Low
* Medium
* High

**Best for**: Teams using OpenAI GPT models with specific reasoning requirements for complex tasks.

Go to [OpenAI Model Connector](/harness-ai/use-harness-ai/connect-with-ai/openai-model-connector.md) for more information on configuration steps.

***

### Choose a connector <a href="#choose-a-connector" id="choose-a-connector"></a>

Select your model connector based on your infrastructure, model preference, and authentication requirements.

#### Decision criteria <a href="#decision-criteria" id="decision-criteria"></a>

Consider these factors when choosing a connector.

**Infrastructure**:

* Do you have existing AWS Bedrock infrastructure? Use Anthropic Model Connector with Bedrock.
* Do you prefer direct API access? Use Anthropic Model Connector or OpenAI Model Connector.
* Do you need OAuth authentication? Use Anthropic Connector (OAuth).

**Model preference**:

* Need Claude models (Opus, Sonnet, Haiku)? Use Anthropic Model Connector or Anthropic Connector (OAuth).
* Need GPT models with reasoning effort control? Use OpenAI Model Connector.
* Need cross-region model access via Bedrock? Use Anthropic Model Connector with inference profiles.

**Authentication**:

* API key management: Anthropic Model Connector or OpenAI Model Connector.
* OAuth 2.0: Anthropic Connector (OAuth).
* IAM roles or OIDC: Anthropic Model Connector or OpenAI Model Connector with **Cloud Provider** authentication, referencing an existing AWS, GCP, or Azure connector.

**Cost and billing**:

* AWS consolidated billing: Anthropic Model Connector with Bedrock.
* Direct provider billing: Anthropic Model Connector (direct API) or OpenAI Model Connector.
* Claude.ai subscription: Anthropic Connector (OAuth).

***

### Configure your connector <a href="#configure-your-connector" id="configure-your-connector"></a>

Once you have chosen a connector type, follow the configuration steps for your selected provider.

#### Configuration steps <a href="#configuration-steps" id="configuration-steps"></a>

1. Navigate to **Connectors** in your Harness project, organization, or account settings.
2. Search for your chosen connector type in the connector catalog.
3. Follow the provider-specific configuration steps:
   * [Anthropic Model Connector configuration](/harness-ai/use-harness-ai/connect-with-ai/anthropic-model-connector.md)
   * [OpenAI Model Connector configuration](/harness-ai/use-harness-ai/connect-with-ai/openai-model-connector.md)
   * [Anthropic Connector (OAuth) configuration](/harness-ai/use-harness-ai/connect-with-ai/anthropic-harness-connector.md)

#### Common configuration elements <a href="#common-configuration-elements" id="common-configuration-elements"></a>

All model connectors require the following configuration elements.

* **Connector name**: Unique identifier for the connector.
* **Authentication credentials**: API key, OAuth token, or a reference to a cloud provider connector configured with IAM role, OIDC, or other supported credentials.
* **Default model selection**: Choose the default model for Worker Agents using this connector.

***

### Configure Model Connectors <a href="#configure-model-connectors" id="configure-model-connectors"></a>

The Model Connector defines the LLM provider and default model for your Worker Agent. When you create or select a connector, you choose a default model that the agent uses at runtime unless overridden by the optional **Model Name** field.

Harness supports the following Model Connectors:

* **Anthropic Model Connector**: Run agents on Claude models using API key or AWS, GCP, or Azure cloud provider connector authentication. Go to [Anthropic Model Connector](/harness-ai/use-harness-ai/connect-with-ai/anthropic-model-connector.md) to review supported models and setup options.
* **OpenAI Model Connector**: Run agents using API key or AWS, GCP, or Azure cloud provider connector authentication, or connect to LiteLLM. Go to [OpenAI Model Connector](/harness-ai/use-harness-ai/connect-with-ai/openai-model-connector.md) to review supported models, effort levels, and setup options.

If you do not have access to a model provider, Harness offers a managed LLM connector you can use instead.

***

### Managed connector option <a href="#managed-connector-option" id="managed-connector-option"></a>

Harness offers a managed LLM connector for teams without their own model provider access.

{% hint style="info" %}
**MANAGED CONNECTOR BILLING**

Until August 2026, usage of the Harness-managed LLM connector is included in your Harness subscription at no additional cost. After August 2026, Harness bills managed LLM connector usage separately, in addition to your Harness subscription.
{% endhint %}

**When to use**:

* Evaluating Harness AI Worker Agents.
* No existing model provider relationship.
* Want simplified setup without managing API keys.

***

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

* [Worker Agents](/harness-ai/use-harness-ai/core-capabilities/in-your-pipelines/worker-agent.md): Create AI-powered agents that use your configured model connector.
* [DevOps Agent](/harness-ai/3.0/use-harness-ai/ai-agents/devops-agent.md): Use AI to create and manage pipelines.

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