Skip to content

Commit c94dd10

Browse files
authored
Merge pull request #684 from thedadams/default-model-provider-set-model
fix: ensure default model is parsed when using default model provider
2 parents 7ff3fa1 + 7646c4b commit c94dd10

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/remote/remote.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ func (c *Client) Call(ctx context.Context, messageRequest types.CompletionReques
5151
return nil, fmt.Errorf("failed to find remote model %s", messageRequest.Model)
5252
}
5353

54-
_, modelName := types.SplitToolRef(messageRequest.Model)
54+
toolName, modelName := types.SplitToolRef(messageRequest.Model)
55+
if modelName == "" {
56+
// modelName is empty, then the messageRequest.Model is not of the form 'modelName from provider'
57+
// Therefore, the modelName is the toolName
58+
modelName = toolName
59+
}
5560
messageRequest.Model = modelName
5661
return client.Call(ctx, messageRequest, status)
5762
}

0 commit comments

Comments
 (0)