refactor: centralize TEST_MODELS and DEFAULT_PRESETS in constants.js

- Move TEST_MODELS and DEFAULT_PRESETS to src/constants.js as single source of truth
- Update test-models.cjs helper to use dynamic import from constants
- Make getTestModels() and getModels() async functions
- Update all test files to await async model config loading
- Remove duplicate THINKING_MODELS and getThinkingModels() from test helper
- Make thinking tests more lenient for Gemini (doesn't always produce thinking blocks)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Badri Narayanan S
2026-01-13 19:20:57 +05:30
parent 1a06098ae4
commit 12d196f6a0
11 changed files with 96 additions and 92 deletions

View File

@@ -6,9 +6,11 @@
*/
const { streamRequest } = require('./helpers/http-client.cjs');
const { TEST_MODELS } = require('./helpers/test-models.cjs');
const { getModels } = require('./helpers/test-models.cjs');
async function testEmptyResponseRetry() {
const TEST_MODELS = await getModels();
console.log('\n============================================================');
console.log('EMPTY RESPONSE RETRY TEST');
console.log('Tests retry mechanism for empty API responses');