MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / calculateUsedCredits

Function calculateUsedCredits

sdk/src/impl/llm.ts:63–67  ·  view source on GitHub ↗
(params: { costDollars: number })

Source from the content-addressed store, hash-verified

61}
62
63function calculateUsedCredits(params: { costDollars: number }): number {
64 const { costDollars } = params
65
66 return Math.round(costDollars * (1 + PROFIT_MARGIN) * 100)
67}
68
69export function getProviderOptions(params: {
70 model: string

Callers 3

promptAiSdkStreamFunction · 0.85
promptAiSdkFunction · 0.85
promptAiSdkStructuredFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected