[Feature]: add support for AWS Bedrock.

Author: mrpacketheadCreated Mar 30, 2026Updated May 10, 2026
Labelsenhancement

Is your feature request related to a problem? Please describe.

I have tested making AWS Bedrock work with Resume-Matcher. This did not require a lot of changes, and it would be helpful for those using AWS Bedrock. I have tested end-to-end using an AWS profile for authentication and an Australian inference profile with Claude Sonnet 4.6. This issue documents the changes required and two bugs discovered during integration.

Describe the solution you'd like

Bedrock is a natural fit for Resume Matcher since:

  • Many users already have AWS accounts with Bedrock access
  • It provides access to Claude, Titan, Llama, and other models without separate API keys
  • Authentication via AWS profiles/IAM roles is more secure than storing API keys
  • Regional inference profiles allow data residency compliance (e.g. AU, EU)

How It Works

Bedrock uses AWS credentials instead of API keys. The existing UI fields are repurposed:

UI Field Purpose for Bedrock Example
Model Bedrock model or inference profile ID au.anthropic.claude-sonnet-4-6
API Key AWS profile name from ~/.aws/credentials default
Base URL AWS region ap-southeast-2

LiteLLM (already a project dependency) has built-in Bedrock support via boto3. The profile name and region are passed as aws_profile_name and aws_region_name to LiteLLM, which handles the rest.

Changes Required

Backend

app/config.py

  • Add "bedrock" to the llm_provider Literal type
  • Add "bedrock" to the provider map for API key resolution

app/llm.py

  • Add "bedrock" to _PROVIDER_KEY_MAP
  • Add "bedrock": "bedrock/" to provider_prefixes in get_model_name()
  • Add "bedrock/" to known_prefixes
  • In _build_router(): when provider is "bedrock", pass aws_profile_name and aws_region_name to litellm_params instead of api_key/api_base
  • In check_llm_health(): skip the API key requirement check for Bedrock (same as Ollama), and pass aws_profile_name/aws_region_name instead of api_key/api_base
  • Add "bedrock": 1.3 to the timeout provider factors
  • Bug fix: In _supports_json_mode(), return False for Bedrock models — see Bug #1 below

app/routers/config.py

  • Add "bedrock" to SUPPORTED_PROVIDERS
  • Add Bedrock handling in the update_api_keys endpoint

app/schemas/models.py

  • Add bedrock: str | None = None to ApiKeysUpdateRequest

pyproject.toml

  • Add boto3 as a dependency (required by LiteLLM's Bedrock provider)

Frontend

lib/api/config.ts

  • Add 'bedrock' to the LLMProvider type
  • Add Bedrock entry to PROVIDER_INFO with requiresKey: false
  • Add 'bedrock' to ApiKeyProvider type
  • Add Bedrock to ApiKeysUpdateRequest and API_KEY_PROVIDER_INFO

app/(default)/settings/page.tsx

  • Add 'bedrock' to the PROVIDERS array
  • Default apiBase to the appropriate region when Bedrock is selected

Configuration

.env.example — add documented Bedrock example:

bash
# For AWS Bedrock (uses AWS profile from ~/.aws/credentials)
# LLM_PROVIDER=bedrock
# LLM_MODEL=anthropic.claude-3-5-sonnet-20241022-v2:0
# LLM_API_KEY=your-aws-profile-name
# LLM_API_BASE=us-east-1

Bugs Discovered

Bug 1: JSON mode returns empty responses

Problem: When response_format: {"type": "json_object"} is passed to Bedrock (particularly with regional inference profiles like au.anthropic.claude-sonnet-4-6), the model returns {} — an empty JSON object. LiteLLM's model registry reports that the model supports response_format, but the inference profile doesn't handle it correctly.

Impact: Resume parsing returns completely empty results — no name, no work experience, no skills.

Fix: In _supports_json_mode(), return False for any model starting with "bedrock/". The system prompt already instructs the model to respond with valid JSON only, which works reliably.

python
if model_name.startswith("bedrock/"):
    return False

Bug 2: False truncation detection on education field

Problem: The _appears_truncated() function flags responses as truncated when the education array is empty, triggering up to 2 unnecessary retries. Many experienced professionals legitimately omit education from their resumes.

Impact: Resume parsing takes 3x longer than necessary due to wasted retry attempts.

Fix: Remove "education" from the suspicious_empty_arrays list in _appears_truncated(). This is not Bedrock-specific — it affects all providers.

Testing

Tested with:

  • Provider: AWS Bedrock
  • Model: au.anthropic.claude-sonnet-4-6 (AU inference profile)
  • Region: ap-southeast-2
  • Auth: AWS named profile via ~/.aws/credentials
  • Operations verified: Health check, resume upload/parsing (PDF and DOCX), resume tailoring

Describe alternatives you've considered

No response

Additional context

No response