billing + credits updates (#202)

This commit is contained in:
Ramnique Singh 2025-08-14 19:59:38 +05:30 committed by GitHub
parent 852e02e49e
commit eccfb4748f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 497 additions and 229 deletions

View file

@ -220,10 +220,10 @@ export async function POST(
// log billing usage
if (USE_BILLING && billingCustomerId) {
const agentMessageCount = convertedResponseMessages.filter(m => m.role === 'assistant').length;
await logUsage(billingCustomerId, {
type: 'agent_messages',
amount: agentMessageCount,
});
// await logUsage(billingCustomerId, {
// type: 'agent_messages',
// amount: agentMessageCount,
// });
}
logger.log(`Turn processing completed successfully`);