v2.23.0: Cohere provider (LLM, Embedding, Reranker)
Added
Cohere provider (LLM, Embedding, Reranker) — #110
Cohere is now a first-class provider across three capabilities, integrated via its native v2 API (/v2/chat, /v2/embed, /v2/rerank) rather than an OpenAI-compatible profile — its differentiators (documents-based RAG, citations, input_type embeddings, native tool format) aren't exposed on the compatibility endpoint. Pure HTTP via httpx, auth shared via COHERE_API_KEY.
- LLM —
AIFactory.create_language("cohere", "command-a-03-2025"): chat, streaming, and tool calling. Esperanto'stop_pmaps to Cohere'sp. Cohere-specific RAG fields (documents,citation_options,connectors) pass through viaconfigwithout changing the universalchat_completesurface; returned citations are not surfaced onChatCompletionin this version (out of scope). - Embedding —
AIFactory.create_embedding("cohere", "embed-v4.0"):input_type-aware (defaultsearch_document, configurable per-call), with automatic batching to Cohere's 96-texts-per-request limit. - Reranker —
AIFactory.create_reranker("cohere", "rerank-v4.0-pro"): mapstop_kto Cohere'stop_n, returns a normalizedRerankResponse. - Model discovery —
AIFactory.get_provider_models("cohere")lists chat, embed, and rerank models live via/v1/models(paginated), tagged by Esperanto type.
All three capabilities ship with mocked-API unit tests and documentation in docs/providers/cohere.md.
Full Changelog: v2.22.0...v2.23.0