---
title: agent | CodeWeaver Docs
description: API reference for codeweaver.providers.config.clients.agent
url: "https://docs.knitli.com/api/providers/config/clients/agent"
type: static
generatedAt: "2026-04-17T17:21:08.793Z"
---

# agent
       [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fclients%2Fagent%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fclients%2Fagent%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[View in Markdown](/codeweaver/api/providers/config/clients/agent.md)       [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fclients%2Fagent%2F)[Share on X](https://x.com/intent/tweet?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fclients%2Fagent%2F&text=agent)[Share on Threads](https://threads.net/intent/post?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fclients%2Fagent%2F&text=agent)[Share on Bluesky](https://bsky.app/intent/compose?text=agent%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fclients%2Fagent%2F)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fclients%2Fagent%2F)[Share on Reddit](https://reddit.com/submit?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fclients%2Fagent%2F&title=agent)[Share on Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fclients%2Fagent%2F&t=agent)[Share on Email](mailto:?subject=agent&body=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fclients%2Fagent%2F)[Share on WhatsApp](https://wa.me/?text=agent%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fclients%2Fagent%2F)[Share on Telegram](https://t.me/share/url?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fclients%2Fagent%2F&text=agent)
# `codeweaver.providers.config.clients.agent`
[Section titled “codeweaver.providers.config.clients.agent”](#codeweaverprovidersconfigclientsagent)
Client Options for Agent-based Providers.

## Class: `AnthropicAzureClientOptions`
[Section titled “Class: AnthropicAzureClientOptions”](#class-anthropicazureclientoptions)
Client options for Anthropic agents on Azure Foundry.

## Class: `AnthropicBedrockClientOptions`
[Section titled “Class: AnthropicBedrockClientOptions”](#class-anthropicbedrockclientoptions)
Client options for Anthropic agents on Bedrock runtime.

These differ from the standard AWS SDK options because Anthropic’s client uses different variable names, which it converts to the standard AWS variable names internally. For example, `aws_secret_key` instead of `aws_secret_access_key`.

## Class: `AnthropicClientOptions`
[Section titled “Class: AnthropicClientOptions”](#class-anthropicclientoptions)
Client options for Anthropic-based embedding providers.

## Class: `AnthropicGoogleVertexClientOptions`
[Section titled “Class: AnthropicGoogleVertexClientOptions”](#class-anthropicgooglevertexclientoptions)
Client options for Anthropic agents on Google Vertex AI runtime.

## Class: `BaseAnthropicClientOptions`
[Section titled “Class: BaseAnthropicClientOptions”](#class-baseanthropicclientoptions)
Base client options for Anthropic-based providers.

## Class: `GroqClientOptions`
[Section titled “Class: GroqClientOptions”](#class-groqclientoptions)
Client options for Groq-based agent providers.

## Class: `OpenAIAgentClientOptions`
[Section titled “Class: OpenAIAgentClientOptions”](#class-openaiagentclientoptions)
Client options for OpenAI-based agent providers.

### Method: `computed_base_url`
[Section titled “Method: computed_base_url”](#method-computed_base_url)

**

```
computed_base_url()
```

Return the default base URL for the OpenAI agent client based on the provider.

## Class: `PydanticGatewayClientOptions`
[Section titled “Class: PydanticGatewayClientOptions”](#class-pydanticgatewayclientoptions)
Client options for Pydantic Gateway-based agent providers.

Pydantic Gateway is a proxy service that routes requests to various upstream LLM providers. It isn’t actually a client itself, but we treat it like one for the purposes of configuration. In reality, your options here configure how Pydantic-AI connects to the Pydantic Gateway, and which upstream provider it uses.

In practice, these values are passed to a factory function in Pydantic-AI that creates the *client and provider* instances based on the upstream provider selected.

## Providing Provider-Specific Options
[Section titled “Providing Provider-Specific Options”](#providing-provider-specific-options)
If you want to define provider-specific options, like for Cohere or OpenAI, you **should not use this class**. Instead:

 - Use the provider’s options class directly (e.g., `CohereClientOptions` or `OpenAIClientOptions`).
 - Set the base_url (or equivalent) to point to your Pydantic Gateway region.
 - Provide your Pydantic Gateway API key in the `api_key` field.
 - **Set your provider as the upstream_provider**.

In practice these steps do what pydantic’s factory function does, but gives you more customization.

If you use this class and set Pydantic Gateway as your provider, you can still provide provider-specific ModelConfig settings. These will be passed through to the upstream provider by Pydantic Gateway.

### Method: `as_settings`
[Section titled “Method: as_settings”](#method-as_settings)

**

```
as_settings()
```

Return the client options as a dictionary suitable for passing as settings to the client constructor.

## Class: `XAIClientOptions`
[Section titled “Class: XAIClientOptions”](#class-xaiclientoptions)
Client options for X_AI-based providers.

## Function: `discriminate_anthropic_agent_client_options`
[Section titled “Function: discriminate_anthropic_agent_client_options”](#function-discriminate_anthropic_agent_client_options)

**

```
discriminate_anthropic_agent_client_options()
```

Identify the Anthropic agent provider settings type for discriminator field.