We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c92a9a commit 4c14874Copy full SHA for 4c14874
1 file changed
internal/services/toolkit/client/completion_v2.go
@@ -79,7 +79,7 @@ func (a *AIClientV2) ChatCompletionStreamV2(ctx context.Context, callbackStream
79
// Track usage on all exit paths (success or error) to prevent abuse
80
// Only track if userID is provided and user is not using their own API key (BYOK)
81
defer func() {
82
- if !userID.IsZero() && !llmProvider.IsCustom() && usage.Cost > 0 {
+ if !userID.IsZero() && !llmProvider.IsCustomModel && usage.Cost > 0 {
83
// Use a detached context since the request context may be canceled
84
trackCtx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
85
defer cancel()
0 commit comments