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

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

## Class: `BaseEmbeddingConfig`
[Section titled “Class: BaseEmbeddingConfig”](#class-baseembeddingconfig)
Base configuration for embedding models.

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

**

```
as_vector_params()
```

Get Qdrant VectorParams for this embedding configuration.

Returns: VectorParams instance with dimension and datatype set.

## Class: `BedrockCohereConfigDict`
[Section titled “Class: BedrockCohereConfigDict”](#class-bedrockcohereconfigdict)
Configuration options specific to Bedrock Cohere embedding models.

## Class: `BedrockEmbeddingConfig`
[Section titled “Class: BedrockEmbeddingConfig”](#class-bedrockembeddingconfig)
Configuration options for Bedrock embedding models.

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

**

```
set_datatype()
```

Set the embedding datatype explicitly in the embedding configuration.

Args: datatype: The datatype to set.

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

**

```
set_dimension()
```

Set the embedding dimension explicitly in the embedding configuration.

Args: dimension: The dimension to set.

## Class: `BedrockEmbeddingRequestParams`
[Section titled “Class: BedrockEmbeddingRequestParams”](#class-bedrockembeddingrequestparams)
Parameters for Bedrock embedding requests.

## Class: `BedrockTitanV2ConfigDict`
[Section titled “Class: BedrockTitanV2ConfigDict”](#class-bedrocktitanv2configdict)
Configuration options specific to the Bedrock Titan V2 embedding model.

## Class: `CohereEmbeddingConfig`
[Section titled “Class: CohereEmbeddingConfig”](#class-cohereembeddingconfig)
Configuration options for Cohere embedding models.

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

**

```
set_datatype()
```

Set the embedding datatype explicitly in the embedding configuration.

Args: datatype: The datatype to set.

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

**

```
set_dimension()
```

Set the embedding dimension explicitly in the embedding configuration.

Args: dimension: The dimension to set.

## Class: `CohereEmbeddingOptionsDict`
[Section titled “Class: CohereEmbeddingOptionsDict”](#class-cohereembeddingoptionsdict)
Embedding request options for Cohere embedding API.

These parameters are passed to the embed() method.

## Class: `EmbeddingMixin`
[Section titled “Class: EmbeddingMixin”](#class-embeddingmixin)
Mixin class for dense and sparse embedding configurations. Provides shared methods and interfaces for both types of embedding configurations.

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

**

```
as_options()
```

Return the configuration as a dictionary of options.

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

**

```
get_datatype()
```

Get resolved datatype through fallback chain.

Resolution order:

 1. Explicit config
 1. Model capabilities
 1. Provider-specific defaults

Returns: Resolved datatype or None

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

**

```
get_datatype_sync()
```

Synchronous version of get_datatype() for backward compatibility.

Note: This does not perform full resolution like the async version. For full resolution, use get_datatype() directly.

Returns: Resolved datatype

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

**

```
get_dimension()
```

Get resolved dimension through fallback chain.

Resolution order:

 1. Explicit config (self.embedding/self.query fields)
 1. Model capabilities (from capability resolver)
 1. User-registered defaults
 1. Hardcoded fallback

Returns: Resolved dimension or 0 if sparse embeddings

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

**

```
get_dimension_sync()
```

Synchronous version of get_dimension() for backward compatibility.

Note: This does not perform full resolution like the async version. For full resolution, use get_dimension() directly.

Returns: Resolved dimension or None

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

**

```
mirror_settings()
```

If the types for embedding and query are the same, mirrors settings between them with deep merge. If updates are provided, overrides resolved settings with the updates.

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

**

```
set_datatype()
```

Set the embedding datatype explicitly in the embedding configuration.

## Class: `FastEmbedEmbeddingConfig`
[Section titled “Class: FastEmbedEmbeddingConfig”](#class-fastembedembeddingconfig)
Configuration options for FastEmbed embedding models.

FastEmbed has no specific embedding parameters. It does pass kwargs on to the ONNX model, but they are the same keys/values as `FastEmbedClientOptions`, and are combined internally in FastEmbed. So, these are empty dicts and we recommend you set configs using `FastEmbedClientOptions` instead of these fields, but we include them here for consistency and future extensibility.

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

**

```
set_datatype()
```

Set the embedding datatype explicitly in the embedding configuration.

Args: datatype: The datatype to set.

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

**

```
set_dimension()
```

Set the embedding dimension explicitly in the embedding configuration.

Args: dimension: The dimension to set.

## Class: `GoogleEmbeddingConfig`
[Section titled “Class: GoogleEmbeddingConfig”](#class-googleembeddingconfig)
Configuration options for Google embedding models.

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

**

```
set_datatype()
```

Set the embedding datatype explicitly in the embedding configuration.

Args: datatype: The datatype to set.

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

**

```
set_dimension()
```

Set the embedding dimension explicitly in the embedding configuration.

Args: dimension: The dimension to set.

## Class: `GoogleEmbeddingRequestParams`
[Section titled “Class: GoogleEmbeddingRequestParams”](#class-googleembeddingrequestparams)
Parameters for Google embedding requests.

## Class: `HuggingFaceEmbeddingConfig`
[Section titled “Class: HuggingFaceEmbeddingConfig”](#class-huggingfaceembeddingconfig)
Configuration options for HuggingFace embedding models.

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

**

```
set_datatype()
```

Set the embedding datatype explicitly in the embedding configuration.

Args: datatype: The datatype to set.

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

**

```
set_dimension()
```

Set the embedding dimension explicitly in the embedding configuration.

Args: dimension: The dimension to set.

## Class: `HuggingFaceEmbeddingOptionsDict`
[Section titled “Class: HuggingFaceEmbeddingOptionsDict”](#class-huggingfaceembeddingoptionsdict)
Embedding request options for HuggingFace embedding API.

These parameters are passed to the embedding generation method (e.g., pipeline or client method).

## Class: `MistralEmbeddingConfig`
[Section titled “Class: MistralEmbeddingConfig”](#class-mistralembeddingconfig)
Configuration options for Mistral AI embedding models.

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

**

```
set_dimension()
```

Set the embedding dimension explicitly in the embedding configuration.

Args: dimension: The dimension to set.

## Class: `MistralEmbeddingOptionsDict`
[Section titled “Class: MistralEmbeddingOptionsDict”](#class-mistralembeddingoptionsdict)
Embedding request options for Mistral AI embedding API.

These parameters are passed to the embeddings.create() method.

## Class: `OpenAIEmbeddingConfig`
[Section titled “Class: OpenAIEmbeddingConfig”](#class-openaiembeddingconfig)
Configuration options for OpenAI and OpenAI-compatible embedding models.

Supports OpenAI, Azure OpenAI, Ollama, Fireworks, Together AI, GitHub Models, Groq, and other OpenAI-compatible providers.

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

**

```
set_datatype()
```

Set the embedding datatype explicitly in the embedding configuration.

Args: datatype: The datatype to set.

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

**

```
set_dimension()
```

Set the embedding dimension explicitly in the embedding configuration.

Args: dimension: The dimension to set.

## Class: `OpenAIEmbeddingRequestParams`
[Section titled “Class: OpenAIEmbeddingRequestParams”](#class-openaiembeddingrequestparams)
Parameters for OpenAI-compatible embedding requests.

These parameters work across all OpenAI-compatible providers including Azure OpenAI, Ollama, Fireworks, Together AI, GitHub Models, and Groq.

## Class: `SentenceTransformersEmbeddingConfig`
[Section titled “Class: SentenceTransformersEmbeddingConfig”](#class-sentencetransformersembeddingconfig)
Configuration options for Sentence Transformers embedding models.

Note: Sentence Transformers receives model kwargs through its client constructor. Provide model options to the `model_kwargs` field in `SentenceTransformersClientOptions`.

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

**

```
set_datatype()
```

Set the embedding datatype explicitly in the embedding configuration.

Args: datatype: The datatype to set.

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

**

```
set_dimension()
```

Set the embedding dimension explicitly in the embedding configuration.

Args: dimension: The dimension to set.

## Class: `SentenceTransformersEncodeDict`
[Section titled “Class: SentenceTransformersEncodeDict”](#class-sentencetransformersencodedict)
Parameters for the SentenceTransformer encode() method.

## Class: `SerializedEmbeddingOptionsDict`
[Section titled “Class: SerializedEmbeddingOptionsDict”](#class-serializedembeddingoptionsdict)
A dictionary representing serialized embedding options for different providers.

## Class: `VoyageEmbeddingConfig`
[Section titled “Class: VoyageEmbeddingConfig”](#class-voyageembeddingconfig)
Configuration options for Voyage AI embedding models.

## Class: `VoyageEmbeddingOptionsDict`
[Section titled “Class: VoyageEmbeddingOptionsDict”](#class-voyageembeddingoptionsdict)
Parameters for Voyage AI embedding requests.