fix(openai): selector 분류 오류 근거를 보존한다

This commit is contained in:
toki 2026-08-15 14:21:44 +09:00
parent 3ac0f46c7b
commit 85c6fc837c

View file

@ -1195,6 +1195,13 @@ func (s *Server) dispatchPresetTurn(
}
decision, err := classifyHotPathOutput(preset, issued, output, gate)
if err != nil {
if initialAdmission {
names := make([]string, 0, len(output.ToolCalls))
for _, call := range output.ToolCalls {
names = append(names, call.Name)
}
err = fmt.Errorf("%w; selector returned %d tool calls %q", err, len(output.ToolCalls), names)
}
if initialAdmission {
s.emitHotPathDispatchRejection(r.Context(), hotPathNormalizeMode(string(decision.Mode)), decision.Reason, requestID, stageID, preset.ID)
}