1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Cohere configuration, model identifiers, and its chat and embedding
//! wires.
//!
//! Chat goes through [`CohereChat`]: by default Cohere's OpenAI
//! Compatibility API on the shared Chat Completions wire, as the
//! [`COHERE`](crate::providers::openai::wire::COHERE) dialect. A
//! [`ChatRoute`] opts in to Cohere's native chat API ([`NativeChat`]), which
//! grounds the answer in the request's documents and keeps the citations
//! that point at each text block in its provider item. Text and image
//! embeddings use Cohere's own `/v1/embed`.
//!
//! ```no_run
//! use rig_core::providers::cohere;
//!
//! # fn run() -> Result<(), Box<dyn std::error::Error>> {
//! let provider = cohere::Cohere::from_env()?;
//!
//! let mut command_a = provider.completion(cohere::COMMAND_A_03_2025);
//! command_a.wire = command_a.wire.with_route(cohere::ChatRoute::Auto);
//! let embeddings = provider.embedding(cohere::EMBED_V4, None);
//! # Ok(())
//! # }
//! ```
pub use crateCohere;
pub use NativeChat;
pub use ;
pub use ;
/// Stable descriptor name recorded on normalized responses and telemetry.
pub const PROVIDER_NAME: &str = "cohere";
/// `command-a-plus-05-2026` completion model
pub const COMMAND_A_PLUS_05_2026: &str = "command-a-plus-05-2026";
/// `command-a-03-2025` completion model
pub const COMMAND_A_03_2025: &str = "command-a-03-2025";
/// `command-a-reasoning-08-2025` completion model
pub const COMMAND_A_REASONING_08_2025: &str = "command-a-reasoning-08-2025";
/// `command-a-vision-07-2025` completion model
pub const COMMAND_A_VISION_07_2025: &str = "command-a-vision-07-2025";
/// `command-a-translate-08-2025` completion model
pub const COMMAND_A_TRANSLATE_08_2025: &str = "command-a-translate-08-2025";
/// `command-r7b-12-2024` completion model
pub const COMMAND_R7B_12_2024: &str = "command-r7b-12-2024";
/// `command-r-plus-08-2024` completion model
pub const COMMAND_R_PLUS_08_2024: &str = "command-r-plus-08-2024";
/// `command-r-08-2024` completion model
pub const COMMAND_R_08_2024: &str = "command-r-08-2024";
/// Whether `model`, an id the catalog does not list, reads user images by
/// its name: Cohere's vision models (Command A Vision, Aya Vision) do, and
/// its text models do not.
pub
/// Whether `model` thinks, as its catalog entry says, or `None` for an id
/// the catalog does not list. Both chat routes read it.
pub