Skip to content

Commit 7d87aa2

Browse files
mhaitanaMatt HaitanaJerrettDavis
authored
fix(bedrock): route ARNs via converse, named AWS profiles, and au. re… (headroomlabs-ai#1456)
## Description Fix three related gaps in Bedrock support that prevented headroom from working with Claude Code when `CLAUDE_CODE_USE_BEDROCK=0` and `ANTHROPIC_BASE_URL` is pointed at the proxy: 1. **ARN passthrough used the wrong LiteLLM route** — application inference profile ARNs (e.g. `arn:aws:bedrock:ap-southeast-2:<account>:application-inference-profile/<id>`) were forwarded as `bedrock/<arn>`, which LiteLLM rejects with HTTP 400 "Try calling via converse route". Fixed to `bedrock/converse/<arn>`. 2. **Named AWS profile not forwarded to completion calls** — `--bedrock-profile` was wired through the CLI → config → `LiteLLMBackend.__init__` and used to fetch the model map at startup, but never stored on `self`. All four `acompletion()` call sites (`send_message`, `stream_message`, `send_openai_message`, `stream_openai_message`) passed only `aws_region_name` — the actual Bedrock calls used ambient credentials regardless of the flag. Fixed by storing `self.profile_name` and passing `aws_profile_name=` to every `acompletion()` call. 3. **`ap-southeast-2` used the wrong region prefix** — Australia should use `au.` for cross-region inference profile IDs, not `apac.`. Added `ap-southeast-2 → "au"` to `_BEDROCK_REGION_PREFIXES` and `"au."` to the strip list in `_normalize_bedrock_profile_id`. Closes # ## Type of Change - [x] Bug fix (non-breaking change that fixes an issue) ## Changes Made - `backends/litellm.py`: route `arn:aws:` model IDs via `bedrock/converse/<arn>` in `map_model_id` - `backends/litellm.py`: store `profile_name` as `self.profile_name` in `LiteLLMBackend.__init__`; pass `aws_profile_name=` to `acompletion()` in all four call sites; use `boto3.Session(profile_name=...)` for startup discovery; cache key is `region:profile_name` to prevent cross-profile collisions - `backends/litellm.py`: add `ap-southeast-2 → "au"` to `_BEDROCK_REGION_PREFIXES`; add `"au."` to prefix strip list in `_normalize_bedrock_profile_id` - `providers/registry.py`: pass `profile_name=bedrock_profile` to `LiteLLMBackend` - `proxy/server.py`: pass `config.bedrock_profile` to `create_proxy_backend` - `docs/claude-code-bedrock-headroom.md`: remove false claim that ARNs in `ANTHROPIC_DEFAULT_*_MODEL` bypass the proxy; fix troubleshooting table - `tests/test_bedrock_region.py`: update `test_arn_passthrough` to expect `bedrock/converse/<arn>`; update cache key format; add `test_profile_cache_isolation`, `test_ap_southeast_2_uses_au_prefix`, and `TestBedrockProfileForwardedToCompletion` (3 async tests asserting `aws_profile_name` appears in `acompletion()` kwargs for named profiles and is absent for the no-profile case) - `tests/test_provider_registry*.py`, `test_vertex_claude_compression.py`: update `litellm_backend_cls` stubs to accept `profile_name=None` ## Testing - [x] Unit tests pass (`pytest`) - [x] New tests added for new functionality - [x] Manual testing performed ### Test Output ```text $ pytest tests/test_bedrock_region.py tests/test_provider_registry.py tests/test_provider_registry_extended.py \ -k "not test_fallback_when_boto3_import_fails and not test_fallback_when_api_call_fails and not test_successful_fetch" -q collected 51 items / 3 deselected / 48 selected tests/test_bedrock_region.py ........................... tests/test_provider_registry.py ........... tests/test_provider_registry_extended.py ....... 48 passed, 3 deselected in 2.00s ``` Note: 3 deselected tests use patch("builtins.__import__") which hangs under Python 3.13 — pre-existing issue unrelated to these changes. ## Real Behavior Proof - Environment: macOS, Python 3.13, Claude Code with `CLAUDE_CODE_USE_BEDROCK=0`, `ANTHROPIC_BASE_URL=http://127.0.0.1:8787`, AWS ap-southeast-2, application inference profile ARNs in `ANTHROPIC_DEFAULT_*_MODEL` - Exact command / steps: `headroom proxy --port 8787 --backend bedrock --region ap-southeast-2 --bedrock-profile "my-sso-profile"` - Observed result: Requests routed correctly to `bedrock/converse/arn:aws:bedrock:ap-southeast-2:...:application-inference-profile/<id>` as confirmed in LiteLLM logs - Not tested: EU/APAC region ARN passthrough (logic is identical); non-SSO credential flows ```text 15:29:44 - LiteLLM:INFO: utils.py:4090 - LiteLLM completion() model= converse/arn:aws:bedrock:ap-southeast-2:<account>:application-inference-profile/<id>; provider = bedrock 2026-06-26 15:29:44,322 - LiteLLM - INFO - LiteLLM completion() model= converse/arn:aws:bedrock:ap-southeast-2:<account>:application-inference-profile/<id>; provider = bedrock 15:31:09 - LiteLLM:INFO: utils.py:4090 - LiteLLM completion() model= converse/arn:aws:bedrock:ap-southeast-2:<account>:application-inference-profile/<id>; provider = bedrock 2026-06-26 15:31:09,928 - LiteLLM - INFO - LiteLLM completion() model= converse/arn:aws:bedrock:ap-southeast-2:<account>:application-inference-profile/<id>; provider = bedrock 15:34:26 - LiteLLM:INFO: utils.py:4090 - LiteLLM completion() model= converse/arn:aws:bedrock:ap-southeast-2:<account>:application-inference-profile/<id>; provider = bedrock 2026-06-26 15:34:26,811 - LiteLLM - INFO - LiteLLM completion() model= converse/arn:aws:bedrock:ap-southeast-2:<account>:application-inference-profile/<id>; provider = bedrock ``` ## Review Readiness - [x] I have performed a self-review - [x] This PR is ready for human review ## Checklist - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes ## Additional Notes The 3 skipped tests (`test_fallback_when_boto3_import_fails`, `test_fallback_when_api_call_fails`, `test_successful_fetch`) pre-exist in the repo and use `patch("builtins.__import__")` which hangs under Python 3.13. Not affected by these changes. --------- Co-authored-by: Matt Haitana <mhaitana@costar.com> Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
1 parent c75ebde commit 7d87aa2

8 files changed

Lines changed: 352 additions & 18 deletions

File tree

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# Claude Code + AWS Bedrock, with Headroom compression
2+
3+
*Validated end-to-end on 2026-06-26 (Claude Code 2.1, Headroom 0.27.0, ap-southeast-2).*
4+
5+
This is the **working, tested** way to run **Claude Code** against **Claude models on
6+
AWS Bedrock** with **Headroom compressing the context** in the middle.
7+
8+
## TL;DR
9+
10+
Run Claude Code in **normal Anthropic mode** (NOT Bedrock mode) pointed at a local
11+
Headroom proxy, and let **Headroom** be the thing that talks to Bedrock:
12+
13+
```
14+
Claude Code ──ANTHROPIC_BASE_URL──▶ Headroom proxy ──LiteLLM (bedrock)──▶ AWS Bedrock
15+
(normal mode) (plain http) (compresses) (your AWS creds) (Claude)
16+
```
17+
18+
One non-obvious requirement makes the difference between "works" and "silently bypasses
19+
the proxy":
20+
21+
1. **`CLAUDE_CODE_USE_BEDROCK=0`** — Without this, Claude Code sees the
22+
`CLAUDE_CODE_USE_BEDROCK=1` flag and calls Bedrock directly via the AWS SDK,
23+
completely bypassing `ANTHROPIC_BASE_URL` and the proxy.
24+
25+
## Why not "just set CLAUDE_CODE_USE_BEDROCK=1"?
26+
27+
That approach **does not work** with Headroom. When `CLAUDE_CODE_USE_BEDROCK=1` is set,
28+
Claude Code calls Bedrock directly using the AWS SDK — `ANTHROPIC_BASE_URL` is ignored
29+
entirely and the proxy never receives a byte. Use the Anthropic-mode path below.
30+
31+
## Prerequisites
32+
33+
- **AWS credentials** configured for your environment (env vars, `~/.aws/credentials`,
34+
instance profile, or SSO via `aws sso login`). Confirm direct access works before
35+
involving Headroom:
36+
```bash
37+
aws bedrock-runtime invoke-model \
38+
--region us-east-1 \
39+
--model-id anthropic.claude-3-haiku-20240307-v1:0 \
40+
--body '{"anthropic_version":"bedrock-2023-05-31","max_tokens":20,"messages":[{"role":"user","content":"hi"}]}' \
41+
/tmp/out.json
42+
```
43+
- **boto3** in the proxy's Python environment (for dynamic inference profile discovery):
44+
```bash
45+
pip install boto3
46+
```
47+
- **IAM permissions** for the models you intend to use — at minimum
48+
`bedrock:InvokeModel` and `bedrock:InvokeModelWithResponseStream`. For application
49+
inference profiles, scope to the specific profile ARN:
50+
```json
51+
{
52+
"Effect": "Allow",
53+
"Action": ["bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream"],
54+
"Resource": ["arn:aws:bedrock:<region>:<account>:application-inference-profile/<id>"]
55+
}
56+
```
57+
58+
## Terminal 1 — start the Headroom proxy (Bedrock backend)
59+
60+
```bash
61+
headroom proxy --port 8787 \
62+
--backend bedrock \
63+
--region us-east-1
64+
```
65+
66+
With a named AWS SSO profile:
67+
68+
```bash
69+
headroom proxy --port 8787 \
70+
--backend bedrock \
71+
--region us-east-1 \
72+
--bedrock-profile my-sso-profile
73+
```
74+
75+
On startup the proxy calls `list_inference_profiles` to build a model map. Confirm it
76+
is routing correctly by checking the LiteLLM log lines — you should see:
77+
78+
```
79+
LiteLLM completion() model= converse/arn:aws:... provider = bedrock
80+
```
81+
82+
## Terminal 2 — run Claude Code (normal Anthropic mode) against the proxy
83+
84+
```bash
85+
export CLAUDE_CODE_USE_BEDROCK=0 # REQUIRED — prevents Claude Code bypassing the proxy
86+
export ANTHROPIC_BASE_URL=http://127.0.0.1:8787
87+
export ANTHROPIC_API_KEY=headroom # Claude Code needs *a* key to start; value is ignored
88+
export ANTHROPIC_MODEL=claude-opus-4-6
89+
export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4-6
90+
export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-6
91+
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5-20251001
92+
93+
claude
94+
```
95+
96+
Or via `~/.claude/settings.json`:
97+
98+
```json
99+
{
100+
"env": {
101+
"CLAUDE_CODE_USE_BEDROCK": "0",
102+
"ANTHROPIC_BASE_URL": "http://127.0.0.1:8787",
103+
"ANTHROPIC_API_KEY": "headroom",
104+
"ANTHROPIC_MODEL": "claude-opus-4-6",
105+
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
106+
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-6",
107+
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001"
108+
}
109+
}
110+
```
111+
112+
Claude Code now talks plain Anthropic `/v1/messages` to Headroom; Headroom compresses
113+
and forwards to Bedrock via LiteLLM, then translates the answer back.
114+
115+
## Application inference profiles (account-specific ARNs)
116+
117+
If your IAM policy only permits **application inference profiles** (account-specific
118+
ARNs) rather than system-defined cross-region profiles, pass the ARN directly as the
119+
model value in `ANTHROPIC_DEFAULT_*_MODEL`. The proxy detects `arn:aws:` prefixed model
120+
IDs and routes them via `bedrock/converse/<arn>` automatically — no extra configuration
121+
required.
122+
123+
## Region prefix notes
124+
125+
| AWS region | Cross-region inference prefix |
126+
|---|---|
127+
| `us-*` | `us.` |
128+
| `eu-*` | `eu.` |
129+
| `ap-*` (except `ap-southeast-2`) | `apac.` |
130+
| `ap-southeast-2` (Sydney) | `au.` |
131+
132+
The proxy uses the correct prefix automatically when constructing fallback model IDs.
133+
134+
## Verify compression is happening
135+
136+
- Dashboard: <http://localhost:8787/dashboard> — "tokens saved" climbs as you work.
137+
- `curl -s localhost:8787/stats``tokens.saved` and `request_logs[].transforms_applied`.
138+
139+
## Troubleshooting
140+
141+
| Symptom | Cause | Fix |
142+
|---|---|---|
143+
| Proxy receives no requests | Claude Code is in Bedrock mode, bypassing proxy | Set `CLAUDE_CODE_USE_BEDROCK=0` |
144+
| `400 The provided model identifier is invalid` | Bedrock rejected the model name format | Use standard cross-region profile names (`claude-sonnet-4-6`) or a valid application inference profile ARN |
145+
| `403 AccessDeniedException` on system-defined profiles | IAM policy only permits application profiles | Use `--bedrock-profile` with an authorized profile and pass application inference profile ARNs as model values |
146+
| `400 … Try calling via converse route` | Old proxy version routing ARNs to invoke path | Upgrade to headroom ≥ 0.27.1 |
147+
| Model map empty at startup | boto3 not installed or wrong AWS profile | `pip install boto3`; check `--bedrock-profile` / `AWS_PROFILE` |

headroom/backends/litellm.py

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ class ProviderConfig:
7171

7272
# Region prefix used in cross-region Bedrock inference profile IDs.
7373
# EU regions use "eu.", AP regions use "apac.", US (and everything else) use "us.".
74+
# ap-southeast-2 (Sydney/Australia) uses "au." — distinct from the rest of APAC.
7475
_BEDROCK_REGION_PREFIXES: dict[str, str] = {
7576
"eu": "eu",
77+
"ap-southeast-2": "au",
7678
"ap": "apac",
7779
}
7880

@@ -137,7 +139,9 @@ def _build_bedrock_fallback_map(region: str) -> dict[str, str]:
137139
return {name: f"bedrock/{prefix}.{model_id}" for name, model_id in _CLAUDE_MODELS}
138140

139141

140-
def _fetch_bedrock_inference_profiles(region: str | None) -> dict[str, str]:
142+
def _fetch_bedrock_inference_profiles(
143+
region: str | None, profile_name: str | None = None
144+
) -> dict[str, str]:
141145
"""Fetch available Bedrock inference profiles from AWS API.
142146
143147
Uses boto3 list_inference_profiles() to get all available profiles
@@ -149,15 +153,21 @@ def _fetch_bedrock_inference_profiles(region: str | None) -> dict[str, str]:
149153
150154
Args:
151155
region: AWS region (e.g., "us-east-1", "eu-central-1")
156+
profile_name: AWS named profile (e.g., "my-sso-profile"). When set,
157+
a boto3.Session is created with this profile name so
158+
the correct SSO or credential file is used. Falls back
159+
to ambient credentials (AWS_PROFILE env var, instance
160+
metadata, etc.) when not provided.
152161
153162
Returns:
154163
Model map: anthropic_model_name -> bedrock inference profile ID
155164
"""
156165
region = region or "us-east-1"
157166

158-
# Check cache first
159-
if region in _bedrock_profiles_cache:
160-
return _bedrock_profiles_cache[region]
167+
# Cache key includes profile_name so different profiles don't collide
168+
cache_key = f"{region}:{profile_name or ''}"
169+
if cache_key in _bedrock_profiles_cache:
170+
return _bedrock_profiles_cache[cache_key]
161171

162172
model_map: dict[str, str] = {}
163173

@@ -169,11 +179,12 @@ def _fetch_bedrock_inference_profiles(region: str | None) -> dict[str, str]:
169179
"Install boto3 for dynamic model discovery: pip install boto3"
170180
)
171181
model_map = _build_bedrock_fallback_map(region)
172-
_bedrock_profiles_cache[region] = model_map
182+
_bedrock_profiles_cache[cache_key] = model_map
173183
return model_map
174184

175185
try:
176-
bedrock_client = boto3.client("bedrock", region_name=region)
186+
session = boto3.Session(profile_name=profile_name) if profile_name else boto3.Session()
187+
bedrock_client = session.client("bedrock", region_name=region)
177188
response = bedrock_client.list_inference_profiles(typeEquals="SYSTEM_DEFINED")
178189

179190
for profile in response.get("inferenceProfileSummaries", []):
@@ -211,7 +222,7 @@ def _fetch_bedrock_inference_profiles(region: str | None) -> dict[str, str]:
211222
model_map = _build_bedrock_fallback_map(region)
212223

213224
# Cache the result
214-
_bedrock_profiles_cache[region] = model_map
225+
_bedrock_profiles_cache[cache_key] = model_map
215226
return model_map
216227

217228

@@ -222,18 +233,23 @@ def _normalize_bedrock_profile_id(profile_id: str) -> str | None:
222233
profile_id: e.g., "us.anthropic.claude-sonnet-4-20250514-v1:0"
223234
or "anthropic.claude-sonnet-4-20250514-v1:0"
224235
or "claude-sonnet-4-20250514"
236+
or "arn:aws:bedrock:...:application-inference-profile/..."
225237
226238
Returns:
227239
Normalized name like "claude-sonnet-4-20250514", or None if not parseable
228240
"""
229241
import re
230242

243+
# ARNs are opaque identifiers — cannot be normalized to a standard model name
244+
if profile_id.startswith("arn:aws:"):
245+
return None
246+
231247
# Strip "bedrock/" prefix if present
232248
if profile_id.startswith("bedrock/"):
233249
profile_id = profile_id[8:]
234250

235-
# Strip region prefix (us., eu., apac.)
236-
for prefix in ["us.", "eu.", "apac."]:
251+
# Strip region prefix (us., eu., apac., au.)
252+
for prefix in ["us.", "eu.", "apac.", "au."]:
237253
if profile_id.startswith(prefix):
238254
profile_id = profile_id[len(prefix) :]
239255
break
@@ -402,13 +418,17 @@ def __init__(
402418
self,
403419
provider: str = "bedrock",
404420
region: str | None = None,
421+
profile_name: str | None = None,
405422
**kwargs: Any,
406423
):
407424
"""Initialize LiteLLM backend.
408425
409426
Args:
410427
provider: LiteLLM provider prefix (bedrock, vertex_ai, openrouter, etc.)
411428
region: Cloud region (provider-specific)
429+
profile_name: AWS named profile for credential resolution (bedrock only).
430+
When set, boto3 uses this profile (e.g. an SSO profile) instead
431+
of the ambient credentials. Ignored for non-bedrock providers.
412432
**kwargs: Additional provider-specific config
413433
"""
414434
if not LITELLM_AVAILABLE:
@@ -418,6 +438,7 @@ def __init__(
418438

419439
self.provider = provider
420440
self.region = region
441+
self.profile_name = profile_name
421442
self.kwargs = kwargs
422443

423444
# Get provider config from registry
@@ -438,7 +459,7 @@ def __init__(
438459
"botocore, which is not installed. Install the bedrock extra: "
439460
"pip install 'headroom-ai[bedrock]' (or pip install botocore)."
440461
)
441-
self._model_map = _fetch_bedrock_inference_profiles(region)
462+
self._model_map = _fetch_bedrock_inference_profiles(region, profile_name=profile_name)
442463
litellm.set_verbose = False # Reduce noise
443464
else:
444465
self._model_map = self._config.model_map
@@ -457,13 +478,19 @@ def map_model_id(self, anthropic_model: str) -> str:
457478
- "anthropic.claude-sonnet-4-20250514-v1:0" (Bedrock without region)
458479
- "us.anthropic.claude-sonnet-4-20250514-v1:0" (Bedrock with region)
459480
- "bedrock/us.anthropic.claude-sonnet-4-20250514-v1:0" (LiteLLM format)
481+
- "arn:aws:bedrock:...:application-inference-profile/..." (application inference profile)
460482
"""
461483
# Check direct mapping first
462484
if anthropic_model in self._model_map:
463485
return self._model_map[anthropic_model]
464486

465487
# For Bedrock, try to normalize various input formats
466488
if self.provider == "bedrock":
489+
# Application inference profile ARNs must use the converse route —
490+
# the invoke route rejects ARNs with HTTP 400.
491+
if anthropic_model.startswith("arn:aws:"):
492+
return f"bedrock/converse/{anthropic_model}"
493+
467494
normalized = _normalize_bedrock_profile_id(anthropic_model)
468495
if normalized and normalized in self._model_map:
469496
return self._model_map[normalized]
@@ -696,6 +723,9 @@ async def send_message(
696723
elif self.provider in ("vertex_ai", "vertex_ai_beta"):
697724
kwargs["vertex_location"] = self.region
698725

726+
if self.provider == "bedrock" and self.profile_name:
727+
kwargs["aws_profile_name"] = self.profile_name
728+
699729
# Forward API key from request headers if present.
700730
# Skip for Bedrock/Vertex: they use env-based auth (AWS SigV4 / Google ADC).
701731
# Forwarding x-api-key (e.g. sk-ant-dummy) would override their credentials.
@@ -800,6 +830,9 @@ async def stream_message(
800830
elif self.provider in ("vertex_ai", "vertex_ai_beta"):
801831
kwargs["vertex_location"] = self.region
802832

833+
if self.provider == "bedrock" and self.profile_name:
834+
kwargs["aws_profile_name"] = self.profile_name
835+
803836
# Forward API key from request headers if present.
804837
# Skip for Bedrock/Vertex: they use env-based auth (AWS SigV4 / Google ADC).
805838
# Forwarding x-api-key (e.g. sk-ant-dummy) would override their credentials.
@@ -1024,6 +1057,9 @@ async def send_openai_message(
10241057
elif self.provider in ("vertex_ai", "vertex_ai_beta"):
10251058
kwargs["vertex_location"] = self.region
10261059

1060+
if self.provider == "bedrock" and self.profile_name:
1061+
kwargs["aws_profile_name"] = self.profile_name
1062+
10271063
# Forward API key from request headers if present.
10281064
# Skip for Bedrock/Vertex: they use env-based auth (AWS SigV4 / Google ADC).
10291065
# Forwarding x-api-key (e.g. sk-ant-dummy) would override their credentials.
@@ -1199,6 +1235,9 @@ async def stream_openai_message(
11991235
elif self.provider in ("vertex_ai", "vertex_ai_beta"):
12001236
kwargs["vertex_location"] = self.region
12011237

1238+
if self.provider == "bedrock" and self.profile_name:
1239+
kwargs["aws_profile_name"] = self.profile_name
1240+
12021241
# Forward API key from request headers if present.
12031242
# Skip for Bedrock/Vertex: they use env-based auth (AWS SigV4 / Google ADC).
12041243
# Forwarding x-api-key (e.g. sk-ant-dummy) would override their credentials.

headroom/providers/registry.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ def create_proxy_backend(
148148
backend: str,
149149
anyllm_provider: str,
150150
bedrock_region: str | None,
151+
bedrock_profile: str | None = None,
151152
logger: logging.Logger,
152153
openai_api_url: str | None = None,
153154
anyllm_backend_cls: Any | None = None,
@@ -181,7 +182,10 @@ def create_proxy_backend(
181182
provider = "vertex_ai"
182183
try:
183184
backend_cls = litellm_backend_cls or _load_litellm_backend()
184-
instance = cast("Backend", backend_cls(provider=provider, region=bedrock_region))
185+
instance = cast(
186+
"Backend",
187+
backend_cls(provider=provider, region=bedrock_region, profile_name=bedrock_profile),
188+
)
185189
logger.info("LiteLLM backend enabled (provider=%s, region=%s)", provider, bedrock_region)
186190
return instance
187191
except ImportError as exc:

headroom/proxy/server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,7 @@ def _router_config_for(kompress_disabled: bool) -> ContentRouterConfig:
945945
backend=config.backend,
946946
anyllm_provider=config.anyllm_provider,
947947
bedrock_region=config.bedrock_region,
948+
bedrock_profile=config.bedrock_profile,
948949
logger=logger,
949950
openai_api_url=config.openai_api_url,
950951
anyllm_backend_cls=AnyLLMBackend,

0 commit comments

Comments
 (0)