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

# providers
       [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fproviders%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%2Fproviders%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[View in Markdown](/codeweaver/api/providers/config/providers.md)       [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fproviders%2F)[Share on X](https://x.com/intent/tweet?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fproviders%2F&text=providers)[Share on Threads](https://threads.net/intent/post?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fproviders%2F&text=providers)[Share on Bluesky](https://bsky.app/intent/compose?text=providers%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fproviders%2F)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fproviders%2F)[Share on Reddit](https://reddit.com/submit?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fproviders%2F&title=providers)[Share on Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fproviders%2F&t=providers)[Share on Email](mailto:?subject=providers&body=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fproviders%2F)[Share on WhatsApp](https://wa.me/?text=providers%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fproviders%2F)[Share on Telegram](https://t.me/share/url?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fconfig%2Fproviders%2F&text=providers)
# `codeweaver.providers.config.providers`
[Section titled “codeweaver.providers.config.providers”](#codeweaverprovidersconfigproviders)
Models and TypedDict classes for provider and AI (embedding, sparse embedding, reranking, agent) model settings.

The overall pattern:

 - Each potential provider client (the actual client class, e.g., OpenAIClient) has a corresponding ClientOptions class (e.g., OpenAIClientOptions).
 - There is a baseline provider settings model, `BaseProviderCategorySettings`. Each provider type (embedding, data, vector store, etc.) has a corresponding settings model that extends `BaseProviderCategorySettings` (e.g., `EmbeddingProviderSettings`). These are mostly almost identical, but the class distinctions make identification easier and improves clarity.
 - Certain providers with unique settings requirements can define a mixin class that provides the additional required settings. Note that these should not overlap with the client options for the provider.
 - A series of discriminators help with identifying the correct client options and provider settings classes based on the provider and other settings.

## Class: `DeterminedDefaults`
[Section titled “Class: DeterminedDefaults”](#class-determineddefaults)
Tuple for determined default embedding settings.

## Class: `ProviderNameMap`
[Section titled “Class: ProviderNameMap”](#class-providernamemap)
Configured providers by category.

## Class: `ProviderSettings`
[Section titled “Class: ProviderSettings”](#class-providersettings)
Settings for provider configuration.

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

**

```
coerce_provider_fields_to_tuples()
```

Normalize provider category fields before field validation.

When provider settings arrive from TOML configs or pydantic-settings source merging, they may be bare dicts instead of sequences and may lack discriminator fields needed by pydantic’s tagged unions. This validator wraps non-sequences and injects missing discriminator fields.

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

**

```
has_auth_configured()
```

Check if API key or TLS certs are set for the provider through settings or environment.

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

**

```
has_setting()
```

Check if a specific provider setting is configured.

Args: setting_name: The name of the setting or ProviderCategory to check.

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

**

```
settings_for_category()
```

Get the settings for a specific provider category.

Args: category: The category of provider or ProviderCategory to get settings for. primary: Whether to return the primary settings or all settings. backup: Whether to return the backup settings instead of the primary.

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

**

```
settings_for_provider()
```

Get the settings for a specific provider.

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

**

```
validate_and_normalize_providers()
```

Validate and normalize provider settings after initialization.

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

**

```
validate_embedding_configuration()
```

Validate embedding configuration and log the selected mode.

Returns: Self for method chaining.

## Class: `ProviderSettingsDict`
[Section titled “Class: ProviderSettingsDict”](#class-providersettingsdict)
A dictionary representation of provider settings.

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

**

```
merge_agent_model_settings()
```

A convenience re-export of `merge_model_settings` for agent model settings.