We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2831dd9 commit a0cda99Copy full SHA for a0cda99
1 file changed
cmd/generate/llm.go
@@ -9,6 +9,7 @@ import (
9
10
"github.com/briandowns/spinner"
11
"github.com/github/gh-models/internal/azuremodels"
12
+ "github.com/github/gh-models/internal/modelkey"
13
)
14
15
// callModelWithRetry makes an API call with automatic retry on rate limiting
@@ -18,6 +19,12 @@ func (h *generateCommandHandler) callModelWithRetry(step string, req azuremodels
18
19
20
h.LogLLMRequest(step, req)
21
22
+ parsedModel, err := modelkey.ParseModelKey(req.Model)
23
+ if err != nil {
24
+ return "", fmt.Errorf("failed to parse model key: %w", err)
25
+ }
26
+ req.Model = parsedModel.String()
27
+
28
for attempt := 0; attempt <= maxRetries; attempt++ {
29
sp := spinner.New(spinner.CharSets[14], 100*time.Millisecond, spinner.WithWriter(h.cfg.ErrOut))
30
sp.Start()
0 commit comments