anomalyco / anomalyco/opencode
[FEATURE]: Bedrock Mantle for both Anthropic and OpenAI models with SigV4/SSO auth
@neriousy is already working on this.
Since Aug 18, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
I'm evaluating opencode and want to run it entirely against the bedrock-mantle endpoint — both OpenAI and Anthropic models — authenticating with SigV4 from an AWS SSO profile. No API keys, no bearer tokens.
The OpenAI half already works. openai.gpt-5.6-sol / terra / luna go through @ai-sdk/amazon-bedrock/mantle and sign with the credential chain, so "profile": "<my-sso-profile>" is all I need.
The Anthropic half has no path. Mantle serves Claude through the Anthropic Messages API at /anthropic/v1/messages, and none of the bundled packages reach it:
@ai-sdk/amazon-bedrock/mantleis OpenAI-compatible only, and Mantle rejects Claude on those paths:The model 'anthropic.claude-opus-4-8' does not support the '/v1/chat/completions' APIThe model 'anthropic.claude-opus-4-8' does not support the '/openai/v1/responses' API
@ai-sdk/amazon-bedrock/anthropicspeaks Messages, but buildsbedrock-runtime/model/{id}/invokeURLs — the other endpoint.@ai-sdk/anthropicspeaks Messages and I can pointbaseURLat Mantle, but it only authenticates with a key. I'd have to mint a Bedrock API key and refresh it every 12h, which defeats the point of using SSO.
So today it's either Mantle without Claude, or Claude on bedrock-runtime. Not one endpoint and one auth mode for both.
What I'd like: Mantle's Messages API as an option on the existing amazon-bedrock provider, so a Claude model can be routed there and signed with SigV4 like everything else, with bearer tokens still taking precedence when set. Model IDs would stay unprefixed, since Mantle has no cross-region inference profiles.
Related: #36208 (native llm layer design — this is the AI SDK path) and #40075 (${AWS_REGION} not substituted on v2).
I have this working locally against us-east-1 with SSO credentials and can open a PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.