Skip to content

feat(eval): add --model-provider to imperative evaluator create/update - #2299

Merged
jariy17 merged 5 commits into
refactorfrom
model-provider-imperative
Sep 21, 2026
Merged

jariy17 merged 5 commits into
refactorfrom
model-provider-imperative

Conversation

@jariy17

@jariy17 jariy17 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

What

Adds --model-provider (Bedrock default / OpenResponses) to the imperative agentcore eval evaluator llm-as-a-judge create and update commands, and makes update provider-safe.

Verification

  • bun test .../sharedFlags.test.tsx .../core/evalEvaluatorProvider.test.tsx — 15 pass (provider resolution, arm construction, and the update-safety matrix: model-only Bedrock preserves tuning; instructions-only OpenResponses stays on the responses arm; provider switch requires a model; switch selects the correct arm without leaking the old tuning).
  • Existing fixture-backed evaluator.test.tsx — 32 pass (Bedrock path unchanged).
  • bun run typecheck + bun run lint:check clean; create/update --help list both providers.

Follow-ups

  • OpenResponses lifecycle service fixtures for evaluator.test.tsx require recording against an account with OpenResponses access (bug-bash item).
  • CDK synthesis of modelProvider: OpenResponses is handled by @aws/agentcore-cdk in the generated app; deploy-time verification in the bug-bash notes.

Bug-bash recording against the explore account to follow in a comment.

@jariy17

jariy17 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Bug bash — imperative evaluator commands (live, sandbox account, us-west-2)

Recorded with the TUI harness against a live AgentCore account. All cases verified end-to-end; the created evaluators were deleted afterward (no residue).

# Case Result
1 create --model-provider OpenAI (unsupported) ❌ fails fast, before any AWS call: invalid --model-provider "OpenAI": expected Bedrock or OpenResponses
2 create --model-provider OpenResponses --model openai.gpt-5.4 ✅ ACTIVE; service stores responsesEvaluatorModelConfig with maxOutputTokens: 4096, temperature: 0, no topP
3 instructions-only update on the OpenResponses evaluator ✅ stays on the responses arm — not silently converted to Bedrock, tuning preserved
4 update --model-provider Bedrock (no new model) ❌ rejected: changing provider requires a new --model (model ids are not portable across provider APIs)
5 provider switch with a new --model ✅ selects the target arm and does not leak the previous provider's tuning

Baseline Bedrock create/get/update/delete unchanged and green.

A screen recording of this run is archived internally (Artifactory); it is not linked here because this repository is public.

@jariy17
jariy17 added this pull request to stack #2302 September 14, 2026 22:32
@jariy17
jariy17 force-pushed the model-provider-imperative branch from 08361c7 to 1a0163c Compare September 15, 2026 18:41
@github-actions github-actions Bot added the size/m PR size: M label Sep 15, 2026
Base automatically changed from model-provider-project to refactor September 16, 2026 16:33
@jariy17
jariy17 force-pushed the model-provider-imperative branch from 1a0163c to 7d5a4bf Compare September 16, 2026 16:33
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Sep 16, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 16, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 16, 2026
@codecov-commenter

codecov-commenter commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.97590% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.25%. Comparing base (a23e472) to head (71af58e).
⚠️ Report is 1 commits behind head on refactor.

Files with missing lines Patch % Lines
...ers/eval/evaluator/llm-as-a-judge/create/index.tsx 70.58% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           refactor    #2299      +/-   ##
============================================
- Coverage     97.26%   97.25%   -0.02%     
============================================
  Files           610      610              
  Lines         40590    40656      +66     
============================================
+ Hits          39480    39540      +60     
- Misses         1110     1116       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Sep 16, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 16, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 16, 2026
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Sep 16, 2026
@jariy17
jariy17 force-pushed the model-provider-imperative branch from 63d05ef to 7d5a4bf Compare September 16, 2026 19:14
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Sep 16, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 16, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 16, 2026
@jariy17
jariy17 force-pushed the model-provider-imperative branch from 7d5a4bf to 0e1c57e Compare September 18, 2026 15:47
@github-actions github-actions Bot removed the size/m PR size: M label Sep 18, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 21, 2026
@notgitika

Copy link
Copy Markdown
Contributor

Failing CI test

@notgitika notgitika left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description mentioned this test file .../core/evalEvaluatorProvider.test.tsx which is not here was it meant to be included?

flag(
"model",
"judge model: a Bedrock model ID / ARN, or an OpenResponses model ID",
z.string().min(1),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we reuse the provider-specific model validation from project add evaluator here and in the update path?

string min 1 means at this point " " would be valid. not a blocker imo

@nborges-aws nborges-aws Sep 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@nborges-aws nborges-aws left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plus one on Gitika's comment on validation.

Also noticed the description mentions evalEvaluatorProvider.test.tsx under the testing header, but I don't see that file in the PR. Maybe it didn't get committed?

@jariy17

jariy17 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

I forgot to update the PR descriptions, ../core/evalEvaluatorProvider.test.tsx was proposely removed because the golden tests cover it.

@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Sep 21, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 21, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 21, 2026
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Sep 21, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 21, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 21, 2026
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Sep 21, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 21, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 21, 2026

@notgitika notgitika left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks this is great!

@jariy17
jariy17 merged commit 554c807 into refactor Sep 21, 2026
18 checks passed
@jariy17
jariy17 deleted the model-provider-imperative branch September 21, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants