Skip to content

Commit dff8e77

Browse files
authored
docs: add clearer bedrock instructions (anomalyco#40)
1 parent 6e854a4 commit dff8e77

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,37 @@ OpenCode supports a variety of AI models from different providers:
198198

199199
- Gemini 2.5
200200
- Gemini 2.5 Flash
201+
202+
## Using Bedrock Models
203+
204+
To use bedrock models with OpenCode you need three things.
205+
206+
1. Valid AWS credentials (the env vars: `AWS_SECRET_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_REGION`)
207+
2. Access to the corresponding model in AWS Bedrock in your region.
208+
a. You can request access in the AWS console on the Bedrock -> "Model access" page.
209+
3. A correct configuration file. You don't need the `providers` key. Instead you have to prefix your models per agent with `bedrock.` and then a valid model. For now only Claude 3.7 is supported.
210+
211+
```json
212+
{
213+
"agents": {
214+
"primary": {
215+
"model": "bedrock.claude-3.7-sonnet",
216+
"maxTokens": 5000,
217+
"reasoningEffort": ""
218+
},
219+
"task": {
220+
"model": "bedrock.claude-3.7-sonnet",
221+
"maxTokens": 5000,
222+
"reasoningEffort": ""
223+
},
224+
"title": {
225+
"model": "bedrock.claude-3.7-sonnet",
226+
"maxTokens": 80,
227+
"reasoningEffort": ""
228+
}
229+
},
230+
}
231+
```
201232

202233
## Interactive Mode Usage
203234

0 commit comments

Comments
 (0)