opencode-crs-bedrock
v2.0.0
Published
OpenCode plugin for FeedMob CRS proxy to AWS Bedrock Anthropic models
Maintainers
Readme
opencode-crs-bedrock
OpenCode plugin for FeedMob CRS (Claude Relay Service) proxy to AWS Bedrock Anthropic models.
Features
- URL Rewriting - Routes requests to the CRS endpoint
- API Key Auth - Uses
x-api-keyheader for authentication
Installation
npm install -g opencode-crs-bedrockOr add to your OpenCode config to auto-install:
{
"plugin": ["opencode-crs-bedrock@latest"]
}Quick Start
Step 1: Configure OpenCode
Create or edit opencode.json in your project root or ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"opencode-crs-bedrock@latest"
],
"provider": {
"crs": {
"npm": "@ai-sdk/anthropic",
"models": {
"claude-opus-4-5": {
"name": "Opus 4.5 [CRS]",
"limit": { "context": 200000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
}
},
"claude-sonnet-4-5": {
"name": "Sonnet 4.5 [CRS]",
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
}
}
}
}
}
}Step 2: Authenticate
Run the OpenCode auth login command:
opencode auth loginWhen prompted:
- Select Other provider
- Enter provider id:
crs - Enter your CRS API key (starts with
cr_)
Your credentials will be securely stored and the plugin will automatically configure the custom fetch handler for CRS authentication.
Usage
# Interactive mode
opencode
# Or direct run with a specific model
opencode run -m crs/claude-sonnet-4-5 "Hello, world!"
# Use with thinking budget variants
opencode run -m crs/claude-opus-4-5:low "Simple task" # 8K thinking tokens
opencode run -m crs/claude-opus-4-5:max "Complex task" # 32K thinking tokensModel Configuration
Context Limits
- Opus 4.5: 200K context, 64K output tokens
- Sonnet 4.5: Default limits (inherited from SDK)
Extended Thinking
Both models support extended thinking with configurable budgets via variants:
:low- 8,192 thinking tokens for simpler tasks:max- 32,768 thinking tokens for complex reasoning
Use variants by appending :variant to the model ID (e.g., crs/claude-opus-4-5:max).
Modalities
All models support:
- Input: text, images, PDF documents
- Output: text
Debugging
Enable debug logging to see request details:
CRS_DEBUG=true opencodeTroubleshooting
Authentication Issues
Check stored credentials:
opencode auth listIf your CRS credentials aren't listed, run the authentication step again:
opencode auth loginMake sure to:
- Select Other provider
- Enter provider id:
crs - Enter your CRS API key (starts with
cr_)
Connection Issues
Verify your credentials are stored:
opencode auth listCheck your
opencode.jsonhas the correct provider configuration (see Quick Start above)Enable debug logging to see request details:
CRS_DEBUG=true opencode run -m crs/claude-sonnet-4-5 "test"
Local Development
For contributors working on the plugin itself:
{
"plugin": [
"file:///path/to/opencode-crs-bedrock"
]
}Reference the local directory in your OpenCode config for live development.
License
MIT
