Registry /
llm-agents / llama-index-embeddings-cohere
Install & Compatibility
Where this runs
tested against v0.8.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 5.678s · 309.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 21.7s · import 5.202s · 290MB
313MB installed
● package 313MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CohereEmbedding
✓ from llama_index.embeddings.cohere import CohereEmbedding
Correct import path as of version 0.8.0
CohereEmbedding
✓ from llama_index.embeddings.cohere import CohereEmbedding
✗ from llama_index import CohereEmbedding
Direct import from llama_index package not supported; must use submodule path
Initialize Cohere embedding model, get a sample embedding.
import os
from llama_index.embeddings.cohere import CohereEmbedding
embed_model = CohereEmbedding(
api_key=os.environ.get("COHERE_API_KEY", ""),
model_name="embed-english-v3.0",
input_type="search_query",
)
print(embed_model.get_text_embedding("Hello world!")[:5])
Errors
Common errors & fixes
ImportError: cannot import name 'CohereEmbedding' from 'llama_index'
Incorrect import path; trying to import directly from the top-level `llama_index` package.
fixUse `from llama_index.embeddings.cohere import CohereEmbedding`.
cohere.core.api_error.ApiError: status_code: 400, body: {'message': 'input_type is required'}
Missing `input_type` parameter when using Cohere embedding models that require it (e.g., embed-english-v3.0).
fixPass `input_type` to the embedding call or during initialization.
TypeError: __init__() got an unexpected keyword argument 'embed_batch_size'
The `embed_batch_size` parameter was removed in newer versions of this library.
fixRemove `embed_batch_size` from the constructor arguments.
Upgrade
Version history
0.8.0latest on PyPI · released Mar 12, 2026
Audit
Dependencies
llama-index-coreoptionalRequired for base abstractions and embedding interface
cohererequiredOfficial Cohere Python SDK to interact with Cohere API