feat(#129): add LLM provider admin API endpoints
Implement REST API endpoints for managing LLM provider instances. Changes: - Created DTOs for provider CRUD operations (CreateLlmProviderDto, UpdateLlmProviderDto, LlmProviderResponseDto) - Implemented LlmProviderAdminController with full CRUD endpoints: - GET /llm/admin/providers - List all providers - GET /llm/admin/providers/:id - Get provider details - POST /llm/admin/providers - Create new provider - PATCH /llm/admin/providers/:id - Update provider - DELETE /llm/admin/providers/:id - Delete provider - POST /llm/admin/providers/:id/test - Test connection - POST /llm/admin/reload - Reload from database - Updated llm-manager.service.ts to support OpenAI and Claude providers - Added comprehensive test suite with 97.95% coverage - Proper validation, error handling, and type safety All tests pass. Pre-commit hooks pass. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import { Module } from "@nestjs/common";
|
||||
import { LlmController } from "./llm.controller";
|
||||
import { LlmProviderAdminController } from "./llm-provider-admin.controller";
|
||||
import { LlmService } from "./llm.service";
|
||||
import { LlmManagerService } from "./llm-manager.service";
|
||||
import { PrismaModule } from "../prisma/prisma.module";
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule],
|
||||
controllers: [LlmController],
|
||||
controllers: [LlmController, LlmProviderAdminController],
|
||||
providers: [LlmService, LlmManagerService],
|
||||
exports: [LlmService, LlmManagerService],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user