Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
@rekram1-node hey just FYI -> I think bedrock is switching from recommending mantle to recommending runtime again with the distinction of multiple API's
I think at some point we should be able to throw away the mantle specific stuff -> It's very annoying to deal with models not supported in different regions with mantle, and this would eventually simplify a lot of that effort with the CRIS profiles (US, Global) |
0cf7805 to
b46d192
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #
Type of change
What does this PR do?
Amazon Bedrock Runtime now supports OpenAI Responses, OpenAI Chat Completions, and Anthropic Messages alongside Converse. This PR adds explicit entrypoints for each API while keeping Converse as the default:
amazon-bedrock/converseamazon-bedrock/responsesamazon-bedrock/chatamazon-bedrock/messagesThe routes reuse OpenCode's existing protocol implementations and Bedrock authentication.
API support varies by model. The intended routing is:
Next steps
A follow-up models.dev change should assign each Bedrock model its preferred API, allowing OpenCode to select the route automatically. For example, the existing Amazon Bedrock provider and a model-specific Responses selection in models.dev could look like:
providers/amazon-bedrock/models/global.openai.gpt-5.6-sol.tomlSuggested values are
responses,chat,messages, andconverse. A separateapi_typefield avoids overloading the existingprovider.apifield, which currently contains a base URL.Add
api_typeto models.dev's model-level[provider]schema and generated API output. Then update OpenCode's models.dev normalization to map it to the matching@opencode/ai/providers/amazon-bedrock/*package, falling back to Converse when omitted.How did you verify your code works?
Added tests for route selection, Runtime URLs, SigV4 signing, API-key headers, and package loading. Also ran the existing Bedrock Converse tests and
bun run check.Screenshots / recordings
Not applicable; this is not a UI change.
Checklist