Conversation
|
Claude Security Review: no high-confidence findings. (run) |
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Changes requested
Main issue: OpenResponses cannot actually be deployed
This PR teaches the CLI to accept --model-provider OpenResponses and persist modelProvider: "OpenResponses" into agentcore.json, but the deployment path in aws/agentcore-l3-cdk-constructs doesn't know about this field:
src/schema/schemas/primitives/evaluator.ts—LlmAsAJudgeConfigSchemahas nomodelProviderfield. Default zod objects strip unknown keys, so on deploy the field is silently dropped.src/cdk/constructs/components/primitives/evaluator/AgentCoreEvaluator.ts(around line 92–108) unconditionally emitsevaluatorConfig.llmAsAJudge.modelConfig.bedrockEvaluatorModelConfig.modelId = llmAsAJudge.model. There is no OpenResponses branch.
The user-visible consequence is that agentcore add evaluator llm-as-a-judge --model-provider OpenResponses --model openai.gpt-5.4 ... will happily write the project file, but agentcore deploy will pass openai.gpt-5.4 as a Bedrock model ID and CloudFormation will fail (or, worse, silently try to invoke it against Bedrock). There's nothing between the CLI validator and CFN that tells the user the deploy path doesn't support OpenResponses.
Options to fix:
- Land the L3 side first (preferred). Add
modelProvidertoLlmAsAJudgeConfigSchemainagentcore-l3-cdk-constructs, teachAgentCoreEvaluatorto select the appropriatemodelConfigvariant (openResponsesEvaluatorModelConfig/whatever the CFN resource exposes), cut a release, bump the pinned version in the CLI, then merge this PR. - Gate the flag behind the L3 gaining support. Keep the schema change, but have the handler throw
InputValidationErrorfor--model-provider OpenResponseswith a "not yet supported end-to-end" message until the L3 catches up. Avoids shipping a footgun. - Reject at deploy time. Add a validation step in the deploy flow (e.g. in
handlers/project/deployor the CDK backend's spec check) that fails fast when it encountersllmAsAJudge.modelProvider === "OpenResponses"while the pinned L3 version doesn't support it. Less nice than option 1 or 2 because failure happens later.
Please pick one — as it stands the new flag is functionally advertising a capability the product doesn't have.
Nit-level (not blocking)
Not flagging any of the style items. Tests and validation logic themselves look good and use real temp projects (no fs mocking), matching the harness guidance.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2298 +/- ##
=========================================
Coverage 97.03% 97.03%
=========================================
Files 580 580
Lines 39630 39659 +29
=========================================
+ Hits 38453 38482 +29
Misses 1177 1177 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Bug bash — project add evaluator (live)Recorded with the TUI harness in a scratch project.
Validation ( A screen recording of this run is archived internally (Artifactory); it is not linked here because this repository is public. |
…-judge Support choosing the judge model provider on `agentcore project add evaluator llm-as-a-judge`. Bedrock stays the default and remains implicit in agentcore.json so existing projects are unchanged; OpenResponses is persisted explicitly as `modelProvider`. - Extend the evaluator project schema with EvaluatorModelProviderSchema, a provider-neutral model-id schema, and optional modelProvider on LlmAsAJudgeConfigSchema (kept optional for backward compatibility). - Validate the model per resolved provider: Bedrock via isValidBedrockModelId, OpenResponses as a non-empty printable identifier without spaces.
82502a8 to
551e07b
Compare
|
Claude Security Review: no high-confidence findings. (run) |
What
Adds
--model-provider(Bedrock default / OpenResponses) toagentcore project add evaluator llm-as-a-judge, so a project can declare an OpenResponses judge alongside the existing Bedrock one.Part 1 of 2. PR 2 (stacked) adds the same to the imperative
eval evaluator llm-as-a-judge create/updatecommands and makes updates provider-safe.Changes
src/projectSchemas/evaluator.ts):EvaluatorModelProviderSchema(Bedrock | OpenResponses), a provider-neutralEvaluatorModelIdSchema,isValidOpenResponsesModelId, and an optionalmodelProvideronLlmAsAJudgeConfigSchema.project add evaluator llm-as-a-judge):--model-providerflag, defaults to Bedrock, validates the model per resolved provider, and persistsmodelProvideronly for OpenResponses.Compatibility
agentcore.json— existing Bedrock projects require no changes.Verification
bun test src/projectSchemas/evaluator.test.ts+.../add/evaluator/llm-as-a-judge/index.test.ts— 30 pass.bun run typecheck+bun run lint:checkclean.--helplists Bedrock (default) and OpenResponses.Bug-bash recording against the explore account to follow in a comment.