@@ -32,7 +32,7 @@ func TestNewClientWithWrongType(t *testing.T) {
3232}
3333
3434func TestBuildDockerConfigureArgs (t * testing.T ) {
35- args := buildDockerModelConfigureArgs ("ai/qwen3:14B-Q6_K" , 8192 , []string {"--temp" , "0.7" , "--top-p" , "0.9" }, nil )
35+ args := buildDockerModelConfigureArgs ("ai/qwen3:14B-Q6_K" , int64Ptr ( 8192 ) , []string {"--temp" , "0.7" , "--top-p" , "0.9" }, nil )
3636
3737 assert .Equal (t , []string {"model" , "configure" , "--context-size=8192" , "ai/qwen3:14B-Q6_K" , "--" , "--temp" , "0.7" , "--top-p" , "0.9" }, args )
3838}
@@ -52,7 +52,7 @@ func TestIntegrateFlagsWithProviderOptsOrder(t *testing.T) {
5252 cfg := & latest.ModelConfig {
5353 Temperature : floatPtr (0.6 ),
5454 TopP : floatPtr (0.9 ),
55- MaxTokens : 4096 ,
55+ MaxTokens : int64Ptr ( 4096 ) ,
5656 ProviderOpts : map [string ]any {
5757 "runtime_flags" : []string {"--threads" , "6" },
5858 },
@@ -84,13 +84,17 @@ func floatPtr(f float64) *float64 {
8484 return & f
8585}
8686
87+ func int64Ptr (i int64 ) * int64 {
88+ return & i
89+ }
90+
8791func TestBuildDockerConfigureArgsWithSpeculativeDecoding (t * testing.T ) {
8892 specOpts := & speculativeDecodingOpts {
8993 draftModel : "ai/qwen3:1B" ,
9094 numTokens : 5 ,
9195 acceptanceRate : 0.8 ,
9296 }
93- args := buildDockerModelConfigureArgs ("ai/qwen3:14B-Q6_K" , 8192 , []string {"--temp" , "0.7" }, specOpts )
97+ args := buildDockerModelConfigureArgs ("ai/qwen3:14B-Q6_K" , int64Ptr ( 8192 ) , []string {"--temp" , "0.7" }, specOpts )
9498
9599 assert .Equal (t , []string {
96100 "model" , "configure" ,
@@ -110,7 +114,7 @@ func TestBuildDockerConfigureArgsWithPartialSpeculativeDecoding(t *testing.T) {
110114 numTokens : 5 ,
111115 // acceptanceRate not set (0 value)
112116 }
113- args := buildDockerModelConfigureArgs ("ai/qwen3:14B-Q6_K" , 0 , nil , specOpts )
117+ args := buildDockerModelConfigureArgs ("ai/qwen3:14B-Q6_K" , nil , nil , specOpts )
114118
115119 assert .Equal (t , []string {
116120 "model" , "configure" ,
@@ -122,7 +126,7 @@ func TestBuildDockerConfigureArgsWithPartialSpeculativeDecoding(t *testing.T) {
122126
123127func TestParseDMRProviderOptsWithSpeculativeDecoding (t * testing.T ) {
124128 cfg := & latest.ModelConfig {
125- MaxTokens : 4096 ,
129+ MaxTokens : int64Ptr ( 4096 ) ,
126130 ProviderOpts : map [string ]any {
127131 "speculative_draft_model" : "ai/qwen3:1B" ,
128132 "speculative_num_tokens" : "5" ,
@@ -143,7 +147,7 @@ func TestParseDMRProviderOptsWithSpeculativeDecoding(t *testing.T) {
143147
144148func TestParseDMRProviderOptsWithoutSpeculativeDecoding (t * testing.T ) {
145149 cfg := & latest.ModelConfig {
146- MaxTokens : 4096 ,
150+ MaxTokens : int64Ptr ( 4096 ) ,
147151 ProviderOpts : map [string ]any {
148152 "runtime_flags" : []string {"--threads" , "8" },
149153 },
0 commit comments