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:
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
monitoringAnswerParseLLMModel = "doubao-seed-2-0-lite-260215"
|
||||
defaultMonitoringAnswerParseLLMModel = "doubao-seed-2-0-lite-260215"
|
||||
monitoringAnswerParseLLMTimeout = 30 * time.Second
|
||||
monitoringAnswerParseLLMMaxOutputTokens = 600
|
||||
)
|
||||
@@ -63,6 +63,7 @@ func parseMonitoringAnswerWithLLM(
|
||||
client sharedllm.Client,
|
||||
answer string,
|
||||
brandName string,
|
||||
model string,
|
||||
) (monitoringAnswerParseSummary, error) {
|
||||
answer = strings.TrimSpace(answer)
|
||||
brandName = strings.TrimSpace(brandName)
|
||||
@@ -72,9 +73,13 @@ func parseMonitoringAnswerWithLLM(
|
||||
if brandName == "" {
|
||||
return monitoringAnswerParseSummary{}, fmt.Errorf("brand name is empty")
|
||||
}
|
||||
model = strings.TrimSpace(model)
|
||||
if model == "" {
|
||||
model = defaultMonitoringAnswerParseLLMModel
|
||||
}
|
||||
|
||||
result, err := client.Generate(ctx, sharedllm.GenerateRequest{
|
||||
Model: monitoringAnswerParseLLMModel,
|
||||
Model: model,
|
||||
Prompt: buildMonitoringAnswerParsePrompt(answer, brandName),
|
||||
Timeout: monitoringAnswerParseLLMTimeout,
|
||||
MaxOutputTokens: monitoringAnswerParseLLMMaxOutputTokens,
|
||||
|
||||
Reference in New Issue
Block a user