#include "vendors/cohere/catalog.h" #include "llm/error.h" namespace molo::cohere { namespace { constexpr ModelName kModels[] = { {"command-a-plus-05-2026", ModelKind::kChat, ModelStatus::kLive, "MoE, text and images, 128k context, 64k output"}, {"command-a-03-2025", ModelKind::kChat, ModelStatus::kLive, "text, 256k context, 8k output, tool use and RAG"}, {"command-a-reasoning-08-2025", ModelKind::kChat, ModelStatus::kLive, "reasoning model"}, {"command-a-vision-07-2025", ModelKind::kChat, ModelStatus::kLive, "image input"}, {"command-a-translate-08-2025", ModelKind::kChat, ModelStatus::kLive, "translation"}, {"command-r7b-12-2024", ModelKind::kChat, ModelStatus::kLive, "small, 128k context, 4k output"}, {"command-r-plus-08-2024", ModelKind::kChat, ModelStatus::kLive, "128k context, 4k output"}, {"command-r-08-2024", ModelKind::kChat, ModelStatus::kLive, "128k context, 4k output"}, {"command-r-03-2024", ModelKind::kChat, ModelStatus::kDeprecated, "deprecated Sept 15, 2025"}, {"command-r-plus-04-2024", ModelKind::kChat, ModelStatus::kDeprecated, "deprecated Sept 15, 2025"}, {"embed-v5.0-pro", ModelKind::kEmbed, ModelStatus::kLive, "text, images, mixed; dimensions 256..2048 (default 2048)"}, {"embed-v5.0-fast", ModelKind::kEmbed, ModelStatus::kLive, "faster, lighter embed-v5.0-pro"}, {"embed-v4.0", ModelKind::kEmbed, ModelStatus::kLive, "text and images"}, {"rerank-v5.0-pro", ModelKind::kRerank, ModelStatus::kLive, "highest quality, 32k context, calibrated scores"}, {"rerank-v5.0-fast", ModelKind::kRerank, ModelStatus::kLive, "low latency"}, {"rerank-v4.0-pro", ModelKind::kRerank, ModelStatus::kLive, "listed on the models page"}, {"rerank-v4.0-fast", ModelKind::kRerank, ModelStatus::kLive, "listed on the models page"}, {"rerank-v3.5", ModelKind::kRerank, ModelStatus::kLive, "multilingual, listed on the models page"}, }; } // namespace std::size_t ModelCatalog::count() { return sizeof(kModels) / sizeof(kModels[0]); } const ModelName& ModelCatalog::at(std::size_t index) { if (index >= count()) throw llm::ApiError::invalid("cohere", "model index out of range"); return kModels[index]; } ModelStatus ModelCatalog::status_of(const std::string& id) { for (const ModelName& m : kModels) if (id == m.id) return m.status; return ModelStatus::kUnknown; } } // namespace molo::cohere