hedgequantx 2.6.99 → 2.6.100

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.6.99",
3
+ "version": "2.6.100",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -900,20 +900,27 @@ const setupRemoteOAuth = async (provider, config) => {
900
900
  const { fetchModelsWithOAuth } = require('../services/ai/client');
901
901
  models = await fetchModelsWithOAuth(provider.id, result.access);
902
902
  } catch (e) {
903
- // Ignore - will use defaults
903
+ // API failed - will prompt for manual input
904
904
  }
905
905
 
906
- // Use defaults if API doesn't return models
907
- if (!models || models.length === 0) {
908
- models = getDefaultModelsForProvider(provider.id);
909
- }
910
-
911
- spinner.succeed(`Found ${models.length} models`);
906
+ let selectedModel;
912
907
 
913
- // Let user select model
914
- const selectedModel = await selectModelFromList(models, config.name);
915
- if (!selectedModel) {
916
- return await selectProviderOption(provider);
908
+ if (!models || models.length === 0) {
909
+ spinner.warn('Could not fetch models from API');
910
+
911
+ // Prompt user to enter model name manually
912
+ selectedModel = await promptForModelName(config.name);
913
+ if (!selectedModel) {
914
+ return await selectProviderOption(provider);
915
+ }
916
+ } else {
917
+ spinner.succeed(`Found ${models.length} models`);
918
+
919
+ // Let user select model from list
920
+ selectedModel = await selectModelFromList(models, config.name);
921
+ if (!selectedModel) {
922
+ return await selectProviderOption(provider);
923
+ }
917
924
  }
918
925
 
919
926
  // Add agent
@@ -932,33 +939,22 @@ const setupRemoteOAuth = async (provider, config) => {
932
939
  };
933
940
 
934
941
  /**
935
- * Get default models for a provider (used when we can't query the API)
942
+ * Prompt user to enter model name manually when API doesn't return models
936
943
  */
937
- const getDefaultModelsForProvider = (providerId) => {
938
- // These are fetched from provider APIs - not hardcoded fallbacks
939
- // They represent the known model IDs that the provider supports
940
- const models = {
941
- anthropic: [
942
- 'claude-sonnet-4-20250514',
943
- 'claude-opus-4-20250514',
944
- 'claude-3-5-sonnet-20241022',
945
- 'claude-3-5-haiku-20241022',
946
- 'claude-3-opus-20240229'
947
- ],
948
- openai: [
949
- 'gpt-4o',
950
- 'gpt-4o-mini',
951
- 'gpt-4-turbo',
952
- 'o1-preview',
953
- 'o1-mini'
954
- ],
955
- gemini: [
956
- 'gemini-2.0-flash-exp',
957
- 'gemini-1.5-pro',
958
- 'gemini-1.5-flash'
959
- ]
960
- };
961
- return models[providerId] || [];
944
+ const promptForModelName = async (providerName) => {
945
+ console.log();
946
+ console.log(chalk.yellow(' Could not fetch models from API.'));
947
+ console.log(chalk.white(' Please enter the model name manually.'));
948
+ console.log(chalk.gray(' (Check provider docs for available models)'));
949
+ console.log();
950
+
951
+ const modelName = await prompts.textInput(chalk.cyan('MODEL NAME:'));
952
+
953
+ if (!modelName || modelName.trim() === '' || modelName.trim() === '<') {
954
+ return null;
955
+ }
956
+
957
+ return modelName.trim();
962
958
  };
963
959
 
964
960
  /**