[Feature]: add support for AWS Bedrock.
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 thellm_providerLiteral type - Add
"bedrock"to the provider map for API key resolution
app/llm.py
- Add
"bedrock"to_PROVIDER_KEY_MAP - Add
"bedrock": "bedrock/"toprovider_prefixesinget_model_name() - Add
"bedrock/"toknown_prefixes - In
_build_router(): when provider is"bedrock", passaws_profile_nameandaws_region_nametolitellm_paramsinstead ofapi_key/api_base - In
check_llm_health(): skip the API key requirement check for Bedrock (same as Ollama), and passaws_profile_name/aws_region_nameinstead ofapi_key/api_base - Add
"bedrock": 1.3to the timeout provider factors - Bug fix: In
_supports_json_mode(), returnFalsefor Bedrock models — see Bug #1 below
app/routers/config.py
- Add
"bedrock"toSUPPORTED_PROVIDERS - Add Bedrock handling in the
update_api_keysendpoint
app/schemas/models.py
- Add
bedrock: str | None = NonetoApiKeysUpdateRequest
pyproject.toml
- Add
boto3as a dependency (required by LiteLLM's Bedrock provider)
Frontend
lib/api/config.ts
- Add
'bedrock'to theLLMProvidertype - Add Bedrock entry to
PROVIDER_INFOwithrequiresKey: false - Add
'bedrock'toApiKeyProvidertype - Add Bedrock to
ApiKeysUpdateRequestandAPI_KEY_PROVIDER_INFO
app/(default)/settings/page.tsx
- Add
'bedrock'to thePROVIDERSarray - Default
apiBaseto the appropriate region when Bedrock is selected
Configuration
.env.example — add documented Bedrock example:
# 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-1Bugs 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.
if model_name.startswith("bedrock/"):
return FalseBug 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
Source: srbhr/Resume-Matcher