Skip to content

feat!: Add ManagedResult, RunnerResult, and Runner protocol; rename invoke() to run()#148

Draft
jsonbailey wants to merge 1 commit intojb/aic-2174/evaluationsfrom
jb/aic-2388/managed-result
Draft

feat!: Add ManagedResult, RunnerResult, and Runner protocol; rename invoke() to run()#148
jsonbailey wants to merge 1 commit intojb/aic-2174/evaluationsfrom
jb/aic-2388/managed-result

Conversation

@jsonbailey
Copy link
Copy Markdown
Contributor

Summary

Introduces the new managed-layer return type ManagedResult, the unified Runner protocol, and extends LDAIMetricSummary with tool_calls, duration_ms (renamed from duration), and resumption_token.

  • ManagedModel.run() is the new primary API; returns ManagedResult. ManagedModel.invoke() is preserved as a deprecated alias.
  • ManagedAgent.run() now returns ManagedResult.
  • RunnerResult added (no evaluations field — judge dispatch lives on the managed layer).
  • LDAIConfigTracker.__init__ seeds LDAIMetricSummary._resumption_token at instantiation so it's available on get_summary().
  • ModelResponse, StructuredResponse, AgentResult, ModelRunner, AgentRunner are deprecated (still present so OpenAI and LangChain provider packages keep working until the follow-up PRs migrate them to the unified Runner protocol).

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

@jsonbailey jsonbailey force-pushed the jb/aic-2388/managed-result branch from b0ca696 to d403590 Compare April 28, 2026 23:04
@jsonbailey jsonbailey changed the title feat(ldai)!: Add ManagedResult and Runner protocol feat!: Add ManagedResult, RunnerResult, and Runner protocol; rename invoke() to run() Apr 28, 2026
@jsonbailey jsonbailey force-pushed the jb/aic-2388/managed-result branch from d403590 to a564649 Compare April 28, 2026 23:08
…nvoke() to run()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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