ai-speedometer 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli.js CHANGED
@@ -184,7 +184,7 @@ function showHeader() {
184
184
  }
185
185
 
186
186
  // Configuration management - now using ai-benchmark-config.json for custom providers
187
- async function loadConfig() {
187
+ async function loadConfig(includeAllProviders = false) {
188
188
  try {
189
189
  // Check if we need to migrate from old config
190
190
  const oldConfigFile = 'ai-benchmark-config.json';
@@ -217,7 +217,8 @@ async function loadConfig() {
217
217
  }
218
218
 
219
219
  // Load providers from both auth.json (verified) and ai-benchmark-config.json (custom)
220
- const providers = await getAllAvailableProviders();
220
+ // Include all models.dev providers if includeAllProviders is true (for headless mode)
221
+ const providers = await getAllAvailableProviders(includeAllProviders);
221
222
 
222
223
  return {
223
224
  providers,
@@ -2182,8 +2183,8 @@ async function runHeadlessBenchmark(benchSpec, apiKey, useAiSdk) {
2182
2183
  process.exit(1);
2183
2184
  }
2184
2185
 
2185
- // Load all available providers
2186
- const config = await loadConfig();
2186
+ // Load all available providers (include all models.dev providers for headless mode)
2187
+ const config = await loadConfig(true);
2187
2188
 
2188
2189
  // Find the provider (case-insensitive search)
2189
2190
  const provider = config.providers.find(p =>
@@ -2304,7 +2305,7 @@ async function runHeadlessBenchmark(benchSpec, apiKey, useAiSdk) {
2304
2305
  }
2305
2306
 
2306
2307
  // Start the CLI
2307
- if (require.main === module) {
2308
+ if (import.meta.url === `file://${process.argv[1]}`) {
2308
2309
  // Check if help flag
2309
2310
  if (cliArgs.help) {
2310
2311
  showHelp();