v1 to v2 Config Changes
This page lists all configuration changes from v1 to v2 with before/after examples.
Class name: Baleybots to Baleybot
The class was renamed from plural to singular. Both Baleybot.create() and new Baleybot() work in v2.
// Before (v1)
import { Baleybots } from '@baleybots/core';
const bot = Baleybots.create({ ... });
// After (v2)
import { Baleybot } from '@baleybots/core';
const bot = Baleybot.create({ ... });
// or
const bot = new Baleybot({ ... });
Output schema: finalResponseSchema to outputSchema
// Before (v1)
const bot = Baleybots.create({
name: 'analyzer',
analysisGoal: 'Analyze sentiment',
finalResponseSchema: schema,
});
// After (v2)
const bot = Baleybot.create({
name: 'analyzer',
goal: 'Analyze sentiment',
outputSchema: schema,
});
Goal: analysisGoal to goal
// Before (v1)
const bot = Baleybots.create({
analysisGoal: 'Analyze the given text',
});
// After (v2)
const bot = Baleybot.create({
goal: 'Analyze the given text',
});
Tool input schema: parameters to inputSchema
// Before (v1)
const myTool = {
name: 'search',
description: 'Search the web',
parameters: z.object({ query: z.string() }),
execute: async ({ query }) => { ... },
};
// After (v2)
const myTool = tool(
'search',
'Search the web',
z.object({ query: z.string() }),
async ({ query }) => { ... }
);
API key and provider config
Provider configuration has been moved out of the top-level config into model.provider.
// Before (v1)
const bot = Baleybots.create({
name: 'bot',
analysisGoal: 'Help users',
apiKey: 'sk-...',
baseUrl: 'https://custom-endpoint.com/v1',
model: 'gpt-4.1',
});
// After (v2)
const bot = new Baleybot({
name: 'bot',
goal: 'Help users',
model: {
id: 'gpt-4.1',
provider: {
apiKey: 'sk-...',
baseUrl: 'https://custom-endpoint.com/v1',
},
},
});
Transport layer removed
The transport layer (HttpClient, custom transports) has been replaced with a simple fetch override on model.provider.
// Before (v1)
import { HttpClient } from '@baleybots/core';
const transport = new HttpClient({ fetch: tauriFetch });
const bot = Baleybots.create({ transport });
// After (v2)
const bot = new Baleybot({
name: 'bot',
goal: 'Help users',
model: {
id: 'gpt-4.1',
provider: { fetch: tauriFetch },
},
});
Summary of renames
| v1 | v2 |
|---|---|
Baleybots | Baleybot |
Baleybots.create() | Baleybot.create() or new Baleybot() |
analysisGoal | goal |
finalResponseSchema | outputSchema |
parameters (tool) | inputSchema |
apiKey (top-level) | model.provider.apiKey |
baseUrl (top-level) | model.provider.baseUrl |
transport | model.provider.fetch |