This commit is contained in:
Clansty 2025-12-27 21:16:59 +08:00
parent 13b34411fc
commit 0fcc29c9af

View file

@ -306,6 +306,15 @@ export class KiroApiServiceAdapter extends ApiServiceAdapter {
}
return this.kiroApiService.getUsageLimits();
}
/**
* Count tokens for a message request (compatible with Anthropic API)
* @param {Object} requestBody - The request body containing model, messages, system, tools, etc.
* @returns {Object} { input_tokens: number }
*/
countTokens(requestBody) {
return this.kiroApiService.countTokens(requestBody);
}
}
// Qwen API 服务适配器