feat(tenant): make monitoring parse & compliance judge models configurable
Replace the hardcoded doubao-lite model used for monitoring answer parsing and compliance LLM judging with configurable values, resolved from config with env overrides and a legacy default fallback. - Add llm.monitoring_answer_parse_model and compliance.llm_judge_model to config struct, env overrides, and all config files - Thread the resolved model through MonitoringCallbackService via a ConfigProvider and into parseMonitoringAnswerWithLLM - Pass compliance.llm_judge_model into the review-job LLM request Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,8 +12,26 @@ import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/geo-platform/tenant-api/internal/shared/config"
|
||||
)
|
||||
|
||||
func TestMonitoringAnswerParseModelUsesConfig(t *testing.T) {
|
||||
svc := (&MonitoringCallbackService{}).WithConfigProvider(config.NewStaticProvider(&config.Config{
|
||||
LLM: config.LLMConfig{MonitoringAnswerParseModel: " configured-monitoring-model "},
|
||||
}))
|
||||
|
||||
if got := svc.monitoringAnswerParseModel(); got != "configured-monitoring-model" {
|
||||
t.Fatalf("monitoringAnswerParseModel() = %q, want configured-monitoring-model", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMonitoringAnswerParseModelDefaultsToLegacyLite(t *testing.T) {
|
||||
if got := (&MonitoringCallbackService{}).monitoringAnswerParseModel(); got != defaultMonitoringAnswerParseLLMModel {
|
||||
t.Fatalf("monitoringAnswerParseModel() = %q, want %q", got, defaultMonitoringAnswerParseLLMModel)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDecideHeartbeatPrimaryLease(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
|
||||
Reference in New Issue
Block a user