Commit 4302e2f
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 3abb856 commit 4302e2f
2 files changed
Lines changed: 7 additions & 3 deletions
File tree
- src/llama_stack/providers/remote/inference/bedrock
- tests/unit/providers/utils/inference
Lines 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 | | |
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| |||
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