Feature: Add configurable LLM model name

This commit is contained in:
WLTBAgent
2026-02-16 17:18:31 +00:00
parent 3c2d356eb0
commit 69dfdc5f87
6 changed files with 125 additions and 5 deletions

View File

@@ -34,6 +34,7 @@ class AdminController {
$clientId = $this->config->getAppValue('google_client_id', 'analyticshub', '');
$apiKey = $this->config->getAppValue('anthropic_api_key', 'analyticshub', '');
$llmEndpoint = $this->config->getAppValue('llm_api_endpoint', 'analyticshub', '');
$llmModel = $this->config->getAppValue('llm_model', 'analyticshub', '');
$refreshToken = $this->config->getAppValue('google_refresh_token', 'analyticshub', '');
// Check if configured
@@ -56,6 +57,7 @@ class AdminController {
'google_client_id' => $clientId,
'google_refresh_token' => $maskedRefreshToken,
'llm_api_endpoint' => $llmEndpoint,
'llm_model' => $llmModel,
'anthropic_api_key' => $maskedApiKey,
'is_configured' => $isConfigured,
],
@@ -80,6 +82,7 @@ class AdminController {
$refreshToken = $data['google_refresh_token'] ?? '';
$apiKey = $data['anthropic_api_key'] ?? '';
$llmEndpoint = $data['llm_api_endpoint'] ?? '';
$llmModel = $data['llm_model'] ?? '';
if (empty($clientId) || empty($clientSecret) || empty($apiKey)) {
return new JSONResponse([
@@ -100,6 +103,10 @@ class AdminController {
$this->config->setAppValue('llm_api_endpoint', 'analyticshub', $llmEndpoint);
}
if (!empty($llmModel)) {
$this->config->setAppValue('llm_model', 'analyticshub', $llmModel);
}
$this->config->setAppValue('anthropic_api_key', 'analyticshub', $apiKey);
// Check if fully configured