Self Checks / 自检
CC Switch Version / 版本号
v3.15.0
Operating System / 操作系统
macOS, Apple Silicon
Related App / 涉及应用
- Claude Desktop third-party inference
- Claude Code in VS Code
Provider / 供应商
AWS Bedrock (API Key), region us-east-1
Summary / 问题概述
After switching the AWS Bedrock (API Key) provider through CC Switch, both Claude Desktop and Claude Code in VS Code became unusable.
Claude Desktop shows:
API Error: API returned an empty or malformed response (HTTP 200) — check for a proxy or gateway intercepting the request
The connection test in Claude Desktop / CC Switch can pass, but real chat requests fail.
VS Code Claude Code also fails when routed through this provider. Earlier it returned an invalid Bedrock model identifier when a CC Switch alias such as claude-sonnet-4-6 was forwarded; after changing models, requests still did not work reliably.
Evidence / 日志证据
With CC Switch debug logging enabled, the Claude Desktop request was forwarded to:
https://bedrock-runtime.us-east-1.amazonaws.com/v1/messages?beta=true
Example CC Switch log:
[Claude] >>> 请求 URL: https://bedrock-runtime.us-east-1.amazonaws.com/v1/messages?beta=true (model=global.anthropic.claude-sonnet-4-6)
The upstream AWS response body was:
{"Output":{"__type":"com.amazon.coral.service#UnknownOperationException"},"Version":"1.0"}
CC Switch then recorded it as:
status=200
input=0
output=0
Claude Desktop then surfaces this as an empty/malformed HTTP 200 response.
Manual verification / 手动验证
Using the same Bedrock API key, direct Bedrock Runtime invocation works when using the Runtime invoke endpoint:
POST https://bedrock-runtime.us-east-1.amazonaws.com/model/{modelId}/invoke
Authorization: Bearer <redacted>
The following model IDs returned valid responses in a direct minimal test:
global.anthropic.claude-opus-4-6-v1
global.anthropic.claude-sonnet-4-6
us.anthropic.claude-sonnet-4-5-20250929-v1:0
But bedrock-runtime.us-east-1.amazonaws.com/v1/messages returns UnknownOperationException, which seems expected because Bedrock Runtime is not the normal Anthropic-compatible /v1/messages base URL.
Expected Behavior / 期望行为
For an AWS Bedrock (API Key) provider:
- Claude Desktop proxy mode should use the correct Bedrock Runtime invocation path/adapter, or use the correct Anthropic-compatible Bedrock endpoint if that is the intended mode.
- AWS upstream errors like
UnknownOperationException should be surfaced as errors instead of being treated/logged as a successful HTTP 200 with 0 tokens.
- Claude Desktop and VS Code Claude Code should both be able to chat through the configured AWS Bedrock provider when the same API key works via direct Bedrock Runtime invocation.
Actual Behavior / 实际行为
- Claude Desktop local gateway is configured as:
http://127.0.0.1:15721/claude-desktop
- CC Switch forwards real chat traffic to:
https://bedrock-runtime.us-east-1.amazonaws.com/v1/messages?beta=true
- AWS returns:
{"Output":{"__type":"com.amazon.coral.service#UnknownOperationException"},"Version":"1.0"}
- CC Switch records status
200, input/output tokens 0, and Claude Desktop reports malformed response.
Possible Root Cause / 可能原因
It looks like the Claude Desktop proxy path treats the AWS Bedrock Runtime endpoint as if it were a normal Anthropic Messages-compatible endpoint and appends /v1/messages.
For Bedrock Runtime, direct invocation needs the Bedrock-style model invocation path, for example:
or an equivalent Bedrock-specific adapter.
Additional Notes / 补充信息
I also tried disabling the Bedrock request optimizer, thinking optimization, cache injection, and rectifier settings, then restarting Claude Desktop and testing with short prompts. The same failure still occurred.
No API keys or tokens are included in this report.
Self Checks / 自检
UnknownOperationException,Claude Desktop AWS Bedrock, andmalformed response HTTP 200.CC Switch Version / 版本号
v3.15.0
Operating System / 操作系统
macOS, Apple Silicon
Related App / 涉及应用
Provider / 供应商
AWS Bedrock (API Key), region
us-east-1Summary / 问题概述
After switching the AWS Bedrock (API Key) provider through CC Switch, both Claude Desktop and Claude Code in VS Code became unusable.
Claude Desktop shows:
The connection test in Claude Desktop / CC Switch can pass, but real chat requests fail.
VS Code Claude Code also fails when routed through this provider. Earlier it returned an invalid Bedrock model identifier when a CC Switch alias such as
claude-sonnet-4-6was forwarded; after changing models, requests still did not work reliably.Evidence / 日志证据
With CC Switch debug logging enabled, the Claude Desktop request was forwarded to:
Example CC Switch log:
The upstream AWS response body was:
{"Output":{"__type":"com.amazon.coral.service#UnknownOperationException"},"Version":"1.0"}CC Switch then recorded it as:
Claude Desktop then surfaces this as an empty/malformed HTTP 200 response.
Manual verification / 手动验证
Using the same Bedrock API key, direct Bedrock Runtime invocation works when using the Runtime invoke endpoint:
The following model IDs returned valid responses in a direct minimal test:
But
bedrock-runtime.us-east-1.amazonaws.com/v1/messagesreturnsUnknownOperationException, which seems expected because Bedrock Runtime is not the normal Anthropic-compatible/v1/messagesbase URL.Expected Behavior / 期望行为
For an AWS Bedrock (API Key) provider:
UnknownOperationExceptionshould be surfaced as errors instead of being treated/logged as a successful HTTP 200 with 0 tokens.Actual Behavior / 实际行为
{"Output":{"__type":"com.amazon.coral.service#UnknownOperationException"},"Version":"1.0"}200, input/output tokens0, and Claude Desktop reports malformed response.Possible Root Cause / 可能原因
It looks like the Claude Desktop proxy path treats the AWS Bedrock Runtime endpoint as if it were a normal Anthropic Messages-compatible endpoint and appends
/v1/messages.For Bedrock Runtime, direct invocation needs the Bedrock-style model invocation path, for example:
or an equivalent Bedrock-specific adapter.
Additional Notes / 补充信息
I also tried disabling the Bedrock request optimizer, thinking optimization, cache injection, and rectifier settings, then restarting Claude Desktop and testing with short prompts. The same failure still occurred.
No API keys or tokens are included in this report.