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
{{ message }}
Repository navigation
Commit 03c5f57
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,14 @@
13
13
prefix and an id already spelled for Bedrock as written; server-side refusal fallbacks are never sent there (Bedrock offers
14
14
none); a call whose credential chain is empty is a `503 AWS credential missing` by name. `llm.health` reports `region`
15
15
beside `backend` and `model`, and its check resolves the credential chain the way a call would, without spending a token.
16
-
The routes and the contract are unchanged: the shared vector file gains three Bedrock cases (66), byte-identical with the
17
-
Node pack, and the Bedrock client, its region and credential checks are pinned by unit tests. **Upgrade note:** none - the
16
+
Bedrock serves Claude on two surfaces and an account may be enabled for one only: `llm.aws.api` selects `mantle` (the
17
+
default, the Anthropic-shaped endpoint with the prefixed ids) or `runtime` (the classic one, every model id sent as written
18
+
- an inference profile id as the account lists it), and `llm.health` names the surface. Certified live on 2026-10-14 against
19
+
an enterprise account, negative controls first (a wrong secret a 401 by name, no credential a 503 by name), then a chat
20
+
reply, a structured verdict and a progressive stream on Haiku 4.5 through the runtime surface, from both packs and through
21
+
the Java engine's shipped triage graph and streaming relay (the engines' `docs/test-reports/llm-helper-certification.md`, Scenario 8, and this pack's own report).
22
+
The routes and the contract are unchanged: the shared vector file gains five Bedrock cases (68), byte-identical with the
23
+
Node pack, and the Bedrock clients, their region and credential checks are pinned by unit tests. **Upgrade note:** none - the
18
24
Claude API backend is the default and behaves as before; `llm.backend` now also accepts `bedrock`.
Copy file name to clipboardExpand all lines: docs/test-reports/llm-helper-certification.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,38 @@ nothing is gathered or sent once. The long gaps are the API's own pacing, the sa
47
47
no credential gave 503 through Java on all three layers and through Rust on the graph, and an invalid key gave Anthropic's 401 with its request id when this pack's client called the helper directly. The same message came from both helpers, through every layer. All traces that touched this helper rebuild
48
48
as one connected tree.
49
49
50
+
## Verified live on AWS Bedrock (2026-10-14)
51
+
52
+
The helper's second backend (`llm.backend: 'bedrock'`), driven against an enterprise AWS account in `us-east-1` with temporary IAM
53
+
credentials - a key pair and a session token - in the helper's environment and no vendor key anywhere. Negative controls first.
54
+
55
+
| Step | Result |
56
+
|---|---|
57
+
| A corrupted secret |`401 LLM provider error - 401 authentication_error: The request signature we calculated does not match ...`|
58
+
| No credential at all | health `503 AWS credential missing`; the call a bare 500 until this pack mapped the SDK's wording (below) |
The app listens on port 8086 (`rest.server.port` in `resources/application.yml`). Map its routes
36
45
from the engine's `event-over-http.yaml`, as the Java and Rust MiniGraph Playgrounds do:
37
46
@@ -54,7 +63,7 @@ token batches as they are produced.
54
63
| `prompt` or `messages` | A single user turn, or conversation turns `[{role: user\|assistant, content}]`. `messages` wins when both are given. Content is plain text. |
55
64
| `system` | Optional system prompt (text). |
56
65
| `schema` | `llm.chat` only. A JSON schema; the reply is then structured output, returned parsed as `data`. `additionalProperties` defaults to `false`. A schema on `llm.stream` is a 400. |
57
-
| `params.model` | The model. Default `claude-opus-5-5` (`llm.model`). On Bedrocka bare id is sent with the `anthropic.` prefix; an id already spelled for Bedrock is sent as written. |
66
+
| `params.model` | The model. Default `claude-opus-5-5` (`llm.model`). On Bedrock's default surface a bare id is sent with the `anthropic.` prefix and an id already spelled for Bedrock as written; on the classic runtime surface every id is sent as written, an inference profile id as the account lists it. |
| `params.timeout_ms` | `llm.chat`: a deadline for the whole call, SDK retries included. `llm.stream`: the idle allowance between events. Default 60000 (`llm.timeout.ms`). |
60
69
| `params.effort` | `low`, `medium`, `high`, `xhigh` or `max`. Sent only when set; otherwise the model's own default applies. A model that takes no effort parameter answers 400. |
@@ -121,6 +130,7 @@ the 422 above, not an empty stream. Raise `params.max_tokens` or lower `params.e
121
130
|---|---|---|
122
131
| `llm.backend` | `anthropic` | The route to the models: `anthropic`(the Claude API) or `bedrock` (AWS Bedrock); see Backends. |
123
132
| `llm.aws.region` | unset | The AWS region a Bedrock call is signed for. Unset, the SDK reads `AWS_REGION` / `AWS_DEFAULT_REGION`. |
133
+
| `llm.aws.api` | `mantle` | The Bedrock surface: `mantle`, the Anthropic-shaped endpoint, or `runtime`, the classic one; see Backends. |
124
134
| `llm.model` | `claude-opus-5-5` | The default model. |
125
135
| `llm.max.tokens` | `16000` | The default output cap. |
126
136
| `llm.timeout.ms` | `60000` | The default deadline (chat) or idle allowance (stream). |
@@ -166,7 +176,7 @@ contract and the vector file are the same on every backend.
166
176
| `llm.backend` | Client | Credential | Model id | Server-side fallbacks |
167
177
|---|---|---|---|---|
168
178
| `anthropic` (default) | the Claude API, `AsyncAnthropic` | `ANTHROPIC_API_KEY`, or whatever the SDK resolves | as written | on the models that support them |
169
-
| `bedrock` | AWS Bedrock, the SDK's `AsyncAnthropicBedrockMantle` | the AWS credential chain through IAM (`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`, a profile, a role), or a Bedrock API key in `AWS_BEARER_TOKEN_BEDROCK` | a bare id gets the `anthropic.` prefix; an id already spelled for Bedrock is sent as written | none - the request never carries them |
179
+
| `bedrock` | AWS Bedrock, the SDK's `AsyncAnthropicBedrockMantle` (`llm.aws.api: mantle`) or `AsyncAnthropicBedrock` (`runtime`) | the AWS credential chain through IAM (`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`, a profile, a role), or a Bedrock API key in `AWS_BEARER_TOKEN_BEDROCK` | `mantle`: a bare id gets the `anthropic.` prefix, an id already spelled for Bedrock is sent as written; `runtime`: every id as written | none - the request never carries them |
170
180
171
181
**AWS Bedrock.** Install the extra (`pip install 'mercury-composable[llm,bedrock]'` - it adds boto3,
172
182
which signs each call), set `llm.backend: 'bedrock'` and a region (`llm.aws.region`, or `AWS_REGION`
@@ -180,6 +190,16 @@ Effort, structured output and streaming work as on the Claude API. The SDK's cli
180
190
fallback middleware is not wired in; a refusal on Bedrock is the 422 or the `stop_details` of the
181
191
contract, like a refusal on the Claude API with `llm.fallbacks: off`.
182
192
193
+
**Two surfaces.** Bedrock serves Claude on two endpoints, and an account may be enabled for one and not the
194
+
other. `llm.aws.api: 'mantle'` (the default) is the Anthropic-shaped endpoint the SDK prefers, which takes the
195
+
vendor-prefixed ids above. `llm.aws.api: 'runtime'` is the classic Bedrock runtime, which takes an inference profile
196
+
id exactly as the account lists it (`us.anthropic.claude-haiku-4-5-20251001-v1:0` - they carry dates and versions no
197
+
rule can derive, so the helper sends every id as written there). The sign that an account lacks the default surface
198
+
is a `403 ... is not available for this account` on a model the console's playground runs: switch the surface and
199
+
name the model as a profile id. The same message on both surfaces, with the model agreement in place, is an account
200
+
enablement for that model generation - a conversation with the AWS account team, not a setting. `llm.health` reports
201
+
`api`beside `backend`, `model` and `region`. Bedrock sends no `request_id` the helper reads, so a reply carries none.
202
+
183
203
## What it does not do
184
204
185
205
No tools or function calling, no images or documents, no `system` turns inside `messages`, no
@@ -189,10 +209,10 @@ deliberate: the helper is the bounded AI node of a graph, not an agent runtime.
189
209
## Tests
190
210
191
211
`tests/test_llm_helper.py`runs the shared `tests/vectors/llm-helper-vectors.json` against a fake of
192
-
the SDK (66 cases: request validation, the exact SDK call, replies, the error contract, streaming,
193
-
the shape of a Bedrock call), plus the tests a vector cannot express (token batches are never held
194
-
back, no prompt text in a log, the deadline cancels the call, trace annotations, health, the backend
195
-
seam, the Bedrock client with its region and credential checks). No token is spent and no credential
212
+
the SDK (68 cases: request validation, the exact SDK call, replies, the error contract, streaming,
213
+
the shape of a Bedrock call on either surface), plus the tests a vector cannot express (token batches are
214
+
never held back, no prompt text in a log, the deadline cancels the call, trace annotations, health, the
215
+
backend seam, the Bedrock clients with their region and credential checks). No token is spent and no credential
0 commit comments