Skip to content

Commit b14398e

Browse files
committed
feat: implement decision-based routing with plugin architecture
Signed-off-by: bitliu <[email protected]>
1 parent cfdcd19 commit b14398e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/semantic-router/pkg/extproc/req_filter_classification.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,16 @@ func (r *OpenAIRouter) performDecisionEvaluationAndModelSelection(originalModel
7676

7777
// Select best model from the decision's ModelRefs
7878
if len(result.Decision.ModelRefs) > 0 {
79-
selectedModel = result.Decision.ModelRefs[0].Model
80-
logging.Infof("Selected model from decision %s: %s", decisionName, selectedModel)
79+
modelRef := result.Decision.ModelRefs[0]
80+
// Use LoRA name if specified, otherwise use the base model name
81+
selectedModel = modelRef.Model
82+
if modelRef.LoRAName != "" {
83+
selectedModel = modelRef.LoRAName
84+
logging.Infof("Selected model from decision %s: %s (LoRA adapter for base model %s)",
85+
decisionName, selectedModel, modelRef.Model)
86+
} else {
87+
logging.Infof("Selected model from decision %s: %s", decisionName, selectedModel)
88+
}
8189

8290
// Determine reasoning mode from the best model's configuration
8391
if result.Decision.ModelRefs[0].UseReasoning != nil {

0 commit comments

Comments
 (0)