Commit 742fe2a
committed
fix(bedrock): address upstream review findings
- catch PermissionDeniedError (403) alongside AuthenticationError (401)
in openai_chat_completion; SigV4 AccessDenied and SignatureDoesNotMatch
from AWS come back as 403, not 401, and were bypassing the sanitized
error path and leaking raw provider messages
- add boto3 to pip_packages in the inference Bedrock provider registry
spec; sigv4_auth.py imports botocore at module level so provider-scoped
installs without boto3 would fail at runtime (safety spec already had it)
- make aws_role_arn the first branch in create_bedrock_client so that
static credentials plus a role ARN correctly triggers assume-role
instead of silently ignoring the role (matches inference adapter behavior)
- fix broken import in test_network_config.py; _build_network_client_kwargs
was renamed to build_network_client_kwargs (public) in this PR but the
test file was not updated, causing an ImportError at collection time
Signed-off-by: skamenan7 <skamenan@redhat.com>1 parent 51f319e commit 742fe2a
File tree
2 files changed
+7
-3
lines changed- src/llama_stack/providers/remote/inference/bedrock
- tests/unit/providers/utils/inference
2 files changed
+7
-3
lines changedLines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
0 commit comments