Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ Default `<bin-dir>` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on W
| openrouter | Auth Token | `ANTHROPIC_AUTH_TOKEN` |
| ccrouter | Optional | placeholder token |
| mirror | None | user authenticates normally |
| bedrock | None | AWS SDK credential chain |

### Model Mapping (env vars)

Expand Down Expand Up @@ -200,8 +201,54 @@ export const MINIMAX_BLOCKED_TOOLS = [
];
```

**bedrock blocked tools:** None (pure Claude experience)

**Team mode merging**: When enabled, `configureTeamToolset` merges provider's blocked tools with `['TodoWrite']`.

## Amazon Bedrock Provider

Bedrock uses Claude Code's native AWS SDK integration. Key configuration:

### Environment Variables

```bash
# Required - enables Bedrock mode
CLAUDE_CODE_USE_BEDROCK=1

# Default region (overridable)
AWS_REGION=us-east-1

# Model IDs - user must provide (requiresModelMapping: true)
ANTHROPIC_DEFAULT_SONNET_MODEL=us.anthropic.claude-sonnet-4-5-20250929-v1:0
ANTHROPIC_DEFAULT_OPUS_MODEL=us.anthropic.claude-opus-4-5-20251101-v1:0
ANTHROPIC_DEFAULT_HAIKU_MODEL=us.anthropic.claude-haiku-4-5-20251001-v1:0
```

### Authentication (handled by AWS SDK)

1. `AWS_BEARER_TOKEN_BEDROCK` - Bearer token (highest priority)
2. `AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY` - Explicit credentials
3. `AWS_SESSION_TOKEN` - For temporary credentials
4. `AWS_PROFILE` - AWS profile name
5. Default credential chain (`~/.aws/credentials`, IAM roles)

### Model ID Formats

| Format | Example | Use Case |
| ------ | ------- | -------- |
| Regional (`us.`) | `us.anthropic.claude-sonnet-4-5-20250929-v1:0` | Routes to specific region |
| Global (`global.`) | `global.anthropic.claude-sonnet-4-5-20250929-v1:0` | Cross-region routing |
| Inference Profile ARN | `arn:aws:bedrock:us-east-1:123456789012:inference-profile/my-profile` | Custom profiles |

### Create Example

```bash
npx cc-mirror create --provider bedrock --name br \
--model-sonnet "us.anthropic.claude-sonnet-4-5-20250929-v1:0" \
--model-opus "us.anthropic.claude-opus-4-5-20251101-v1:0" \
--model-haiku "us.anthropic.claude-haiku-4-5-20251001-v1:0"
```

## Prompt Pack

- Only `minimal` mode supported (maximal deprecated)
Expand Down
52 changes: 44 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,13 @@ npx cc-mirror quick --provider mirror --name mclaude

Want to use different models? CC-MIRROR supports multiple providers:

| Provider | Models | Auth | Best For |
| -------------- | ---------------------- | ---------- | ------------------------------- |
| **Z.ai** | GLM-4.7, GLM-4.5-Air | API Key | Heavy coding with GLM reasoning |
| **MiniMax** | MiniMax-M2.1 | API Key | Unified model experience |
| **OpenRouter** | 100+ models | Auth Token | Model flexibility, pay-per-use |
| **CCRouter** | Ollama, DeepSeek, etc. | Optional | Local-first development |
| Provider | Models | Auth | Best For |
| -------------- | ---------------------- | ------------ | ------------------------------- |
| **Z.ai** | GLM-4.7, GLM-4.5-Air | API Key | Heavy coding with GLM reasoning |
| **MiniMax** | MiniMax-M2.1 | API Key | Unified model experience |
| **OpenRouter** | 100+ models | Auth Token | Model flexibility, pay-per-use |
| **CCRouter** | Ollama, DeepSeek, etc. | Optional | Local-first development |
| **Bedrock** | Claude via AWS | AWS SDK | Enterprise AWS integration |

```bash
# Z.ai (GLM Coding Plan)
Expand All @@ -160,6 +161,40 @@ npx cc-mirror quick --provider openrouter --api-key "$OPENROUTER_API_KEY" \

# Claude Code Router (local LLMs)
npx cc-mirror quick --provider ccrouter

# Amazon Bedrock (Claude via AWS)
npx cc-mirror quick --provider bedrock --name br \
--model-sonnet "us.anthropic.claude-sonnet-4-5-20250929-v1:0" \
--model-opus "us.anthropic.claude-opus-4-5-20251101-v1:0" \
--model-haiku "us.anthropic.claude-haiku-4-5-20251001-v1:0"
```

### Amazon Bedrock

Bedrock uses native AWS SDK authentication. No API key is needed — configure AWS credentials via:
- Environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`)
- AWS profile (`AWS_PROFILE`)
- IAM role (EC2/ECS/Lambda)
- Bearer token (`AWS_BEARER_TOKEN_BEDROCK`)

Model IDs use Bedrock format. Use `us.` prefix for regional or `global.` for cross-region routing:

```bash
# Regional (routes to specific region)
npx cc-mirror quick --provider bedrock --name br-regional \
--model-sonnet "us.anthropic.claude-sonnet-4-5-20250929-v1:0" \
--model-opus "us.anthropic.claude-opus-4-5-20251101-v1:0" \
--model-haiku "us.anthropic.claude-haiku-4-5-20251001-v1:0"

# Global (cross-region routing for higher availability)
npx cc-mirror quick --provider bedrock --name br-global \
--model-sonnet "global.anthropic.claude-sonnet-4-5-20250929-v1:0" \
--model-opus "global.anthropic.claude-opus-4-5-20251101-v1:0" \
--model-haiku "global.anthropic.claude-haiku-4-5-20251001-v1:0"

# Custom inference profile ARN
npx cc-mirror quick --provider bedrock --name br-profile \
--model-sonnet "arn:aws:bedrock:us-east-1:123456789012:inference-profile/my-profile"
```

---
Expand Down Expand Up @@ -298,14 +333,14 @@ minimax # Run MiniMax variant
## CLI Options

```
--provider <name> mirror | zai | minimax | openrouter | ccrouter | custom
--provider <name> mirror | zai | minimax | openrouter | ccrouter | bedrock | custom
--name <name> Variant name (becomes the CLI command)
--api-key <key> Provider API key
--base-url <url> Custom API endpoint
--model-sonnet <name> Map to sonnet model
--model-opus <name> Map to opus model
--model-haiku <name> Map to haiku model
--brand <preset> Theme: auto | zai | minimax | openrouter | ccrouter | mirror
--brand <preset> Theme: auto | zai | minimax | openrouter | ccrouter | mirror | bedrock
--no-tweak Skip tweakcc theme
--no-prompt-pack Skip provider prompt pack
--verbose Show full tweakcc output during update
Expand All @@ -324,6 +359,7 @@ Each provider includes a custom color theme via [tweakcc](https://github.com/Pie
| **minimax** | Coral/red/orange spectrum |
| **openrouter** | Teal/cyan gradient |
| **ccrouter** | Sky blue accents |
| **bedrock** | AWS orange/amber with navy |

---

Expand Down
35 changes: 19 additions & 16 deletions docs/architecture/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,16 @@ src/
│ └── prompt-pack/ # System prompt overlays
├── providers/ # Provider templates
│ └── index.ts # zai, minimax, openrouter, ccrouter, mirror
│ └── index.ts # zai, minimax, openrouter, ccrouter, mirror, bedrock
└── brands/ # Theme presets
├── index.ts # Brand registry
├── zai.ts # Gold theme
├── minimax.ts # Coral theme
├── openrouter.ts # Teal theme
├── ccrouter.ts # Sky theme
└── mirror.ts # Silver/chrome theme
├── mirror.ts # Silver/chrome theme
└── bedrock.ts # AWS orange/amber theme
```

---
Expand Down Expand Up @@ -217,20 +218,22 @@ interface ProviderTemplate {
### Provider Comparison

```
┌───────────────┬────────────────────────────────────────────────────────────┐
│ │ Provider Types │
│ ├────────────┬────────────┬────────────┬────────────────────┤
│ Feature │ Proxy │ Router │ Direct │ Description │
│ │ (zai, │ (ccrouter) │ (mirror) │ │
│ │ minimax, │ │ │ │
│ │ openrouter)│ │ │ │
├───────────────┼────────────┼────────────┼────────────┼────────────────────┤
│ BASE_URL │ ✓ Set │ ✓ Set │ ✗ Not set │ API endpoint │
│ API_KEY │ ✓ Set │ Optional │ ✗ Not set │ Auth credential │
│ Model mapping │ Auto/Req │ Handled │ ✗ Not set │ Sonnet/Opus/Haiku │
│ Prompt pack │ Optional │ ✗ │ ✗ │ System overlays │
│ Team mode │ Optional │ Optional │ ✓ Default │ Task tools │
└───────────────┴────────────┴────────────┴────────────┴────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────────────┐
│ │ Provider Types │
│ ├────────────┬────────────┬────────────┬────────────┬──────────────────┤
│ Feature │ Proxy │ Router │ Direct │ Bedrock │ Description │
│ │ (zai, │ (ccrouter) │ (mirror) │ │ │
│ │ minimax, │ │ │ │ │
│ │ openrouter)│ │ │ │ │
├───────────────┼────────────┼────────────┼────────────┼────────────┼──────────────────┤
│ BASE_URL │ ✓ Set │ ✓ Set │ ✗ Not set │ ✗ Not set │ API endpoint │
│ API_KEY │ ✓ Set │ Optional │ ✗ Not set │ ✗ Not set │ Auth credential │
│ Model mapping │ Auto/Req │ Handled │ ✗ Not set │ ✓ Required │ Sonnet/Opus/Haiku│
│ Prompt pack │ Optional │ ✗ │ ✗ │ ✗ │ System overlays │
│ Team mode │ Optional │ Optional │ ✓ Default │ Optional │ Task tools │
│ Special env │ ✗ │ ✗ │ ✗ │ AWS SDK │ CLAUDE_CODE_USE_ │
│ │ │ │ │ │ BEDROCK=1 │
└───────────────┴────────────┴────────────┴────────────┴────────────┴──────────────────┘
```

---
Expand Down
Loading