You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# What does this PR do?
Rename Bedrock provider config fields from generic names (`api_key`,
`aws_bearer_token_bedrock`) to AWS-native names
(`aws_bedrock_bearer_token`) so the OpenAI-compatible Bedrock path reads
like an AWS credential-chain integration by default. Legacy field names
are preserved through Pydantic `AliasChoices` for backward
compatibility.
Related: #4730, #5388
Files changed:
- `config.py` -- rename `auth_credential` alias to
`aws_bedrock_bearer_token` with
`AliasChoices("aws_bedrock_bearer_token", "api_key")` for backward
compat
- `config.py` (BedrockProviderDataValidator) -- add
`AliasChoices("aws_bedrock_bearer_token", "aws_bearer_token_bedrock")`
for provider-data headers
- `bedrock.py` -- update `provider_data_api_key_field` and
`_should_use_sigv4()` to use the new field name
- `registry/inference.py` -- update provider description text
- `ci-tests/config.yaml`, `ci-tests/run-with-postgres-store.yaml`,
`starter/config.yaml`, `starter/run-with-postgres-store.yaml` -- rename
field and env var to `aws_bedrock_bearer_token` /
`AWS_BEDROCK_BEARER_TOKEN`
- `remote_bedrock.mdx` -- updated provider documentation
- `test_sigv4_auth.py`, `test_bedrock_adapter.py`,
`test_bedrock_config.py` -- updated to use new field names, added legacy
alias tests
## Test Plan
Unit tests covering new canonical names and legacy aliases (43 passed):
~~~bash
uv run pytest tests/unit/providers/inference/bedrock/test_sigv4_auth.py
\
tests/unit/providers/inference/test_bedrock_adapter.py \
tests/unit/providers/inference/test_bedrock_config.py -q
~~~
Live Bedrock smoke tests against a local OGX server in `us-east-2` with
SigV4 fallback and tested below successfully: `/v1/models` discovery,
OpenAI client non-streaming and streaming, empty/whitespace/null bearer
override fallback to SigV4 (both `aws_bedrock_bearer_token` and legacy
`aws_bearer_token_bedrock`), invalid bearer rejection with token-leak
check, valid bearer override with a real short-lived token (both keys),
concurrent request auth isolation mixing SigV4 and bearer paths,
repeated request smoke.
<!-- devin-review-badge-begin -->
---
<a href="https://app.devin.ai/review/ogx-ai/ogx/pull/5939"
target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open in Devin Review">
</picture>
</a>
<!-- devin-review-badge-end -->
Signed-off-by: skamenan7 <skamenan@redhat.com>
Copy file name to clipboardExpand all lines: docs/docs/providers/inference/remote_bedrock.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
description: "AWS Bedrock inference provider using OpenAI compatible endpoint."
2
+
description: "AWS Bedrock inference provider for the OpenAI-compatible runtime, with AWS credential-chain auth by default and an optional bearer-token override."
3
3
sidebar_label: Remote - Bedrock
4
4
title: remote::bedrock
5
5
---
@@ -8,15 +8,15 @@ title: remote::bedrock
8
8
9
9
## Description
10
10
11
-
AWS Bedrock inference provider using OpenAI compatible endpoint.
11
+
AWS Bedrock inference provider for the OpenAI-compatible runtime, with AWS credential-chain auth by default and an optional bearer-token override.
12
12
13
13
## Configuration
14
14
15
15
| Field | Type | Required | Default | Description |
|`allowed_models`|`list[str] \| None`| No || List of models that should be registered with the model registry. If None, all models are allowed. |
18
18
|`refresh_models`|`bool`| No | False | Whether to refresh models periodically from the provider |
19
-
|`api_key`|`SecretStr \| None`| No ||Authentication credential for the provider|
19
+
|`aws_bedrock_bearer_token`|`SecretStr \| None`| No ||Optional bearer token for Amazon Bedrock's OpenAI-compatible runtime. Leave unset to use the server's AWS credential chain (recommended).|
20
20
|`network`|`NetworkConfig \| None`| No || Network configuration including TLS, proxy, and timeout settings. |
21
21
|`network.tls`|`TLSConfig \| None`| No || TLS/SSL configuration for secure connections. |
22
22
|`network.tls.verify`|`bool \| Path`| No | True | Whether to verify TLS certificates. Can be a boolean or a path to a CA certificate file. |
0 commit comments