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

Method new

crates/opencode-tui/src/components/dialogs/model_select.rs:28–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26
27impl ModelSelectDialog {
28 pub fn new() -> Self {
29 let models = vec![
30 Model {
31 id: "claude-sonnet-4".into(),
32 name: "Claude Sonnet 4".into(),
33 provider: "anthropic".into(),
34 context_window: 200000,
35 },
36 Model {
37 id: "claude-3-5-sonnet".into(),
38 name: "Claude 3.5 Sonnet".into(),
39 provider: "anthropic".into(),
40 context_window: 200000,
41 },
42 Model {
43 id: "claude-3-opus".into(),
44 name: "Claude 3 Opus".into(),
45 provider: "anthropic".into(),
46 context_window: 200000,
47 },
48 Model {
49 id: "gpt-4o".into(),
50 name: "GPT-4o".into(),
51 provider: "openai".into(),
52 context_window: 128000,
53 },
54 Model {
55 id: "gpt-4-turbo".into(),
56 name: "GPT-4 Turbo".into(),
57 provider: "openai".into(),
58 context_window: 128000,
59 },
60 Model {
61 id: "o1".into(),
62 name: "o1".into(),
63 provider: "openai".into(),
64 context_window: 200000,
65 },
66 Model {
67 id: "gemini-2.0-flash".into(),
68 name: "Gemini 2.0 Flash".into(),
69 provider: "google".into(),
70 context_window: 1000000,
71 },
72 Model {
73 id: "gemini-1.5-pro".into(),
74 name: "Gemini 1.5 Pro".into(),
75 provider: "google".into(),
76 context_window: 1000000,
77 },
78 Model {
79 id: "deepseek-v3".into(),
80 name: "DeepSeek V3".into(),
81 provider: "deepseek".into(),
82 context_window: 64000,
83 },
84 Model {
85 id: "llama-3.1-70b".into(),

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected