@plumbus/ai-bedrock 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +3 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/bedrock-adapter.d.ts.map +1 -1
- package/dist/bedrock-adapter.js +104 -6
- package/dist/bedrock-adapter.js.map +1 -1
- package/instructions/framework.md +6 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @plumbus/ai-bedrock
|
|
2
2
|
|
|
3
|
+
## 0.2.2 — 2026-10-08
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Prompt caching on Converse / ConverseStream (#63). When a request sets `cache` (core 0.7.9+ passes it from `ctx.ai`, `runToolLoop`, and `AI_PROMPT_CACHE`), the adapter appends `cachePoint` after the system text, at the end of `toolConfig.tools`, and on the last message when requested. Only Claude model ids get marks, with or without an inference-profile prefix (`us.`, `jp.`, `us-gov.`, …); a model ARN gets none. Claude 3 Haiku, Claude 3 Sonnet, Claude 3 Opus, and Claude 3.5 Sonnet `20240620` get no marks because Bedrock rejects `cachePoint` for them with a ValidationException, and neither does Claude 3.5 Sonnet v2 (`20241022`), whose explicit caching AWS lists as Preview; other model families get none either, so those requests still succeed.
|
|
8
|
+
|
|
9
|
+
### Compatibility
|
|
10
|
+
|
|
11
|
+
- Loads and runs on any core 0.7.x. The `cache` option is resolved inside this package, which imports nothing from `@plumbus/core` that 0.7.0 lacks. On cores before 0.7.9, `ctx.ai` never sets `cache`, so requests are unchanged. The peer range stays `0.7.x`.
|
|
12
|
+
|
|
3
13
|
## 0.2.1 — 2026-09-10
|
|
4
14
|
|
|
5
15
|
### Fixed
|
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ An opt-in peer keeps core lean while giving AWS shops a first-class `provider: '
|
|
|
46
46
|
|
|
47
47
|
## Status
|
|
48
48
|
|
|
49
|
-
Optional peer of `@plumbus/core` (version-locked **`0.2.x`**; required peer `@plumbus/core` **`0.7.x`**). **Runtime floor:** `@plumbus/core` **≥ 0.
|
|
49
|
+
Optional peer of `@plumbus/core` (version-locked **`0.2.x`**; required peer `@plumbus/core` **`0.7.x`**). **Runtime floor:** `@plumbus/core` **≥ 0.7.0**; prompt caching through `ctx.ai` needs **≥ 0.7.9**. Install alone is not enough until the adapter is registered (env discovery or `createBedrockAdapter`).
|
|
50
50
|
|
|
51
51
|
## Install
|
|
52
52
|
|
|
@@ -129,11 +129,12 @@ Full curl, normalize script, ConfigMap sketch: **[instructions/pricing.md](./ins
|
|
|
129
129
|
- **Model access** — Converse fails with `AccessDenied` until the account enables the model (and Anthropic use-case forms where required).
|
|
130
130
|
- **Embeddings** — Converse does not embed; use InvokeModel (Titan) via `createRAGPipeline({ provider })` + `ctx.ai.retrieve` / `ragPipeline.ingest`. There is no `ctx.ai.embed`. `plumbus rag ingest` does not auto-select Bedrock. Mantle typically has no embeddings.
|
|
131
131
|
- **Tools** — use `runToolLoop` / `generateWithUsage({ tools })`; do not call the Bedrock SDK. Stream accumulates partial tool JSON. Parallel tool results are coalesced into the single user turn Converse requires.
|
|
132
|
+
- **Prompt caching** — set `cache` on `ctx.ai.*` / `runToolLoop`, or `AI_PROMPT_CACHE=true` (core ≥ 0.7.9). Claude models get Converse `cachePoint` marks, except Claude 3 Haiku / Sonnet / Opus and Claude 3.5 Sonnet `20240620`, which reject them, and Claude 3.5 Sonnet v2 (Preview-only on Bedrock); other families get none.
|
|
132
133
|
- **`toolChoice: 'none'`** — Bedrock has no true none; Plumbus omits `toolConfig` entirely. `'auto'` omits just the `toolChoice` field (model-dependent support).
|
|
133
134
|
- **Missing pricing file** — file mode throws on first call; auto-download failure warns, leaves cost unknown, and backs off 5 minutes before retrying.
|
|
134
135
|
- **Unmapped / unkeyed models** — inference works; **no `cost` field** is set until the pricing file has an explicit family-key row (auto-download is best-effort, not a complete AWS catalog). Core then falls back to its own catalog rather than recording the call as free.
|
|
135
136
|
- **IAM** — Converse itself requires `bedrock:InvokeModel`; do not scope that action to embedding models only.
|
|
136
|
-
- **Wiring** — after install, `plumbus init --patch` (core
|
|
137
|
+
- **Wiring** — after install, `plumbus init --patch` (wiring v13+, any core 0.7.x) so agents see `instructions/`.
|
|
137
138
|
|
|
138
139
|
## Documentation / Agent recipes
|
|
139
140
|
|