@@ -42,6 +42,8 @@ Examples:
4242 RunE : runTextInference ,
4343}
4444
45+ var model string
46+
4547func init () {
4648 f := textInferenceCmd .Flags ()
4749 f .StringVarP (& textFlags .model , "model" , "m" , "" , "Model identifier (e.g. runware:qwen3-thinking@1)" )
@@ -67,7 +69,7 @@ func init() {
6769
6870func preRunTextInference (cmd * cobra.Command , _ []string ) error {
6971 // Resolve model from preset or flag for early validation
70- model : = config .Get ().Defaults .Model
72+ model = config .Get ().Defaults .Model
7173 if textFlags .preset != "" {
7274 if preset := config .GetPreset (textFlags .preset ); preset != nil && preset .Model != "" {
7375 model = preset .Model
@@ -94,24 +96,6 @@ func runTextInference(cmd *cobra.Command, args []string) error {
9496
9597 message := args [0 ]
9698
97- model := config .Get ().Defaults .Model
98-
99- // Apply preset if specified
100- if textFlags .preset != "" {
101- preset := config .GetPreset (textFlags .preset )
102- if preset == nil {
103- return fmt .Errorf ("preset '%s' not found" , textFlags .preset )
104- }
105- if preset .Model != "" {
106- model = preset .Model
107- }
108- }
109-
110- // Override with explicit CLI flags
111- if cmd .Flags ().Changed ("model" ) {
112- model = textFlags .model
113- }
114-
11599 // Build request
116100 req := & api.TextInferenceRequest {
117101 TaskUUID : api .NewUUID (),
0 commit comments