Migration Overview
Baleybots v2 introduces several breaking changes aimed at simplifying the API and reducing complexity. This section covers the key changes and how to update your code.
Breaking changes
Configuration changes
The processor configuration API has been simplified. Key renames include finalResponseSchema → output: Output.object({ schema }), parameters → inputSchema for tools, and Baleybots.create() → Baleybot.create() (singular). The transport layer has been removed entirely.
See v1 to v2 Config Changes for full before/after examples.
Unified useChat hook
The useGroupChat hook is deprecated. All chat functionality is now handled by useChat, which supports both client mode and server mode via the apiUrl and chatId options.
See Unified useChat Hook for migration details.
Collapsed segment types
SpawnAgentSegment, SequentialThinkingSegment, and DSLPipelineSegment have been collapsed into ToolCallSegment. Use segment.name to identify the tool type.
See Collapsed Segment Types for rendering migration examples.
Alpha 171 cleanup (PRs #276 / #278)
If you are upgrading from alpha.170 or earlier to the current AI SDK v7 stack, see Alpha 171 Cleanup. Key breaks:
registerProviderremoved — pass an AI SDKLanguageModelasmodel:instead@baleybots/core/ensemblemoved — import from@baleybots/orchestration/ensembleagentMode/maxToolIterations→stopWhen— default isstepCountIs(50); usecombineConditions()to compose@baleybots/toolsis BAL-only — filesystem/bash moved to@baleybots/agent-tools; importtool()from core- Adapters archived —
@baleybots/handler,@baleybots/visualizer, andadapter-*packages removed