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

Method with_config

crates/opencode-provider/src/google.rs:34–98  ·  view source on GitHub ↗
(config: GoogleConfig)

Source from the content-addressed store, hash-verified

32 }
33
34 pub fn with_config(config: GoogleConfig) -> Self {
35 let models = vec![
36 ModelInfo {
37 id: "gemini-2.5-pro-preview-06-05".to_string(),
38 name: "Gemini 2.5 Pro".to_string(),
39 provider: "google".to_string(),
40 context_window: 1000000,
41 max_output_tokens: 65536,
42 supports_vision: true,
43 supports_tools: true,
44 cost_per_million_input: 1.25,
45 cost_per_million_output: 10.0,
46 },
47 ModelInfo {
48 id: "gemini-2.0-flash".to_string(),
49 name: "Gemini 2.0 Flash".to_string(),
50 provider: "google".to_string(),
51 context_window: 1000000,
52 max_output_tokens: 8192,
53 supports_vision: true,
54 supports_tools: true,
55 cost_per_million_input: 0.1,
56 cost_per_million_output: 0.4,
57 },
58 ModelInfo {
59 id: "gemini-2.0-flash-lite".to_string(),
60 name: "Gemini 2.0 Flash Lite".to_string(),
61 provider: "google".to_string(),
62 context_window: 1000000,
63 max_output_tokens: 8192,
64 supports_vision: true,
65 supports_tools: true,
66 cost_per_million_input: 0.075,
67 cost_per_million_output: 0.3,
68 },
69 ModelInfo {
70 id: "gemini-1.5-pro".to_string(),
71 name: "Gemini 1.5 Pro".to_string(),
72 provider: "google".to_string(),
73 context_window: 2000000,
74 max_output_tokens: 8192,
75 supports_vision: true,
76 supports_tools: true,
77 cost_per_million_input: 1.25,
78 cost_per_million_output: 5.0,
79 },
80 ModelInfo {
81 id: "gemini-1.5-flash".to_string(),
82 name: "Gemini 1.5 Flash".to_string(),
83 provider: "google".to_string(),
84 context_window: 1000000,
85 max_output_tokens: 8192,
86 supports_vision: true,
87 supports_tools: true,
88 cost_per_million_input: 0.075,
89 cost_per_million_output: 0.3,
90 },
91 ];

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected