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

Method with_config

crates/opencode-provider/src/vercel.rs:34–52  ·  view source on GitHub ↗
(config: VercelConfig)

Source from the content-addressed store, hash-verified

32 }
33
34 pub fn with_config(config: VercelConfig) -> Self {
35 let models = vec![ModelInfo {
36 id: "v0-1.0-md".to_string(),
37 name: "v0 1.0 (Markdown)".to_string(),
38 provider: "vercel".to_string(),
39 context_window: 128000,
40 max_output_tokens: 8192,
41 supports_vision: true,
42 supports_tools: false,
43 cost_per_million_input: 0.0,
44 cost_per_million_output: 0.0,
45 }];
46
47 Self {
48 client: Client::new(),
49 config,
50 models,
51 }
52 }
53
54 fn convert_request(&self, request: ChatRequest) -> VercelRequest {
55 let messages: Vec<VercelMessage> = request

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected