Skip to content

Commit 8b27d70

Browse files
Copilotrootfs
andcommitted
Fix test struct definitions to match actual config types
Co-authored-by: rootfs <[email protected]>
1 parent 38ce070 commit 8b27d70

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,22 +244,30 @@ func TestHandleResponsesAPIRequest_AutoModelSelection(t *testing.T) {
244244
{
245245
Name: "math",
246246
Description: "Mathematical calculations and equations",
247-
Models: []string{"deepseek-v3"},
247+
ModelScores: []config.ModelScore{
248+
{Model: "deepseek-v3", Score: 0.95},
249+
},
248250
},
249251
{
250252
Name: "general",
251253
Description: "General conversation and questions",
252-
Models: []string{"gpt-4o-mini"},
254+
ModelScores: []config.ModelScore{
255+
{Model: "gpt-4o-mini", Score: 0.90},
256+
},
253257
},
254258
},
255259
}
256260

257261
// Create a mock classifier
258262
classifier := &classification.Classifier{
259263
CategoryMapping: &classification.CategoryMapping{
260-
ID2Label: map[int]string{
261-
0: "math",
262-
1: "general",
264+
IdxToCategory: map[string]string{
265+
"0": "math",
266+
"1": "general",
267+
},
268+
CategoryToIdx: map[string]int{
269+
"math": 0,
270+
"general": 1,
263271
},
264272
},
265273
}

0 commit comments

Comments
 (0)