Fix model name update during quota check to avoid incorrect logging

This commit is contained in:
Luis Pater
2025-09-08 22:17:21 +08:00
parent 179b8aa88f
commit f9f2333997

View File

@@ -417,6 +417,7 @@ func (c *GeminiCLIClient) SendRawTokenCount(ctx context.Context, modelName strin
if newModelName != "" {
log.Debugf("Model %s is quota exceeded. Switch to preview model %s", modelName, newModelName)
rawJSON, _ = sjson.SetBytes(rawJSON, "model", newModelName)
modelName = newModelName
continue
}
}