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

Method with_config

crates/opencode-provider/src/bedrock.rs:44–141  ·  view source on GitHub ↗
(config: BedrockConfig)

Source from the content-addressed store, hash-verified

42 }
43
44 pub fn with_config(config: BedrockConfig) -> Self {
45 let models = vec![
46 ModelInfo {
47 id: "anthropic.claude-sonnet-4-20250514-v1:0".to_string(),
48 name: "Claude Sonnet 4 (Bedrock)".to_string(),
49 provider: "amazon-bedrock".to_string(),
50 context_window: 200000,
51 max_output_tokens: 16000,
52 supports_vision: true,
53 supports_tools: true,
54 cost_per_million_input: 3.0,
55 cost_per_million_output: 15.0,
56 },
57 ModelInfo {
58 id: "anthropic.claude-3-5-sonnet-20241022-v2:0".to_string(),
59 name: "Claude 3.5 Sonnet v2 (Bedrock)".to_string(),
60 provider: "amazon-bedrock".to_string(),
61 context_window: 200000,
62 max_output_tokens: 8192,
63 supports_vision: true,
64 supports_tools: true,
65 cost_per_million_input: 3.0,
66 cost_per_million_output: 15.0,
67 },
68 ModelInfo {
69 id: "anthropic.claude-3-5-haiku-20241022-v1:0".to_string(),
70 name: "Claude 3.5 Haiku (Bedrock)".to_string(),
71 provider: "amazon-bedrock".to_string(),
72 context_window: 200000,
73 max_output_tokens: 8192,
74 supports_vision: true,
75 supports_tools: true,
76 cost_per_million_input: 1.0,
77 cost_per_million_output: 5.0,
78 },
79 ModelInfo {
80 id: "anthropic.claude-3-opus-20240229-v1:0".to_string(),
81 name: "Claude 3 Opus (Bedrock)".to_string(),
82 provider: "amazon-bedrock".to_string(),
83 context_window: 200000,
84 max_output_tokens: 4096,
85 supports_vision: true,
86 supports_tools: true,
87 cost_per_million_input: 15.0,
88 cost_per_million_output: 75.0,
89 },
90 ModelInfo {
91 id: "amazon.nova-pro-v1:0".to_string(),
92 name: "Amazon Nova Pro (Bedrock)".to_string(),
93 provider: "amazon-bedrock".to_string(),
94 context_window: 300000,
95 max_output_tokens: 4096,
96 supports_vision: true,
97 supports_tools: true,
98 cost_per_million_input: 0.8,
99 cost_per_million_output: 3.2,
100 },
101 ModelInfo {

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected