All LLM calls routed through Bedrock Converse API; Gemini removed

dropthejase replaces the multi-provider LLM layer (Claude via Anthropic SDK + Gemini) with a single Bedrock Converse API adapter. This is the most structural fork divergence: no per-tenant API keys, no provider routing, no Gemini path. The decision collapses a lot of code but is essentially irreversible without reimporting upstream.

infrastructureintegration

bedrock.ts (7141961) is a Converse API streaming adapter that implements the same streamChatParams/StreamChatResult interface as the old claude.ts and gemini.ts. It handles tool-use streaming by accumulating toolUse.input across content block deltas and calling runTools on tool_use stop reason. The iteration loop and the message accumulation pattern are clean and copy-able.

models.ts (b8759cb) defines three logical tiers - claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5 - and a resolveBedrockModelId() function that maps them to EU cross-region inference profile IDs (e.g. eu.anthropic.claude-sonnet-4-6). The profile IDs went through one correction in 70bff1e: Opus and Sonnet use short-form cross-region IDs (eu.anthropic.claude-opus-4-7) while Haiku uses the versioned form (eu.anthropic.claude-haiku-4-5-20251001-v1:0). That asymmetry is worth checking against your own region's available profile IDs.

The IAM policy for Bedrock invoke starts with specific model ARNs and gets relaxed to a wildcard foundation-model ARN in 792e54e. bedrock:CountTokens is added in 11fd6b2. Prompt caching is enabled on both agents via cacheConfig: { strategy: 'auto' } in f9fa4f4.

claude.ts, gemini.ts, and R2 storage.ts are deleted in 310bb912. The frontend model selector drops API key fields entirely and reduces to a three-tier Claude dropdown (3e4f3da), later restored with per-user tabular model preference (a63265b).

So what Worth a look if you're on AWS and want a clean Bedrock-only LLM layer with prompt caching. The `bedrock.ts` adapter, the `resolveBedrockModelId` indirection, and the EU cross-region profile IDs are all directly reusable. Skip if you need multi-provider support or want to keep Gemini - pulling these commits drops Gemini permanently and the dead-code removal is irreversible without going back to upstream.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

11 commits from dropthejase/louis, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
7141961f feat(backend): add bedrock.ts - Converse API streaming adapter with tool use Jason Lee 2026-05-06 ↗ GitHub
b8759cb4 feat(backend): models.ts - Bedrock model IDs, drop Gemini refs Jason Lee 2026-05-06 ↗ GitHub
7a89da2a feat(backend): llm router - all calls through Bedrock, drop Gemini path Jason Lee 2026-05-06 ↗ GitHub
c945aa8d chore(backend): types.ts - remove Gemini provider, simplify UserApiKeys Jason Lee 2026-05-06 ↗ GitHub
3e4f3da9 feat(frontend): model selector - Claude only, 3 tiers, no API key gating Jason Lee 2026-05-06 ↗ GitHub
commit body
Replace Gemini/Claude dual-provider model list with 3 Claude-only Bedrock
models. Remove API key gating from ModelToggle (apiKeys prop now a no-op).
Simplify modelAvailability.ts to getModelLabel + always-true shims.
Remove API Keys section from account/models page. Fix Amplify Storage
credential provider config (Auth.credentialsProvider not Storage.S3).
Fix streamChat/streamProjectChat signatures to match existing call sites
in useAssistantChat.ts (keep chat_id, map to chatId in payload).

a63265b8 Restore tabular model preference (Bedrock model list) Jason Lee 2026-05-08 ↗ GitHub
Users can select Sonnet or Haiku for tabular review in account settings.
Stored in user_profiles.tabular_model, read per-request in tabular routes.
Gemini options replaced with Bedrock-only models.
310bb912 chore: remove dead code (claude.ts, gemini.ts, R2 storage.ts) Jason Lee 2026-05-08 ↗ GitHub
claude.ts and gemini.ts are unused - all LLM calls route through
bedrock.ts. frontend/src/lib/storage.ts is the old Cloudflare R2
client, replaced by frontend/src/lib/aws/storage.ts.
f9fa4f4c feat(agents): enable prompt caching on Bedrock model Jason Lee 2026-05-11 ↗ GitHub
70bff1e3 fix: use correct EU cross-region inference profile IDs for Claude opus and sonnet Jason Lee 2026-05-11 ↗ GitHub
792e54ef fix(iam): use wildcard foundation-model ARN for Bedrock invoke permissions Jason Lee 2026-05-11 ↗ GitHub
11fd6b2d fix(iam): add bedrock:CountTokens to Bedrock policy statements Jason Lee 2026-05-15 ↗ GitHub

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-329.md from inside the repo you want the changes in.

⬇ Download capture-thread-329.md