hedgequantx 2.7.74 → 2.7.75

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.7.74",
3
+ "version": "2.7.75",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -141,21 +141,14 @@ const handleCliProxyConnection = async (provider, config, boxWidth) => {
141
141
  console.log(chalk.green(' ✓ CLIPROXYAPI IS RUNNING'));
142
142
  }
143
143
 
144
- // Check if provider supports OAuth
145
- const oauthProviders = ['anthropic', 'openai', 'google', 'qwen'];
146
- if (!oauthProviders.includes(provider.id)) {
147
- // Try to fetch models directly
148
- console.log(chalk.gray(` CHECKING AVAILABLE MODELS FOR ${provider.name.toUpperCase()}...`));
149
- const modelsResult = await cliproxy.fetchProviderModels(provider.id);
150
-
151
- if (!modelsResult.success || modelsResult.models.length === 0) {
152
- console.log(chalk.red(` NO MODELS AVAILABLE FOR ${provider.name.toUpperCase()}`));
153
- console.log(chalk.gray(' THIS PROVIDER MAY REQUIRE API KEY CONNECTION.'));
154
- await prompts.waitForEnter();
155
- return false;
156
- }
157
-
158
- const selectedModel = await selectModelFromList(provider, modelsResult.models, boxWidth);
144
+ // First, check if models are already available (existing auth)
145
+ console.log(chalk.gray(` CHECKING EXISTING AUTHENTICATION...`));
146
+ const existingModels = await cliproxy.fetchProviderModels(provider.id);
147
+
148
+ if (existingModels.success && existingModels.models.length > 0) {
149
+ // Models already available - skip OAuth, go directly to model selection
150
+ console.log(chalk.green(` ✓ ALREADY AUTHENTICATED`));
151
+ const selectedModel = await selectModelFromList(provider, existingModels.models, boxWidth);
159
152
  if (!selectedModel) return false;
160
153
 
161
154
  activateProvider(config, provider.id, {
@@ -172,6 +165,15 @@ const handleCliProxyConnection = async (provider, config, boxWidth) => {
172
165
  return true;
173
166
  }
174
167
 
168
+ // Check if provider supports OAuth
169
+ const oauthProviders = ['anthropic', 'openai', 'google', 'qwen'];
170
+ if (!oauthProviders.includes(provider.id)) {
171
+ console.log(chalk.red(` NO MODELS AVAILABLE FOR ${provider.name.toUpperCase()}`));
172
+ console.log(chalk.gray(' THIS PROVIDER MAY REQUIRE API KEY CONNECTION.'));
173
+ await prompts.waitForEnter();
174
+ return false;
175
+ }
176
+
175
177
  // OAuth flow - get login URL
176
178
  console.log(chalk.cyan(`\n STARTING OAUTH LOGIN FOR ${provider.name.toUpperCase()}...`));
177
179
  const loginResult = await cliproxy.getLoginUrl(provider.id);