a79d8282dc
- 15 Controller-Klassen ersetzen Minimal APIs in Program.cs - Repository Pattern mit Interfaces + Implementierungen (Project, Task, Activity, User) - AuthService verwendet jetzt IUserRepository statt direktem DbContext-Zugriff - SecurityHeadersMiddleware als eigenständige Middleware-Klasse - PathSecurityHelper als gemeinsamer Helper für Pfadvalidierung - DTOs in eigenem Namespace Nexus.Api.DTOs - EF-Entities in Nexus.Api.Data (vorher Nexus.Api.Domain) - Program.cs auf DI-Registrierung + Middleware reduziert - Alle 43 Endpoints unverändert erhalten - Build + 3/3 Tests erfolgreich
36 lines
1.0 KiB
C#
36 lines
1.0 KiB
C#
using Nexus.Api.Data;
|
|
using Nexus.Api.Integrations;
|
|
|
|
namespace Nexus.Api.Routing;
|
|
|
|
public sealed record RoutingTarget(
|
|
int Priority,
|
|
string Provider,
|
|
string Model,
|
|
string Purpose,
|
|
OperationalStatus Status,
|
|
string Detail);
|
|
|
|
public sealed class ModelRoutingService(
|
|
IAgentRuntime runtime)
|
|
{
|
|
public async Task<IReadOnlyCollection<RoutingTarget>> GetStatusAsync(
|
|
CancellationToken cancellationToken)
|
|
{
|
|
var runtimeStatus = await runtime.GetStatusAsync(cancellationToken);
|
|
|
|
return
|
|
[
|
|
new(1, "OpenClaw", "deepseek/deepseek-v4-flash", "Programmer agent",
|
|
runtimeStatus.Status,
|
|
"Routed through OpenClaw policy"),
|
|
new(2, "OpenClaw", "deepseek/deepseek-v4-pro", "Reviewer agent",
|
|
runtimeStatus.Status,
|
|
"Routed through OpenClaw policy"),
|
|
new(3, "OpenClaw", "openai/gpt-5.3-chat-latest", "Iris orchestrator",
|
|
runtimeStatus.Status,
|
|
"Routed through OpenClaw policy")
|
|
];
|
|
}
|
|
}
|