MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / new

Method new

crates/opencode-provider/src/cerebras.rs:19–48  ·  view source on GitHub ↗
(api_key: impl Into<String>)

Source from the content-addressed store, hash-verified

17
18impl CerebrasProvider {
19 pub fn new(api_key: impl Into<String>) -> Self {
20 Self {
21 client: Client::new(),
22 api_key: api_key.into(),
23 models: vec![
24 ModelInfo {
25 id: "llama-3.3-70b".to_string(),
26 name: "Llama 3.3 70B (Cerebras)".to_string(),
27 provider: "cerebras".to_string(),
28 context_window: 128000,
29 max_output_tokens: 8192,
30 supports_vision: false,
31 supports_tools: true,
32 cost_per_million_input: 0.6,
33 cost_per_million_output: 0.6,
34 },
35 ModelInfo {
36 id: "llama-3.1-8b".to_string(),
37 name: "Llama 3.1 8B (Cerebras)".to_string(),
38 provider: "cerebras".to_string(),
39 context_window: 128000,
40 max_output_tokens: 8192,
41 supports_vision: false,
42 supports_tools: true,
43 cost_per_million_input: 0.1,
44 cost_per_million_output: 0.1,
45 },
46 ],
47 }
48 }
49}
50
51#[async_trait]

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected