Skip to content

[Fix] Route Amazon Bedrock API keys through Mantle#245

Merged
mrubens merged 2 commits into
developfrom
codex/fix-bedrock-mantle-provider
Jul 12, 2026
Merged

[Fix] Route Amazon Bedrock API keys through Mantle#245
mrubens merged 2 commits into
developfrom
codex/fix-bedrock-mantle-provider

Conversation

@mrubens

@mrubens mrubens commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Why this PR exists

  • I am a maintainer / this is internal Roomote work

Amazon Bedrock keys generated by the current AWS console authenticate against Bedrock Mantle, while Roomote was routing them through OpenCode's legacy Bedrock Runtime provider.

What changed

  • Route Amazon Bedrock models through a custom Anthropic-compatible OpenCode provider at the regional Bedrock Mantle endpoint.
  • Preserve the existing amazon-bedrock settings identity while migrating legacy Runtime model IDs to bedrock-mantle/ IDs.
  • Apply Anthropic thinking options to Mantle-backed Claude models.
  • Label the credential as a Mantle API key and link directly to the AWS key console with matching-region guidance.
  • Document the Mantle model IDs and add a patch changeset.

How it was tested

  • Focused Vitest coverage: 144 tests passed across types, worker, web, and database packages.
  • pnpm lint
  • pnpm check-types
  • Pre-push pnpm lint:fast, pnpm check-types:fast, and pnpm knip
  • Local OpenCode probe returned OPENCODE_MANTLE_OK.
  • Live Roomote task using bedrock-mantle/anthropic.claude-haiku-4-5 returned BEDROCK_MANTLE_OK.
  • Verified the updated provider dialog in Chrome.

Checklist

  • The PR title follows the repo convention
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests and included manual validation above
  • I removed secrets, tokens, private keys, and customer data from the diff
  • I ran pnpm changeset

@roomote-roomote

roomote-roomote Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. The latest commit resolved the models.dev metadata concern, and the legacy-migration note was dismissed by the author as out of scope. See task

  • Legacy amazon-bedrock/* models are not migrated on read, so existing Bedrock deployments would keep routing through the legacy Runtime provider. — dismissed: the author confirmed backward compatibility with persisted Bedrock Runtime ids is intentionally out of scope. The four-model migration map was removed in 1f1cee9; existing amazon-bedrock/* selections must be re-selected as the new Mantle models.
  • (lower confidence) models.dev metadata may no longer resolve for Bedrock models. Fixed in 1f1cee9: resolveModelsDevSlug (apps/web/src/trpc/commands/task-models/models-dev.ts:192) now maps bedrock-mantle/<lab>.<model> ids to the models.dev <lab>/<model> slug, so lookupModelMetadataFromCatalog resolves pricing, context window, and modalities through the underlying lab. Covered by new resolver and metadata-lookup tests.

Reviewed 1f1cee9

@mrubens

mrubens commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in 1f1cee9.

  • Confirmed the models.dev concern and fixed it: bedrock-mantle/anthropic.* IDs now resolve through the canonical anthropic/* catalog slug, preserving display names, modalities, context windows, and lab pricing. Added resolver and metadata lookup coverage.
  • Backward compatibility with persisted Bedrock Runtime IDs is intentionally out of scope for this change. I removed the partial four-model migration map so we do not imply a migration guarantee we do not intend to support. Existing amazon-bedrock/* selections must be replaced with the new Mantle models.

Focused tests and the pre-push lint/typecheck/knip suite pass.

@mrubens
mrubens merged commit 8430e60 into develop Jul 12, 2026
14 checks passed
@mrubens
mrubens deleted the codex/fix-bedrock-mantle-provider branch July 12, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants