test: add count tokens endpoint test suite
Add comprehensive test suite for /v1/messages/count_tokens endpoint: - Simple text messages - Multi-turn conversations - System prompts (string and array format) - Tool definitions and tool use/result blocks - Thinking blocks - Content arrays with text blocks - Error handling for invalid requests - Long text tokenization Also adds npm script test:counttokens for running tests individually.
This commit is contained in:
@@ -18,7 +18,8 @@ const tests = [
|
||||
{ name: 'Cross-Model Thinking', file: 'test-cross-model-thinking.cjs' },
|
||||
{ name: 'OAuth No-Browser Mode', file: 'test-oauth-no-browser.cjs' },
|
||||
{ name: 'Empty Response Retry', file: 'test-empty-response-retry.cjs' },
|
||||
{ name: 'Schema Sanitizer', file: 'test-schema-sanitizer.cjs' }
|
||||
{ name: 'Schema Sanitizer', file: 'test-schema-sanitizer.cjs' },
|
||||
{ name: 'Count Tokens', file: 'test-count-tokens.cjs' }
|
||||
];
|
||||
|
||||
async function runTest(test) {
|
||||
|
||||
Reference in New Issue
Block a user