feat: wire up LlamaCppClient to model router

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
William Valentin
2026-02-05 13:20:20 -08:00
parent 8e7fa24fd6
commit d86710577d
3 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -1,7 +1,7 @@
import { Bot } from 'grammy';
import { Lifecycle } from './lifecycle.js';
import type { Config } from '../config/index.js';
import { AnthropicClient, OpenAIClient, OllamaClient, ModelRouter } from '../models/index.js';
import { AnthropicClient, OpenAIClient, OllamaClient, LlamaCppClient, ModelRouter } from '../models/index.js';
import { NativeAgent } from '../backends/index.js';
import { createTelegramBot } from '../frontends/telegram/index.js';
import { SessionStore, SessionManager } from '../session/index.js';
@@ -60,6 +60,11 @@ function createModelRouter(config: Config): ModelRouter {
model: models.local.model,
host: models.local.endpoint,
});
} else if (models.local.provider === 'llamacpp') {
localClient = new LlamaCppClient({
endpoint: models.local.endpoint ?? 'http://localhost:8080',
authToken: models.local.auth_token,
});
}
}