fix: add API key/auth token support across all model clients
This commit is contained in:
@@ -68,10 +68,28 @@ export function createTelegramBot(config: TelegramBotConfig): Bot {
|
||||
|
||||
bot.command('status', async (ctx) => {
|
||||
const pending = hookEngine?.getPendingConfirmations() ?? [];
|
||||
const statusMsg = `Flynn is running.\nPending confirmations: ${pending.length}`;
|
||||
const currentTier = config.agent.getModelTier();
|
||||
const tierDisplay = currentTier === 'local' ? '🏠 Local (Qwen)' : '☁️ Cloud (Claude)';
|
||||
const statusMsg = `Flynn is running.\nModel: ${tierDisplay}\nPending confirmations: ${pending.length}`;
|
||||
await ctx.reply(statusMsg);
|
||||
});
|
||||
|
||||
bot.command('local', async (ctx) => {
|
||||
config.agent.setModelTier('local');
|
||||
await ctx.reply('🏠 Switched to local model (Qwen 2.5 14B)');
|
||||
});
|
||||
|
||||
bot.command('cloud', async (ctx) => {
|
||||
config.agent.setModelTier('default');
|
||||
await ctx.reply('☁️ Switched to cloud model (Claude Opus 4.5)');
|
||||
});
|
||||
|
||||
bot.command('model', async (ctx) => {
|
||||
const currentTier = config.agent.getModelTier();
|
||||
const tierDisplay = currentTier === 'local' ? '🏠 Local (Qwen 2.5 14B)' : '☁️ Cloud (Claude Opus 4.5)';
|
||||
await ctx.reply(`Current model: ${tierDisplay}\n\nCommands:\n/local - Switch to local model\n/cloud - Switch to cloud model`);
|
||||
});
|
||||
|
||||
// Message handler
|
||||
bot.on('message:text', async (ctx) => {
|
||||
const text = ctx.message.text;
|
||||
|
||||
Reference in New Issue
Block a user