feat!: Add ManagedResult, RunnerResult, and Runner protocol; rename invoke() to run()#148
Draft
jsonbailey wants to merge 1 commit intojb/aic-2174/evaluationsfrom
Draft
feat!: Add ManagedResult, RunnerResult, and Runner protocol; rename invoke() to run()#148jsonbailey wants to merge 1 commit intojb/aic-2174/evaluationsfrom
jsonbailey wants to merge 1 commit intojb/aic-2174/evaluationsfrom
Conversation
b0ca696 to
d403590
Compare
d403590 to
a564649
Compare
…nvoke() to run() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a564649 to
bd4cd68
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces the new managed-layer return type
ManagedResult, the unifiedRunnerprotocol, and extendsLDAIMetricSummarywithtool_calls,duration_ms(renamed fromduration), andresumption_token.ManagedModel.run()is the new primary API; returnsManagedResult.ManagedModel.invoke()is preserved as a deprecated alias.ManagedAgent.run()now returnsManagedResult.RunnerResultadded (noevaluationsfield — judge dispatch lives on the managed layer).LDAIConfigTracker.__init__seedsLDAIMetricSummary._resumption_tokenat instantiation so it's available onget_summary().ModelResponse,StructuredResponse,AgentResult,ModelRunner,AgentRunnerare deprecated (still present so OpenAI and LangChain provider packages keep working until the follow-up PRs migrate them to the unifiedRunnerprotocol).Stack
This is part of the AIC-2388 stacked PR series. Targets the AIC-2174 evaluations branch.
Order: PR 7 → PR 8 (this) → PR 8-openai → PR 8-langchain → PR 9 → PR 10 → PR 11 → PR 11-openai → PR 11-langchain → PR 12
Test plan
make test— all 261 tests pass (server-ai 140, langchain 81, openai 40)make lint— mypy clean across all 3 packages🤖 Generated with Claude Code