Summary
resolveBedrockModelIds (cdk/src/constructs/bedrock-models.ts) rejects any context value that isn't a real array. But CDK delivers a -c key=value context value as a raw string, not parsed JSON — so the -c form the function's own JSDoc advertises throws at synth:
cdk deploy -c 'bedrockModels=["anthropic.claude-sonnet-4-6"]'
# Error: Context 'bedrockModels' must be a non-empty array of foundation-model IDs …;
# got "[\"anthropic.claude-sonnet-4-6\"]".
The cdk.context.json array form works; the documented -c CLI form does not.
Context
Flagged by @isadeks in the re-review of #358 as a non-blocking follow-up: the AZ override (resolveAgentCoreAzOverride) was fixed there to JSON.parse a string context value; resolveBedrockModelIds shares the same structural limitation and its JSDoc already documents a -c bedrockModels='[...]' form.
Acceptance criteria
Out of scope
No behavior change to the default model set or the grant sites; this only fixes context-value parsing.
Summary
resolveBedrockModelIds(cdk/src/constructs/bedrock-models.ts) rejects any context value that isn't a real array. But CDK delivers a-c key=valuecontext value as a raw string, not parsed JSON — so the-cform the function's own JSDoc advertises throws at synth:The
cdk.context.jsonarray form works; the documented-cCLI form does not.Context
Flagged by @isadeks in the re-review of #358 as a non-blocking follow-up: the AZ override (
resolveAgentCoreAzOverride) was fixed there toJSON.parsea string context value;resolveBedrockModelIdsshares the same structural limitation and its JSDoc already documents a-c bedrockModels='[...]'form.Acceptance criteria
resolveBedrockModelIdsJSON.parses a string context value before the array check, so the-cform and thecdk.context.jsonarray form behave identically.us./eu./apac.inference-profile ID).-cJSON-string array (success), and a JSON string that doesn't parse to an array (throws).tsc, ESLint, and the AI004 masking scan stay clean.Out of scope
No behavior change to the default model set or the grant sites; this only fixes context-value parsing.