Update BuildCommandArgs to use positional argument for model and adjust tests accordingly

This commit is contained in:
2025-09-22 20:32:03 +02:00
parent 2c86fc6470
commit c3ca5b95f7
2 changed files with 28 additions and 4 deletions

View File

@@ -97,10 +97,17 @@ func TestBuildCommandArgs(t *testing.T) {
args := options.BuildCommandArgs()
// Check core functionality
if !containsFlagWithValue(args, "--model", "microsoft/DialoGPT-medium") {
t.Errorf("Expected --model microsoft/DialoGPT-medium not found in %v", args)
// Check that model is the first positional argument (not a --model flag)
if len(args) == 0 || args[0] != "microsoft/DialoGPT-medium" {
t.Errorf("Expected model 'microsoft/DialoGPT-medium' as first positional argument, got args: %v", args)
}
// Check that --model flag is NOT present (since model should be positional)
if contains(args, "--model") {
t.Errorf("Found --model flag, but model should be positional argument in args: %v", args)
}
// Check other flags
if !containsFlagWithValue(args, "--tensor-parallel-size", "2") {
t.Errorf("Expected --tensor-parallel-size 2 not found in %v", args)
}