@cat-factory/provider-bedrock 0.7.354 → 0.7.356
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/README.md +20 -6
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -27,17 +27,17 @@ The Node facade wires Bedrock automatically **when `BEDROCK_REGION` is set** (se
|
|
|
27
27
|
`bedrockRegistry(...)` to the composite's extra registries:
|
|
28
28
|
|
|
29
29
|
```ts
|
|
30
|
-
|
|
30
|
+
// ONE pair of readers, shared with the model catalog's `bedrock` capability: see below.
|
|
31
|
+
const bedrockRegion = bedrockRegionFromEnv(env)
|
|
32
|
+
if (bedrockRegion) {
|
|
33
|
+
const supportedModels = bedrockAllowListFromEnv(env)
|
|
31
34
|
extraRegistries.push(
|
|
32
35
|
bedrockRegistry({
|
|
33
|
-
region:
|
|
36
|
+
region: bedrockRegion,
|
|
34
37
|
accessKeyId: env.AWS_ACCESS_KEY_ID,
|
|
35
38
|
secretAccessKey: env.AWS_SECRET_ACCESS_KEY,
|
|
36
39
|
sessionToken: env.AWS_SESSION_TOKEN,
|
|
37
|
-
|
|
38
|
-
supportedModels: env.BEDROCK_MODELS?.split(',')
|
|
39
|
-
.map((m) => m.trim())
|
|
40
|
-
.filter(Boolean),
|
|
40
|
+
...(supportedModels ? { supportedModels: [...supportedModels] } : {}),
|
|
41
41
|
}),
|
|
42
42
|
)
|
|
43
43
|
}
|
|
@@ -48,6 +48,13 @@ optional `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` / `AWS_SESSION_TOKEN` (om
|
|
|
48
48
|
ambient AWS credential chain; instance role, `~/.aws`, etc.), and optional `BEDROCK_MODELS`
|
|
49
49
|
(comma-separated allow-list).
|
|
50
50
|
|
|
51
|
+
**`BEDROCK_MODELS` does double duty**, which is why it is parsed by
|
|
52
|
+
`bedrockAllowListFromEnv` (`@cat-factory/server`) rather than inline: the same value becomes
|
|
53
|
+
this resolver's allow-list AND `ProviderCapabilities.bedrockModels`, which decides whether a
|
|
54
|
+
catalog model's `bedrock` flavour is selectable in the picker. Parsed separately, the picker
|
|
55
|
+
could offer an id this resolver throws on. Details:
|
|
56
|
+
[`model-support.md` §8](../../docs/model-support.md).
|
|
57
|
+
|
|
51
58
|
### Cloudflare Worker facade: via `registerModelRegistry`
|
|
52
59
|
|
|
53
60
|
The Worker's base registry ships without the SDK; a deployment mixes Bedrock in at startup
|
|
@@ -66,6 +73,13 @@ reaches all paths (HTTP requests, the durable Workflow driver, and the cron swee
|
|
|
66
73
|
one entry point. The factory receives the runtime `env`, so credentials/region come from the
|
|
67
74
|
deployment's configuration.
|
|
68
75
|
|
|
76
|
+
**The registration is also what unlocks the picker flavour on this facade.** The Worker reads
|
|
77
|
+
`BEDROCK_REGION` / `BEDROCK_MODELS` for the per-model enablement, but grants the capability only
|
|
78
|
+
when a registered registry can actually serve `bedrock` (`bedrockModelsCapability` in
|
|
79
|
+
`ai/registries.ts`): the env vars alone don't prove this package was mixed in, and offering the
|
|
80
|
+
flavour on them would put rows in the picker whose dispatch fails. Set-but-unregistered logs a
|
|
81
|
+
warning naming the missing `registerModelRegistry` call.
|
|
82
|
+
|
|
69
83
|
## How it resolves a model
|
|
70
84
|
|
|
71
85
|
The resolver forwards `ref.model` to the Bedrock provider (`createAmazonBedrock(...)`). A model is
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/provider-bedrock",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.356",
|
|
4
4
|
"description": "Opt-in AWS Bedrock model registry for the Agent Architecture Board's AI provisioning facade. Mix into a CompositeModelProvider to add the `bedrock` provider.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@ai-sdk/amazon-bedrock": "^5.0.40",
|
|
28
28
|
"ai": "^7.0.47",
|
|
29
|
-
"@cat-factory/agents": "0.106.
|
|
30
|
-
"@cat-factory/kernel": "0.
|
|
29
|
+
"@cat-factory/agents": "0.106.4",
|
|
30
|
+
"@cat-factory/kernel": "0.220.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"typescript": "7.0.2",
|