@@ -24,9 +24,8 @@ func TestPrefixPlugin(t *testing.T) {
24
24
25
25
// First request.
26
26
req1 := & types.LLMRequest {
27
- Model : "test-model1" ,
28
- ResolvedTargetModel : "test-model1" ,
29
- Prompt : "aaaaaa" ,
27
+ TargetModel : "test-model1" ,
28
+ Prompt : "aaaaaa" ,
30
29
}
31
30
ctx := types .NewSchedulingContext (context .Background (), req1 , pods )
32
31
plugin .PreSchedule (ctx )
@@ -49,9 +48,8 @@ func TestPrefixPlugin(t *testing.T) {
49
48
// Second request doesn't share any prefix with first one. It should be added to the cache but
50
49
// the pod score should be 0.
51
50
req2 := & types.LLMRequest {
52
- Model : "test-model2" ,
53
- ResolvedTargetModel : "test-model2" ,
54
- Prompt : "bbbbbb" ,
51
+ TargetModel : "test-model2" ,
52
+ Prompt : "bbbbbb" ,
55
53
}
56
54
ctx = types .NewSchedulingContext (context .Background (), req2 , pods )
57
55
plugin .PreSchedule (ctx )
@@ -73,9 +71,8 @@ func TestPrefixPlugin(t *testing.T) {
73
71
74
72
// Third request shares partial prefix with first one.
75
73
req3 := & types.LLMRequest {
76
- Model : "test-model1" ,
77
- ResolvedTargetModel : "test-model1" ,
78
- Prompt : "aaaabbbb" ,
74
+ TargetModel : "test-model1" ,
75
+ Prompt : "aaaabbbb" ,
79
76
}
80
77
ctx = types .NewSchedulingContext (context .Background (), req3 , pods )
81
78
plugin .PreSchedule (ctx )
@@ -96,9 +93,8 @@ func TestPrefixPlugin(t *testing.T) {
96
93
97
94
// 4th request is same as req3 except the model is different, still no match.
98
95
req4 := & types.LLMRequest {
99
- Model : "test-model-new" ,
100
- ResolvedTargetModel : "test-model-new" ,
101
- Prompt : "aaaabbbb" ,
96
+ TargetModel : "test-model-new" ,
97
+ Prompt : "aaaabbbb" ,
102
98
}
103
99
ctx = types .NewSchedulingContext (context .Background (), req4 , pods )
104
100
plugin .PreSchedule (ctx )
@@ -119,9 +115,8 @@ func TestPrefixPlugin(t *testing.T) {
119
115
120
116
// 5th request shares partial prefix with 3rd one.
121
117
req5 := & types.LLMRequest {
122
- Model : "test-model1" ,
123
- ResolvedTargetModel : "test-model1" ,
124
- Prompt : "aaaabbbbcccc" ,
118
+ TargetModel : "test-model1" ,
119
+ Prompt : "aaaabbbbcccc" ,
125
120
}
126
121
ctx = types .NewSchedulingContext (context .Background (), req5 , pods )
127
122
plugin .PreSchedule (ctx )
0 commit comments