hedgequantx 2.9.1 → 2.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.9.1",
3
+ "version": "2.9.3",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -33,12 +33,10 @@ const AI_PROVIDERS = [
33
33
  { id: 'qwen', name: 'Qwen', color: 'cyan', supportsOAuth: true, supportsApiKey: true },
34
34
  { id: 'iflow', name: 'iFlow (DeepSeek/GLM)', color: 'yellow', supportsOAuth: true, supportsApiKey: true },
35
35
  // API Key only (no OAuth - uses LLM Proxy via LiteLLM)
36
- { id: 'deepseek', name: 'DeepSeek', color: 'blue', supportsOAuth: false, supportsApiKey: true },
37
36
  { id: 'minimax', name: 'MiniMax', color: 'magenta', supportsOAuth: false, supportsApiKey: true },
37
+ { id: 'deepseek', name: 'DeepSeek', color: 'blue', supportsOAuth: false, supportsApiKey: true },
38
38
  { id: 'mistral', name: 'Mistral AI', color: 'yellow', supportsOAuth: false, supportsApiKey: true },
39
- { id: 'groq', name: 'Groq', color: 'cyan', supportsOAuth: false, supportsApiKey: true },
40
39
  { id: 'xai', name: 'xAI (Grok)', color: 'white', supportsOAuth: false, supportsApiKey: true },
41
- { id: 'perplexity', name: 'Perplexity', color: 'blue', supportsOAuth: false, supportsApiKey: true },
42
40
  { id: 'openrouter', name: 'OpenRouter', color: 'gray', supportsOAuth: false, supportsApiKey: true },
43
41
  ];
44
42
 
@@ -2,28 +2,37 @@
2
2
  * AI Models - Fetch from provider APIs
3
3
  *
4
4
  * Models are fetched dynamically from each provider's API.
5
- * No hardcoded model lists - data comes from real APIs only.
5
+ * Exception: MiniMax (no /models API) - see RULES.md for details.
6
6
  */
7
7
 
8
8
  const https = require('https');
9
9
 
10
10
  /**
11
11
  * API endpoints for fetching models
12
- * Using beta endpoints where available for latest models
12
+ * null = provider doesn't have /models endpoint
13
13
  */
14
14
  const API_ENDPOINTS = {
15
15
  anthropic: 'https://api.anthropic.com/v1/models',
16
16
  openai: 'https://api.openai.com/v1/models',
17
- google: 'https://generativelanguage.googleapis.com/v1beta/models', // v1beta for Gemini 3
17
+ google: 'https://generativelanguage.googleapis.com/v1beta/models',
18
+ minimax: null, // No /models API - uses MINIMAX_MODELS (see RULES.md exception)
18
19
  deepseek: 'https://api.deepseek.com/v1/models',
19
- minimax: 'https://api.minimax.chat/v1/models',
20
20
  mistral: 'https://api.mistral.ai/v1/models',
21
- groq: 'https://api.groq.com/openai/v1/models',
22
21
  xai: 'https://api.x.ai/v1/models',
23
- perplexity: 'https://api.perplexity.ai/models',
24
22
  openrouter: 'https://openrouter.ai/api/v1/models',
25
23
  };
26
24
 
25
+ /**
26
+ * MiniMax Models - EXCEPTION to no-hardcode rule (see RULES.md)
27
+ *
28
+ * MiniMax does not provide /models API endpoint.
29
+ * Confirmed by: OpenCode, Cursor, LiteLLM - all use hardcoded models.
30
+ * Source: https://platform.minimax.io/docs/api-reference/text-intro
31
+ */
32
+ const MINIMAX_MODELS = [
33
+ { id: 'MiniMax-M2.1', name: 'MiniMax-M2.1' },
34
+ ];
35
+
27
36
  /**
28
37
  * Make HTTPS request
29
38
  * @param {string} url - API URL
@@ -89,9 +98,7 @@ const getAuthHeaders = (providerId, apiKey) => {
89
98
  case 'openai':
90
99
  case 'deepseek':
91
100
  case 'minimax':
92
- case 'groq':
93
101
  case 'xai':
94
- case 'perplexity':
95
102
  case 'openrouter':
96
103
  case 'mistral':
97
104
  return { 'Authorization': `Bearer ${apiKey}` };
@@ -228,16 +235,6 @@ const parseModelsResponse = (providerId, data) => {
228
235
  }));
229
236
  break;
230
237
 
231
- case 'groq':
232
- // Groq format: { data: [{ id, ... }] }
233
- models = (data.data || [])
234
- .filter(m => m.id && !shouldExcludeModel(m.id))
235
- .map(m => ({
236
- id: m.id,
237
- name: m.id
238
- }));
239
- break;
240
-
241
238
  case 'deepseek':
242
239
  // DeepSeek format: { data: [{ id, ... }] } - OpenAI compatible
243
240
  models = (data.data || [])
@@ -332,7 +329,13 @@ const parseModelsResponse = (providerId, data) => {
332
329
  * @returns {Promise<Object>} { success, models, error }
333
330
  */
334
331
  const fetchModelsFromApi = async (providerId, apiKey) => {
332
+ // MiniMax: no /models API, use hardcoded list (see RULES.md exception)
333
+ if (providerId === 'minimax') {
334
+ return { success: true, models: MINIMAX_MODELS, error: null };
335
+ }
336
+
335
337
  const endpoint = API_ENDPOINTS[providerId];
338
+
336
339
  if (!endpoint) {
337
340
  return { success: false, models: [], error: 'Unknown provider' };
338
341
  }