Skip to content

API Error: Truncated event with using Bedrock Inference Profiles #297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lou-k opened this issue Mar 3, 2025 · 3 comments
Open

API Error: Truncated event with using Bedrock Inference Profiles #297

lou-k opened this issue Mar 3, 2025 · 3 comments
Labels
api:bedrock Issue relates to AWS Bedrock bug Something isn't working

Comments

@lou-k
Copy link

lou-k commented Mar 3, 2025

Bedrock Application Inference profiles are a great way to track costs between different applications in the same aws account.

Unfortunately, claude code seems to choke when using one :(.

ANTHROPIC_MODEL="arn:aws:bedrock:***:****:application-inference-profile/***" claude --verbose --debug -p hello
 API Error: Truncated event message received.

Is it easy/possible to support these? I assumed the response from bedrock would be the same shape :*(.

@lou-k lou-k changed the title PI Error: Truncated event with using Bedrock Inference Profiles API Error: Truncated event with using Bedrock Inference Profiles Mar 3, 2025
@JamesFincher
Copy link

Having the same issue.

@ashwin-ant ashwin-ant added bug Something isn't working api:bedrock Issue relates to AWS Bedrock labels Mar 6, 2025
@clayallsopp
Copy link

clayallsopp commented Mar 11, 2025

I think the issue has to do with escaping the ARN - you need to switch the / in the ARN to %2F:

CLAUDE_CODE_USE_BEDROCK=1 DISABLE_PROMPT_CACHING=1 ANTHROPIC_MODEL="arn:aws:bedrock:us-east-1:xxx:application-inference-profile%2Fxxx"

Doing this resolved the issue for me. I opened anthropics/anthropic-sdk-typescript#715 in the underlying library to try to fix more automatically.

@lou-k
Copy link
Author

lou-k commented Mar 19, 2025

@clayallsopp you made my day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:bedrock Issue relates to AWS Bedrock bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants