MCPcopy
hub / github.com/7836246/cursor2api / countTokens

Function countTokens

src/handler.ts:149–152  ·  view source on GitHub ↗
(req: Request, res: Response)

Source from the content-addressed store, hash-verified

147}
148
149export function countTokens(req: Request, res: Response): void {
150 const body = req.body as AnthropicRequest;
151 res.json({ input_tokens: estimateInputTokens(body) });
152}
153
154// ==================== 身份探针拦截 ====================
155

Callers

nothing calls this directly

Calls 2

estimateInputTokensFunction · 0.85
jsonMethod · 0.45

Tested by

no test coverage detected