From 9852dd25dff67915d0e9eb865dd9ab999f5cd3ee Mon Sep 17 00:00:00 2001 From: aakashb95 Date: Mon, 4 May 2026 18:41:30 +0530 Subject: [PATCH] add: clarifying comment on credit usage --- enterprise/app/helpers/captain/chat_response_helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/enterprise/app/helpers/captain/chat_response_helper.rb b/enterprise/app/helpers/captain/chat_response_helper.rb index ca860fa9d..e8ac1044c 100644 --- a/enterprise/app/helpers/captain/chat_response_helper.rb +++ b/enterprise/app/helpers/captain/chat_response_helper.rb @@ -35,6 +35,9 @@ module Captain::ChatResponseHelper def credit_used_for_response?(parsed_response) response = parsed_response['response'] + + # The classifier can still decide to hand off after this trace is written. + # Actual response usage is charged later in ResponseBuilderJob, so billing stays correct. response.present? && response != 'conversation_handoff' && parsed_response['action'] != 'handoff' end