Skip to content

Commit ca66d15

Browse files
author
Aadil S
committed
docs: make Bedrock configuration optional for Claude Code (#428)
Default settings.json now works with plain Claude Code (direct Anthropic API) without Bedrock-specific env vars. Bedrock config moved to an optional section in the README with copy-paste env block. Fixes #428
1 parent e713c4f commit ca66d15

4 files changed

Lines changed: 41 additions & 49 deletions

File tree

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ On Windows, use *either* PowerShell *or* CMD, not both — your prompt shows `PS
8989
> [!TIP]
9090
> bun has to be on the PATH that *non-interactive* shells see, since that's what a harness uses to run a hook or tool. Those shells read `~/.zshenv` (zsh) or `~/.bashrc` (bash), not `~/.zshrc` — but the bun installer writes to `~/.zshrc`. So if `which bun` works in your terminal yet the harness can't find bun, copy the `BUN_INSTALL`/`PATH` export into `~/.zshenv` (or `~/.bashrc` for bash and Git Bash).
9191
92-
Every harness runs on **AWS Bedrock**, so set Bedrock up before your first run — enable model access in your AWS account and make sure the harness can see working AWS credentials. Each harness section below has the specifics.
92+
Every harness supports **AWS Bedrock** as an optional backend. Claude Code works with either the direct Anthropic API or Bedrock; Codex and Kiro harnesses default to Bedrock. If using Bedrock, enable model access in your AWS account and make sure the harness can see working AWS credentials. Each harness section below has the specifics.
9393

9494
### Install a harness
9595

@@ -185,7 +185,27 @@ Then, inside the Claude Code session:
185185
/aidlc Build a task management API with user authentication # start a workflow
186186
```
187187

188-
The shipped `.claude/settings.json` runs on **AWS Bedrock** (`AWS_REGION=us-east-1`, Fable/Opus/Sonnet/Haiku pinned). Before your first run, enable Anthropic model access in your AWS account and have AWS credentials on your SDK credential chain — see [Getting Started § AWS Bedrock Setup](docs/guide/01-getting-started.md#aws-bedrock-setup) for the model-access form, IAM policy, credential options, and how to change the region. The full prerequisites table, PATH troubleshooting, and Bedrock configuration are in [Getting Started](docs/guide/01-getting-started.md).
188+
The shipped `.claude/settings.json` works with **plain Claude Code** (direct Anthropic API) out of the box — no additional configuration needed.
189+
190+
<details>
191+
<summary><b>Optional: Using Amazon Bedrock</b></summary>
192+
193+
To run on AWS Bedrock instead of the direct Anthropic API, add the following to your `.claude/settings.json` `env` block:
194+
195+
```json
196+
"CLAUDE_CODE_USE_BEDROCK": "1",
197+
"AWS_REGION": "us-east-1",
198+
"ANTHROPIC_DEFAULT_FABLE_MODEL": "global.anthropic.claude-fable-5",
199+
"ANTHROPIC_DEFAULT_OPUS_MODEL": "global.anthropic.claude-opus-4-8",
200+
"ANTHROPIC_DEFAULT_SONNET_MODEL": "global.anthropic.claude-sonnet-4-6",
201+
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "global.anthropic.claude-haiku-4-5-20251001-v1:0"
202+
```
203+
204+
And update the `model` field to use the Bedrock model format (e.g., `"model": "opus[1m]"`).
205+
206+
Enable Anthropic model access in your AWS account and have AWS credentials on your SDK credential chain — see [Getting Started § AWS Bedrock Setup](docs/guide/01-getting-started.md#aws-bedrock-setup) for the model-access form, IAM policy, credential options, and how to change the region.
207+
208+
</details>
189209

190210
</details>
191211

dist/claude/.claude/settings.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,9 @@
2020
"command": "bun $CLAUDE_PROJECT_DIR/.claude/hooks/aidlc-statusline.ts"
2121
},
2222
"env": {
23-
"AWS_AIDLC_DEFAULT_SCOPE": "workshop",
24-
"CLAUDE_CODE_USE_BEDROCK": "1",
25-
"AWS_REGION": "us-east-1",
26-
"ANTHROPIC_DEFAULT_FABLE_MODEL": "global.anthropic.claude-fable-5",
27-
"ANTHROPIC_DEFAULT_OPUS_MODEL": "global.anthropic.claude-opus-4-8",
28-
"ANTHROPIC_DEFAULT_SONNET_MODEL": "global.anthropic.claude-sonnet-4-6",
29-
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "global.anthropic.claude-haiku-4-5-20251001-v1:0"
23+
"AWS_AIDLC_DEFAULT_SCOPE": "workshop"
3024
},
31-
"model": "opus[1m]",
25+
"model": "opus",
3226
"effortLevel": "xhigh",
3327
"hooks": {
3428
"SessionStart": [

harness/claude/settings.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,9 @@
2020
"command": "bun $CLAUDE_PROJECT_DIR/.claude/hooks/aidlc-statusline.ts"
2121
},
2222
"env": {
23-
"AWS_AIDLC_DEFAULT_SCOPE": "workshop",
24-
"CLAUDE_CODE_USE_BEDROCK": "1",
25-
"AWS_REGION": "us-east-1",
26-
"ANTHROPIC_DEFAULT_FABLE_MODEL": "global.anthropic.claude-fable-5",
27-
"ANTHROPIC_DEFAULT_OPUS_MODEL": "global.anthropic.claude-opus-4-8",
28-
"ANTHROPIC_DEFAULT_SONNET_MODEL": "global.anthropic.claude-sonnet-4-6",
29-
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "global.anthropic.claude-haiku-4-5-20251001-v1:0"
23+
"AWS_AIDLC_DEFAULT_SCOPE": "workshop"
3024
},
31-
"model": "opus[1m]",
25+
"model": "opus",
3226
"effortLevel": "xhigh",
3327
"hooks": {
3428
"SessionStart": [

tests/smoke/t03-settings-json.test.ts

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ describe("statusLine [.sh test 10]", () => {
124124
});
125125

126126
describe("orchestrator model pin [.sh test 11]", () => {
127-
test("model is pinned to opus[1m]", () => {
128-
// .sh asserted exact string equality (`[ "$MODEL" = "opus[1m]" ]`).
129-
expect(settings.model).toBe("opus[1m]");
127+
test("model is pinned to opus", () => {
128+
// Default uses plain Claude Code (no Bedrock suffix).
129+
expect(settings.model).toBe("opus");
130130
});
131131
});
132132

@@ -140,37 +140,21 @@ describe("orchestrator reasoning-effort pin", () => {
140140
});
141141
});
142142

143-
describe("Bedrock env block [.sh tests 12-16 + Fable pin]", () => {
143+
describe("Bedrock env block — optional (#428)", () => {
144144
const env = settings.env ?? {};
145145

146-
test("env.CLAUDE_CODE_USE_BEDROCK is 1 [.sh test 12]", () => {
147-
expect(env.CLAUDE_CODE_USE_BEDROCK).toBe("1");
146+
test("env does NOT include Bedrock vars by default (#428)", () => {
147+
// Bedrock configuration is optional — plain Claude Code users should not
148+
// need to configure AWS credentials to get started.
149+
expect(env.CLAUDE_CODE_USE_BEDROCK).toBeUndefined();
150+
expect(env.AWS_REGION).toBeUndefined();
151+
expect(env.ANTHROPIC_DEFAULT_FABLE_MODEL).toBeUndefined();
152+
expect(env.ANTHROPIC_DEFAULT_OPUS_MODEL).toBeUndefined();
153+
expect(env.ANTHROPIC_DEFAULT_SONNET_MODEL).toBeUndefined();
154+
expect(env.ANTHROPIC_DEFAULT_HAIKU_MODEL).toBeUndefined();
148155
});
149156

150-
test("env.AWS_REGION is set [.sh test 13]", () => {
151-
// .sh asserted non-empty (`[ -n "$AWS_REGION_VAL" ]`) — Bedrock requires
152-
// a region; Claude Code does not read it from ~/.aws.
153-
expect(typeof env.AWS_REGION).toBe("string");
154-
expect((env.AWS_REGION ?? "").length).toBeGreaterThan(0);
155-
});
156-
157-
test("env.ANTHROPIC_DEFAULT_FABLE_MODEL is pinned", () => {
158-
expect(env.ANTHROPIC_DEFAULT_FABLE_MODEL).toBe("global.anthropic.claude-fable-5");
159-
});
160-
161-
test("env.ANTHROPIC_DEFAULT_OPUS_MODEL is pinned [.sh test 14]", () => {
162-
expect(env.ANTHROPIC_DEFAULT_OPUS_MODEL).toBe("global.anthropic.claude-opus-4-8");
163-
});
164-
165-
test("env.ANTHROPIC_DEFAULT_SONNET_MODEL is pinned [.sh test 15]", () => {
166-
expect(env.ANTHROPIC_DEFAULT_SONNET_MODEL).toBe(
167-
"global.anthropic.claude-sonnet-4-6",
168-
);
169-
});
170-
171-
test("env.ANTHROPIC_DEFAULT_HAIKU_MODEL is pinned [.sh test 16]", () => {
172-
expect(env.ANTHROPIC_DEFAULT_HAIKU_MODEL).toBe(
173-
"global.anthropic.claude-haiku-4-5-20251001-v1:0",
174-
);
157+
test("env.AWS_AIDLC_DEFAULT_SCOPE is set", () => {
158+
expect(env.AWS_AIDLC_DEFAULT_SCOPE).toBe("workshop");
175159
});
176160
});

0 commit comments

Comments
 (0)