File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 11import { AnalyticsEvent } from '@codebuff/common/constants/analytics-events'
2- import { PROFIT_MARGIN } from '@codebuff/common/old-constants'
32import { NextResponse } from 'next/server'
43import { z } from 'zod'
54
@@ -81,9 +80,8 @@ export async function postDocsSearch(params: {
8180 logger,
8281 } )
8382
84- // Credit cost: flat 1 credit (+profit margin)
85- const baseCost = 1
86- const creditsToCharge = Math . round ( baseCost * ( 1 + PROFIT_MARGIN ) )
83+ // Temporarily free - charge 0 credits
84+ const creditsToCharge = 0
8785
8886 const credits = await checkCreditsAndCharge ( {
8987 userId,
Original file line number Diff line number Diff line change 11import { AnalyticsEvent } from '@codebuff/common/constants/analytics-events'
2- import { PROFIT_MARGIN } from '@codebuff/common/old-constants'
32import { NextResponse } from 'next/server'
43import { z } from 'zod'
54
@@ -85,8 +84,8 @@ export async function postWebSearch(params: {
8584 logger,
8685 } )
8786
88- const baseCost = depth === 'deep' ? 5 : 1
89- const creditsToCharge = Math . round ( baseCost * ( 1 + PROFIT_MARGIN ) )
87+ // Temporarily free - charge 0 credits
88+ const creditsToCharge = 0
9089
9190 // Retry credits charge up to 3 times (flaky)
9291 let credits : Awaited < ReturnType < typeof checkCreditsAndCharge > > | undefined
You can’t perform that action at this time.
0 commit comments