Skip to content

feat: add controller support to AI orchestrator - #8953

Merged
tomivirkki merged 10 commits into
mainfrom
feat/ai-orchestrator-controller
Mar 19, 2026
Merged

tomivirkki merged 10 commits into
mainfrom
feat/ai-orchestrator-controller

Conversation

@tomivirkki

Copy link
Copy Markdown
Member

Description

  • Add AIController interface that allows extending the AI orchestrator with framework-agnostic tools and request lifecycle hooks
  • Add LLMProvider.ToolSpec interface for defining tools programmatically without depending on LangChain4j or Spring AI annotations
  • Support explicit tool definitions in LLMProvider.LLMRequest via explicitTools()
  • Implement ToolSpec execution in both LangChain4JLLMProvider and SpringAILLMProvider
  • Make AIController transient to avoid serialization failures, with restoration via reconnect().withControllers()
  • Warn on duplicate tool names across controllers

Fixes https://github.com/orgs/vaadin/projects/103/views/3?pane=issue&itemId=165657853

Type of change

Feature

tomivirkki and others added 7 commits March 18, 2026 12:13
Enable controller-based feature composition for AIOrchestrator.
Controllers provide framework-agnostic tools via LLMProvider.ToolDefinition
and receive post-request callbacks, allowing feature modules to extend
orchestrator behavior without subclassing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Controllers typically hold non-serializable references (Spring beans,
DB connections, etc.) so they should not be serialized with the
orchestrator. They are now restored via reconnect().withControllers().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nsistently

Log a warning when multiple tools share the same name to prevent
silent last-writer-wins behavior. Make Spring AI provider catch
tool execution exceptions consistently with LangChain4j. Document
the error contract on ToolDefinition.execute().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomivirkki
tomivirkki requested a review from ugur-vaadin March 18, 2026 10:47
tomivirkki and others added 3 commits March 19, 2026 16:19
@sonarqubecloud

Copy link
Copy Markdown

@tomivirkki
tomivirkki merged commit 0c2a7e6 into main Mar 19, 2026
6 checks passed
@tomivirkki
tomivirkki deleted the feat/ai-orchestrator-controller branch March 19, 2026 15:03
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 25.2.0-alpha2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants