Skip to content

feat: wire evaluations tracking chain in ManagedModel.run()#1333

Draft
jsonbailey wants to merge 1 commit intojb/aic-2388/js-managed-resultfrom
jb/aic-1657/js-evaluations-chain
Draft

feat: wire evaluations tracking chain in ManagedModel.run()#1333
jsonbailey wants to merge 1 commit intojb/aic-2388/js-managed-resultfrom
jb/aic-1657/js-evaluations-chain

Conversation

@jsonbailey
Copy link
Copy Markdown
Contributor

Summary

  • ManagedModel.run() delegates to aiConfig.evaluator.evaluate() after getting the runner response
  • Wraps evaluation + tracker.trackJudgeResult() into a single Promise set on ManagedResult.evaluations
  • run() returns before ManagedResult.evaluations resolves
  • Awaiting evaluations guarantees both evaluation and tracking are complete
  • Removes evaluations from ChatResponse (moved to ManagedResult)
  • Adds TrackedChatRun.test.ts with tests covering the evaluation chain contract

Test plan

  • All 193 tests pass
  • run() returns ManagedResult before evaluations resolve
  • Awaiting evaluations guarantees tracking is called
  • No evaluators configured → empty evaluations promise

🤖 Generated with Claude Code

@jsonbailey jsonbailey force-pushed the jb/aic-2388/js-managed-result branch from fe6948b to 192315f Compare April 28, 2026 23:14
ManagedModel.run() now delegates to aiConfig.evaluator.evaluate() and wraps
evaluation + tracker.trackJudgeResult() into a single Promise set on
ManagedResult.evaluations. run() returns before evaluations resolves; awaiting
evaluations guarantees both evaluation and tracking are complete. Removes
evaluations from ChatResponse (moved to ManagedResult).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jsonbailey jsonbailey force-pushed the jb/aic-1657/js-evaluations-chain branch from 4494a66 to 2cad276 Compare April 28, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant