@juspay/neurolink 7.29.2 → 7.30.0
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/CHANGELOG.md +12 -0
- package/dist/cli/commands/config.d.ts +83 -83
- package/dist/cli/commands/mcp.js +39 -9
- package/dist/cli/commands/models.js +25 -21
- package/dist/cli/commands/ollama.js +2 -2
- package/dist/cli/factories/commandFactory.d.ts +8 -0
- package/dist/cli/factories/commandFactory.js +65 -65
- package/dist/cli/factories/ollamaCommandFactory.js +3 -1
- package/dist/cli/factories/sagemakerCommandFactory.js +3 -2
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +11 -11
- package/dist/cli/utils/envManager.js +5 -5
- package/dist/cli/utils/ollamaUtils.d.ts +12 -0
- package/dist/cli/utils/ollamaUtils.js +58 -42
- package/dist/config/configManager.js +5 -2
- package/dist/config/conversationMemoryConfig.js +5 -0
- package/dist/core/analytics.d.ts +2 -24
- package/dist/core/analytics.js +12 -17
- package/dist/core/baseProvider.d.ts +30 -1
- package/dist/core/baseProvider.js +180 -198
- package/dist/core/conversationMemoryManager.d.ts +9 -15
- package/dist/core/conversationMemoryManager.js +98 -57
- package/dist/core/dynamicModels.d.ts +4 -4
- package/dist/core/dynamicModels.js +7 -7
- package/dist/core/evaluation.d.ts +9 -9
- package/dist/core/evaluation.js +117 -65
- package/dist/core/evaluationProviders.d.ts +18 -2
- package/dist/core/evaluationProviders.js +15 -13
- package/dist/core/modelConfiguration.d.ts +63 -0
- package/dist/core/modelConfiguration.js +354 -290
- package/dist/core/streamAnalytics.d.ts +10 -5
- package/dist/core/streamAnalytics.js +10 -10
- package/dist/core/types.d.ts +22 -110
- package/dist/core/types.js +13 -0
- package/dist/factories/providerFactory.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/lib/config/configManager.js +5 -2
- package/dist/lib/config/conversationMemoryConfig.js +5 -0
- package/dist/lib/core/analytics.d.ts +2 -24
- package/dist/lib/core/analytics.js +12 -17
- package/dist/lib/core/baseProvider.d.ts +30 -1
- package/dist/lib/core/baseProvider.js +180 -198
- package/dist/lib/core/conversationMemoryManager.d.ts +9 -15
- package/dist/lib/core/conversationMemoryManager.js +98 -57
- package/dist/lib/core/dynamicModels.js +7 -7
- package/dist/lib/core/evaluation.d.ts +9 -9
- package/dist/lib/core/evaluation.js +117 -65
- package/dist/lib/core/evaluationProviders.d.ts +18 -2
- package/dist/lib/core/evaluationProviders.js +15 -13
- package/dist/lib/core/modelConfiguration.d.ts +63 -0
- package/dist/lib/core/modelConfiguration.js +354 -290
- package/dist/lib/core/streamAnalytics.d.ts +10 -5
- package/dist/lib/core/streamAnalytics.js +10 -10
- package/dist/lib/core/types.d.ts +22 -110
- package/dist/lib/core/types.js +13 -0
- package/dist/lib/factories/providerFactory.js +1 -1
- package/dist/lib/index.d.ts +2 -1
- package/dist/lib/mcp/externalServerManager.js +15 -6
- package/dist/lib/mcp/factory.js +1 -1
- package/dist/lib/mcp/index.d.ts +1 -1
- package/dist/lib/mcp/index.js +1 -1
- package/dist/lib/mcp/mcpCircuitBreaker.js +5 -1
- package/dist/lib/mcp/mcpClientFactory.js +3 -0
- package/dist/lib/mcp/registry.d.ts +3 -3
- package/dist/lib/mcp/registry.js +3 -3
- package/dist/lib/mcp/servers/aiProviders/aiAnalysisTools.js +5 -5
- package/dist/lib/mcp/servers/aiProviders/aiWorkflowTools.js +6 -6
- package/dist/lib/mcp/servers/utilities/utilityServer.js +1 -1
- package/dist/lib/mcp/toolDiscoveryService.js +8 -2
- package/dist/lib/mcp/toolRegistry.js +4 -4
- package/dist/lib/middleware/builtin/analytics.js +4 -4
- package/dist/lib/middleware/builtin/guardrails.js +2 -2
- package/dist/lib/middleware/registry.js +11 -2
- package/dist/lib/models/modelRegistry.d.ts +1 -1
- package/dist/lib/models/modelRegistry.js +3 -3
- package/dist/lib/models/modelResolver.d.ts +1 -1
- package/dist/lib/models/modelResolver.js +2 -2
- package/dist/lib/neurolink.d.ts +116 -9
- package/dist/lib/neurolink.js +718 -956
- package/dist/lib/providers/amazonSagemaker.d.ts +1 -1
- package/dist/lib/providers/amazonSagemaker.js +12 -3
- package/dist/lib/providers/anthropic.d.ts +1 -1
- package/dist/lib/providers/anthropic.js +7 -6
- package/dist/lib/providers/anthropicBaseProvider.d.ts +1 -1
- package/dist/lib/providers/anthropicBaseProvider.js +4 -3
- package/dist/lib/providers/azureOpenai.d.ts +1 -1
- package/dist/lib/providers/azureOpenai.js +1 -1
- package/dist/lib/providers/googleAiStudio.d.ts +1 -1
- package/dist/lib/providers/googleAiStudio.js +2 -2
- package/dist/lib/providers/googleVertex.d.ts +40 -0
- package/dist/lib/providers/googleVertex.js +330 -274
- package/dist/lib/providers/huggingFace.js +1 -1
- package/dist/lib/providers/mistral.d.ts +1 -1
- package/dist/lib/providers/mistral.js +2 -2
- package/dist/lib/providers/ollama.d.ts +4 -0
- package/dist/lib/providers/ollama.js +38 -18
- package/dist/lib/providers/openAI.d.ts +1 -1
- package/dist/lib/providers/openAI.js +2 -2
- package/dist/lib/providers/sagemaker/adaptive-semaphore.js +7 -4
- package/dist/lib/providers/sagemaker/client.js +13 -3
- package/dist/lib/providers/sagemaker/config.js +5 -1
- package/dist/lib/providers/sagemaker/detection.js +19 -9
- package/dist/lib/providers/sagemaker/errors.d.ts +8 -1
- package/dist/lib/providers/sagemaker/errors.js +103 -20
- package/dist/lib/providers/sagemaker/language-model.d.ts +3 -3
- package/dist/lib/providers/sagemaker/language-model.js +4 -4
- package/dist/lib/providers/sagemaker/parsers.js +14 -6
- package/dist/lib/providers/sagemaker/streaming.js +14 -3
- package/dist/lib/providers/sagemaker/types.d.ts +1 -1
- package/dist/lib/proxy/awsProxyIntegration.js +1 -1
- package/dist/lib/sdk/toolRegistration.d.ts +1 -1
- package/dist/lib/types/cli.d.ts +80 -8
- package/dist/lib/types/contextTypes.js +2 -2
- package/dist/lib/types/conversationTypes.d.ts +10 -0
- package/dist/lib/types/generateTypes.d.ts +2 -5
- package/dist/lib/types/providers.d.ts +81 -19
- package/dist/lib/types/providers.js +6 -6
- package/dist/lib/types/streamTypes.d.ts +4 -6
- package/dist/lib/types/typeAliases.d.ts +1 -1
- package/dist/lib/utils/analyticsUtils.d.ts +33 -0
- package/dist/lib/utils/analyticsUtils.js +76 -0
- package/dist/lib/utils/conversationMemoryUtils.d.ts +1 -2
- package/dist/lib/utils/conversationMemoryUtils.js +6 -7
- package/dist/lib/utils/errorHandling.js +4 -1
- package/dist/lib/utils/evaluationUtils.d.ts +27 -0
- package/dist/lib/utils/evaluationUtils.js +131 -0
- package/dist/lib/utils/optionsUtils.js +10 -1
- package/dist/lib/utils/performance.d.ts +1 -1
- package/dist/lib/utils/performance.js +15 -3
- package/dist/lib/utils/providerHealth.d.ts +48 -0
- package/dist/lib/utils/providerHealth.js +199 -254
- package/dist/lib/utils/providerUtils.js +2 -2
- package/dist/lib/utils/timeout.js +8 -3
- package/dist/mcp/externalServerManager.js +15 -6
- package/dist/mcp/factory.js +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/mcpCircuitBreaker.js +5 -1
- package/dist/mcp/mcpClientFactory.js +3 -0
- package/dist/mcp/registry.d.ts +3 -3
- package/dist/mcp/registry.js +3 -3
- package/dist/mcp/servers/aiProviders/aiAnalysisTools.js +5 -5
- package/dist/mcp/servers/aiProviders/aiWorkflowTools.js +6 -6
- package/dist/mcp/servers/utilities/utilityServer.js +1 -1
- package/dist/mcp/toolDiscoveryService.js +8 -2
- package/dist/mcp/toolRegistry.js +4 -4
- package/dist/middleware/builtin/analytics.js +4 -4
- package/dist/middleware/builtin/guardrails.js +2 -2
- package/dist/middleware/registry.js +11 -2
- package/dist/models/modelRegistry.d.ts +1 -1
- package/dist/models/modelRegistry.js +3 -3
- package/dist/models/modelResolver.d.ts +1 -1
- package/dist/models/modelResolver.js +2 -2
- package/dist/neurolink.d.ts +116 -9
- package/dist/neurolink.js +718 -956
- package/dist/providers/amazonSagemaker.d.ts +1 -1
- package/dist/providers/amazonSagemaker.js +12 -3
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/anthropic.js +7 -6
- package/dist/providers/anthropicBaseProvider.d.ts +1 -1
- package/dist/providers/anthropicBaseProvider.js +4 -3
- package/dist/providers/azureOpenai.d.ts +1 -1
- package/dist/providers/azureOpenai.js +1 -1
- package/dist/providers/googleAiStudio.d.ts +1 -1
- package/dist/providers/googleAiStudio.js +2 -2
- package/dist/providers/googleVertex.d.ts +40 -0
- package/dist/providers/googleVertex.js +330 -274
- package/dist/providers/huggingFace.js +1 -1
- package/dist/providers/mistral.d.ts +1 -1
- package/dist/providers/mistral.js +2 -2
- package/dist/providers/ollama.d.ts +4 -0
- package/dist/providers/ollama.js +38 -18
- package/dist/providers/openAI.d.ts +1 -1
- package/dist/providers/openAI.js +2 -2
- package/dist/providers/sagemaker/adaptive-semaphore.js +7 -4
- package/dist/providers/sagemaker/client.js +13 -3
- package/dist/providers/sagemaker/config.js +5 -1
- package/dist/providers/sagemaker/detection.js +19 -9
- package/dist/providers/sagemaker/errors.d.ts +8 -1
- package/dist/providers/sagemaker/errors.js +103 -20
- package/dist/providers/sagemaker/language-model.d.ts +3 -3
- package/dist/providers/sagemaker/language-model.js +4 -4
- package/dist/providers/sagemaker/parsers.js +14 -6
- package/dist/providers/sagemaker/streaming.js +14 -3
- package/dist/providers/sagemaker/types.d.ts +1 -1
- package/dist/proxy/awsProxyIntegration.js +1 -1
- package/dist/sdk/toolRegistration.d.ts +1 -1
- package/dist/types/cli.d.ts +80 -8
- package/dist/types/contextTypes.js +2 -2
- package/dist/types/conversationTypes.d.ts +10 -0
- package/dist/types/generateTypes.d.ts +2 -5
- package/dist/types/providers.d.ts +81 -19
- package/dist/types/providers.js +6 -6
- package/dist/types/streamTypes.d.ts +4 -6
- package/dist/types/typeAliases.d.ts +1 -1
- package/dist/utils/analyticsUtils.d.ts +33 -0
- package/dist/utils/analyticsUtils.js +76 -0
- package/dist/utils/conversationMemoryUtils.d.ts +1 -2
- package/dist/utils/conversationMemoryUtils.js +6 -7
- package/dist/utils/errorHandling.js +4 -1
- package/dist/utils/evaluationUtils.d.ts +27 -0
- package/dist/utils/evaluationUtils.js +131 -0
- package/dist/utils/optionsUtils.js +10 -1
- package/dist/utils/performance.d.ts +1 -1
- package/dist/utils/performance.js +15 -3
- package/dist/utils/providerHealth.d.ts +48 -0
- package/dist/utils/providerHealth.js +199 -254
- package/dist/utils/providerUtils.js +2 -2
- package/dist/utils/timeout.js +8 -3
- package/package.json +1 -1
- package/dist/context/ContextManager.d.ts +0 -28
- package/dist/context/ContextManager.js +0 -113
- package/dist/context/config.d.ts +0 -5
- package/dist/context/config.js +0 -42
- package/dist/context/types.d.ts +0 -20
- package/dist/context/types.js +0 -1
- package/dist/context/utils.d.ts +0 -7
- package/dist/context/utils.js +0 -8
- package/dist/lib/context/ContextManager.d.ts +0 -28
- package/dist/lib/context/ContextManager.js +0 -113
- package/dist/lib/context/config.d.ts +0 -5
- package/dist/lib/context/config.js +0 -42
- package/dist/lib/context/types.d.ts +0 -20
- package/dist/lib/context/types.js +0 -1
- package/dist/lib/context/utils.d.ts +0 -7
- package/dist/lib/context/utils.js +0 -8
|
@@ -91,265 +91,299 @@ export class ModelConfigurationManager {
|
|
|
91
91
|
return ModelConfigurationManager.instance;
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
94
|
+
* Create Google AI provider configuration
|
|
95
95
|
*/
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
// Hermes series (specialized for tools)
|
|
294
|
-
"hermes3:8b",
|
|
295
|
-
"hermes2-pro",
|
|
296
|
-
// Function-calling specialized models
|
|
297
|
-
"firefunction-v2",
|
|
298
|
-
"firefunction",
|
|
299
|
-
// Code Llama (code-focused tools)
|
|
300
|
-
"codellama:34b-instruct",
|
|
301
|
-
"codellama:13b-instruct",
|
|
302
|
-
// Other capable models
|
|
303
|
-
"qwen2.5:14b-instruct",
|
|
304
|
-
"gemma2:27b-instruct",
|
|
305
|
-
]),
|
|
306
|
-
},
|
|
307
|
-
},
|
|
308
|
-
huggingface: {
|
|
309
|
-
provider: "huggingface",
|
|
310
|
-
models: {
|
|
311
|
-
fast: this.getConfigValue("HUGGINGFACE_FAST_MODEL", MODEL_NAMES.HUGGINGFACE.FAST),
|
|
312
|
-
balanced: this.getConfigValue("HUGGINGFACE_BALANCED_MODEL", MODEL_NAMES.HUGGINGFACE.BALANCED),
|
|
313
|
-
quality: this.getConfigValue("HUGGINGFACE_QUALITY_MODEL", MODEL_NAMES.HUGGINGFACE.QUALITY),
|
|
314
|
-
},
|
|
315
|
-
defaultCost: {
|
|
316
|
-
input: this.parseFloat(process.env.HUGGINGFACE_DEFAULT_INPUT_COST, 0.0002),
|
|
317
|
-
output: this.parseFloat(process.env.HUGGINGFACE_DEFAULT_OUTPUT_COST, 0.0006),
|
|
318
|
-
},
|
|
319
|
-
requiredEnvVars: ["HUGGINGFACE_API_KEY"],
|
|
320
|
-
performance: {
|
|
321
|
-
speed: this.parseInt(process.env.HUGGINGFACE_SPEED_RATING, 1),
|
|
322
|
-
quality: this.parseInt(process.env.HUGGINGFACE_QUALITY_RATING, 2),
|
|
323
|
-
cost: this.parseInt(process.env.HUGGINGFACE_COST_RATING, 2),
|
|
324
|
-
},
|
|
325
|
-
modelBehavior: {
|
|
326
|
-
maxTokensIssues: this.getConfigArray("HUGGINGFACE_MAX_TOKENS_ISSUES", []),
|
|
327
|
-
specialHandling: this.getConfigObject("HUGGINGFACE_SPECIAL_HANDLING", {}),
|
|
328
|
-
},
|
|
329
|
-
},
|
|
330
|
-
mistral: {
|
|
331
|
-
provider: "mistral",
|
|
332
|
-
models: {
|
|
333
|
-
fast: this.getConfigValue("MISTRAL_FAST_MODEL", MODEL_NAMES.MISTRAL.FAST),
|
|
334
|
-
balanced: this.getConfigValue("MISTRAL_BALANCED_MODEL", MODEL_NAMES.MISTRAL.BALANCED),
|
|
335
|
-
quality: this.getConfigValue("MISTRAL_QUALITY_MODEL", MODEL_NAMES.MISTRAL.QUALITY),
|
|
336
|
-
},
|
|
337
|
-
defaultCost: {
|
|
338
|
-
input: this.parseFloat(process.env.MISTRAL_DEFAULT_INPUT_COST, 0.0002),
|
|
339
|
-
output: this.parseFloat(process.env.MISTRAL_DEFAULT_OUTPUT_COST, 0.0006),
|
|
340
|
-
},
|
|
341
|
-
requiredEnvVars: ["MISTRAL_API_KEY"],
|
|
342
|
-
performance: {
|
|
343
|
-
speed: this.parseInt(process.env.MISTRAL_SPEED_RATING, 2),
|
|
344
|
-
quality: this.parseInt(process.env.MISTRAL_QUALITY_RATING, 2),
|
|
345
|
-
cost: this.parseInt(process.env.MISTRAL_COST_RATING, 2),
|
|
346
|
-
},
|
|
347
|
-
modelBehavior: {
|
|
348
|
-
maxTokensIssues: this.getConfigArray("MISTRAL_MAX_TOKENS_ISSUES", []),
|
|
349
|
-
specialHandling: this.getConfigObject("MISTRAL_SPECIAL_HANDLING", {}),
|
|
350
|
-
},
|
|
96
|
+
createGoogleAIConfig() {
|
|
97
|
+
return {
|
|
98
|
+
provider: "google-ai",
|
|
99
|
+
models: {
|
|
100
|
+
fast: this.getConfigValue("GOOGLE_AI_FAST_MODEL", MODEL_NAMES.GOOGLE_AI.FAST),
|
|
101
|
+
balanced: this.getConfigValue("GOOGLE_AI_BALANCED_MODEL", MODEL_NAMES.GOOGLE_AI.BALANCED),
|
|
102
|
+
quality: this.getConfigValue("GOOGLE_AI_QUALITY_MODEL", MODEL_NAMES.GOOGLE_AI.QUALITY),
|
|
103
|
+
},
|
|
104
|
+
defaultCost: {
|
|
105
|
+
input: this.parseFloat(process.env.GOOGLE_AI_DEFAULT_INPUT_COST, 0.000075),
|
|
106
|
+
output: this.parseFloat(process.env.GOOGLE_AI_DEFAULT_OUTPUT_COST, 0.0003),
|
|
107
|
+
},
|
|
108
|
+
requiredEnvVars: ["GOOGLE_AI_API_KEY"],
|
|
109
|
+
performance: {
|
|
110
|
+
speed: this.parseInt(process.env.GOOGLE_AI_SPEED_RATING, 3),
|
|
111
|
+
quality: this.parseInt(process.env.GOOGLE_AI_QUALITY_RATING, 3),
|
|
112
|
+
cost: this.parseInt(process.env.GOOGLE_AI_COST_RATING, 3),
|
|
113
|
+
},
|
|
114
|
+
modelBehavior: {
|
|
115
|
+
maxTokensIssues: this.getConfigArray("GOOGLE_AI_MAX_TOKENS_ISSUES", [
|
|
116
|
+
MODEL_NAMES.GOOGLE_AI.FAST,
|
|
117
|
+
MODEL_NAMES.GOOGLE_AI.BALANCED,
|
|
118
|
+
]),
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Create Google Vertex AI provider configuration
|
|
124
|
+
*/
|
|
125
|
+
createVertexConfig() {
|
|
126
|
+
return {
|
|
127
|
+
provider: "google-vertex",
|
|
128
|
+
models: {
|
|
129
|
+
fast: this.getConfigValue("GOOGLE_VERTEX_FAST_MODEL", MODEL_NAMES.GOOGLE_VERTEX.FAST),
|
|
130
|
+
balanced: this.getConfigValue("GOOGLE_VERTEX_BALANCED_MODEL", MODEL_NAMES.GOOGLE_VERTEX.BALANCED),
|
|
131
|
+
quality: this.getConfigValue("GOOGLE_VERTEX_QUALITY_MODEL", MODEL_NAMES.GOOGLE_VERTEX.QUALITY),
|
|
132
|
+
},
|
|
133
|
+
defaultCost: {
|
|
134
|
+
input: this.parseFloat(process.env.GOOGLE_VERTEX_DEFAULT_INPUT_COST, 0.000075),
|
|
135
|
+
output: this.parseFloat(process.env.GOOGLE_VERTEX_DEFAULT_OUTPUT_COST, 0.0003),
|
|
136
|
+
},
|
|
137
|
+
requiredEnvVars: ["GOOGLE_VERTEX_PROJECT_ID", "GOOGLE_VERTEX_LOCATION"],
|
|
138
|
+
performance: {
|
|
139
|
+
speed: this.parseInt(process.env.GOOGLE_VERTEX_SPEED_RATING, 3),
|
|
140
|
+
quality: this.parseInt(process.env.GOOGLE_VERTEX_QUALITY_RATING, 3),
|
|
141
|
+
cost: this.parseInt(process.env.GOOGLE_VERTEX_COST_RATING, 3),
|
|
142
|
+
},
|
|
143
|
+
modelBehavior: {
|
|
144
|
+
maxTokensIssues: this.getConfigArray("GOOGLE_VERTEX_MAX_TOKENS_ISSUES", [MODEL_NAMES.GOOGLE_VERTEX.FAST, MODEL_NAMES.GOOGLE_VERTEX.BALANCED]),
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Create OpenAI provider configuration
|
|
150
|
+
*/
|
|
151
|
+
createOpenAIConfig() {
|
|
152
|
+
return {
|
|
153
|
+
provider: "openai",
|
|
154
|
+
models: {
|
|
155
|
+
fast: this.getConfigValue("OPENAI_FAST_MODEL", MODEL_NAMES.OPENAI.FAST),
|
|
156
|
+
balanced: this.getConfigValue("OPENAI_BALANCED_MODEL", MODEL_NAMES.OPENAI.BALANCED),
|
|
157
|
+
quality: this.getConfigValue("OPENAI_QUALITY_MODEL", MODEL_NAMES.OPENAI.QUALITY),
|
|
158
|
+
},
|
|
159
|
+
defaultCost: {
|
|
160
|
+
input: this.parseFloat(process.env.OPENAI_DEFAULT_INPUT_COST, 0.00015),
|
|
161
|
+
output: this.parseFloat(process.env.OPENAI_DEFAULT_OUTPUT_COST, 0.0006),
|
|
162
|
+
},
|
|
163
|
+
requiredEnvVars: ["OPENAI_API_KEY"],
|
|
164
|
+
performance: {
|
|
165
|
+
speed: this.parseInt(process.env.OPENAI_SPEED_RATING, 2),
|
|
166
|
+
quality: this.parseInt(process.env.OPENAI_QUALITY_RATING, 3),
|
|
167
|
+
cost: this.parseInt(process.env.OPENAI_COST_RATING, 2),
|
|
168
|
+
},
|
|
169
|
+
modelBehavior: {
|
|
170
|
+
maxTokensIssues: this.getConfigArray("OPENAI_MAX_TOKENS_ISSUES", []),
|
|
171
|
+
specialHandling: this.getConfigObject("OPENAI_SPECIAL_HANDLING", {}),
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Create all provider configurations - centralized approach
|
|
177
|
+
*/
|
|
178
|
+
createAllProviderConfigs() {
|
|
179
|
+
return {
|
|
180
|
+
"google-ai": this.createGoogleAIConfig(),
|
|
181
|
+
"google-vertex": this.createVertexConfig(),
|
|
182
|
+
openai: this.createOpenAIConfig(),
|
|
183
|
+
anthropic: this.createAnthropicConfig(),
|
|
184
|
+
vertex: this.createVertexAlternativeConfig(),
|
|
185
|
+
bedrock: this.createBedrockConfig(),
|
|
186
|
+
azure: this.createAzureConfig(),
|
|
187
|
+
ollama: this.createOllamaConfig(),
|
|
188
|
+
huggingface: this.createHuggingFaceConfig(),
|
|
189
|
+
mistral: this.createMistralConfig(),
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Create Anthropic provider configuration
|
|
194
|
+
*/
|
|
195
|
+
createAnthropicConfig() {
|
|
196
|
+
return {
|
|
197
|
+
provider: "anthropic",
|
|
198
|
+
models: {
|
|
199
|
+
fast: this.getConfigValue("ANTHROPIC_FAST_MODEL", MODEL_NAMES.ANTHROPIC.FAST),
|
|
200
|
+
balanced: this.getConfigValue("ANTHROPIC_BALANCED_MODEL", MODEL_NAMES.ANTHROPIC.BALANCED),
|
|
201
|
+
quality: this.getConfigValue("ANTHROPIC_QUALITY_MODEL", MODEL_NAMES.ANTHROPIC.QUALITY),
|
|
202
|
+
},
|
|
203
|
+
defaultCost: {
|
|
204
|
+
input: this.parseFloat(process.env.ANTHROPIC_DEFAULT_INPUT_COST, 0.0015),
|
|
205
|
+
output: this.parseFloat(process.env.ANTHROPIC_DEFAULT_OUTPUT_COST, 0.0075),
|
|
206
|
+
},
|
|
207
|
+
requiredEnvVars: ["ANTHROPIC_API_KEY"],
|
|
208
|
+
performance: {
|
|
209
|
+
speed: this.parseInt(process.env.ANTHROPIC_SPEED_RATING, 3),
|
|
210
|
+
quality: this.parseInt(process.env.ANTHROPIC_QUALITY_RATING, 4),
|
|
211
|
+
cost: this.parseInt(process.env.ANTHROPIC_COST_RATING, 2),
|
|
212
|
+
},
|
|
213
|
+
modelBehavior: {
|
|
214
|
+
maxTokensIssues: this.getConfigArray("ANTHROPIC_MAX_TOKENS_ISSUES", []),
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Create Vertex alternative provider configuration
|
|
220
|
+
*/
|
|
221
|
+
createVertexAlternativeConfig() {
|
|
222
|
+
return {
|
|
223
|
+
provider: "vertex",
|
|
224
|
+
models: {
|
|
225
|
+
fast: this.getConfigValue("VERTEX_FAST_MODEL", MODEL_NAMES.VERTEX.FAST),
|
|
226
|
+
balanced: this.getConfigValue("VERTEX_BALANCED_MODEL", MODEL_NAMES.VERTEX.BALANCED),
|
|
227
|
+
quality: this.getConfigValue("VERTEX_QUALITY_MODEL", MODEL_NAMES.VERTEX.QUALITY),
|
|
228
|
+
},
|
|
229
|
+
defaultCost: {
|
|
230
|
+
input: this.parseFloat(process.env.VERTEX_DEFAULT_INPUT_COST, 0.000075),
|
|
231
|
+
output: this.parseFloat(process.env.VERTEX_DEFAULT_OUTPUT_COST, 0.0003),
|
|
232
|
+
},
|
|
233
|
+
requiredEnvVars: ["GOOGLE_VERTEX_PROJECT_ID", "GOOGLE_VERTEX_LOCATION"],
|
|
234
|
+
performance: {
|
|
235
|
+
speed: this.parseInt(process.env.VERTEX_SPEED_RATING, 3),
|
|
236
|
+
quality: this.parseInt(process.env.VERTEX_QUALITY_RATING, 4),
|
|
237
|
+
cost: this.parseInt(process.env.VERTEX_COST_RATING, 3),
|
|
238
|
+
},
|
|
239
|
+
modelBehavior: {
|
|
240
|
+
maxTokensIssues: this.getConfigArray("VERTEX_MAX_TOKENS_ISSUES", []),
|
|
241
|
+
},
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Create Bedrock provider configuration
|
|
246
|
+
*/
|
|
247
|
+
createBedrockConfig() {
|
|
248
|
+
return {
|
|
249
|
+
provider: "bedrock",
|
|
250
|
+
models: {
|
|
251
|
+
fast: this.getConfigValue("BEDROCK_FAST_MODEL", MODEL_NAMES.BEDROCK.FAST),
|
|
252
|
+
balanced: this.getConfigValue("BEDROCK_BALANCED_MODEL", MODEL_NAMES.BEDROCK.BALANCED),
|
|
253
|
+
quality: this.getConfigValue("BEDROCK_QUALITY_MODEL", MODEL_NAMES.BEDROCK.QUALITY),
|
|
254
|
+
},
|
|
255
|
+
defaultCost: {
|
|
256
|
+
input: this.parseFloat(process.env.BEDROCK_DEFAULT_INPUT_COST, 0.0015),
|
|
257
|
+
output: this.parseFloat(process.env.BEDROCK_DEFAULT_OUTPUT_COST, 0.0075),
|
|
258
|
+
},
|
|
259
|
+
requiredEnvVars: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY"],
|
|
260
|
+
performance: {
|
|
261
|
+
speed: this.parseInt(process.env.BEDROCK_SPEED_RATING, 3),
|
|
262
|
+
quality: this.parseInt(process.env.BEDROCK_QUALITY_RATING, 4),
|
|
263
|
+
cost: this.parseInt(process.env.BEDROCK_COST_RATING, 3),
|
|
264
|
+
},
|
|
265
|
+
modelBehavior: {
|
|
266
|
+
maxTokensIssues: this.getConfigArray("BEDROCK_MAX_TOKENS_ISSUES", []),
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Create Azure provider configuration
|
|
272
|
+
*/
|
|
273
|
+
createAzureConfig() {
|
|
274
|
+
return {
|
|
275
|
+
provider: "azure",
|
|
276
|
+
models: {
|
|
277
|
+
fast: this.getConfigValue("AZURE_FAST_MODEL", MODEL_NAMES.AZURE.FAST),
|
|
278
|
+
balanced: this.getConfigValue("AZURE_BALANCED_MODEL", MODEL_NAMES.AZURE.BALANCED),
|
|
279
|
+
quality: this.getConfigValue("AZURE_QUALITY_MODEL", MODEL_NAMES.AZURE.QUALITY),
|
|
280
|
+
},
|
|
281
|
+
defaultCost: {
|
|
282
|
+
input: this.parseFloat(process.env.AZURE_DEFAULT_INPUT_COST, 0.00015),
|
|
283
|
+
output: this.parseFloat(process.env.AZURE_DEFAULT_OUTPUT_COST, 0.0006),
|
|
284
|
+
},
|
|
285
|
+
requiredEnvVars: ["AZURE_API_KEY", "AZURE_ENDPOINT"],
|
|
286
|
+
performance: {
|
|
287
|
+
speed: this.parseInt(process.env.AZURE_SPEED_RATING, 2),
|
|
288
|
+
quality: this.parseInt(process.env.AZURE_QUALITY_RATING, 3),
|
|
289
|
+
cost: this.parseInt(process.env.AZURE_COST_RATING, 2),
|
|
290
|
+
},
|
|
291
|
+
modelBehavior: {
|
|
292
|
+
maxTokensIssues: this.getConfigArray("AZURE_MAX_TOKENS_ISSUES", []),
|
|
351
293
|
},
|
|
352
294
|
};
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Create Ollama provider configuration
|
|
298
|
+
*/
|
|
299
|
+
createOllamaConfig() {
|
|
300
|
+
return {
|
|
301
|
+
provider: "ollama",
|
|
302
|
+
models: {
|
|
303
|
+
fast: this.getConfigValue("OLLAMA_FAST_MODEL", MODEL_NAMES.OLLAMA.FAST),
|
|
304
|
+
balanced: this.getConfigValue("OLLAMA_BALANCED_MODEL", MODEL_NAMES.OLLAMA.BALANCED),
|
|
305
|
+
quality: this.getConfigValue("OLLAMA_QUALITY_MODEL", MODEL_NAMES.OLLAMA.QUALITY),
|
|
306
|
+
},
|
|
307
|
+
defaultCost: {
|
|
308
|
+
input: this.parseFloat(process.env.OLLAMA_DEFAULT_INPUT_COST, 0),
|
|
309
|
+
output: this.parseFloat(process.env.OLLAMA_DEFAULT_OUTPUT_COST, 0),
|
|
310
|
+
},
|
|
311
|
+
requiredEnvVars: [],
|
|
312
|
+
performance: {
|
|
313
|
+
speed: this.parseInt(process.env.OLLAMA_SPEED_RATING, 4),
|
|
314
|
+
quality: this.parseInt(process.env.OLLAMA_QUALITY_RATING, 2),
|
|
315
|
+
cost: this.parseInt(process.env.OLLAMA_COST_RATING, 5),
|
|
316
|
+
},
|
|
317
|
+
modelBehavior: {
|
|
318
|
+
maxTokensIssues: this.getConfigArray("OLLAMA_MAX_TOKENS_ISSUES", [
|
|
319
|
+
MODEL_NAMES.OLLAMA.FAST,
|
|
320
|
+
MODEL_NAMES.OLLAMA.BALANCED,
|
|
321
|
+
MODEL_NAMES.OLLAMA.QUALITY,
|
|
322
|
+
]),
|
|
323
|
+
specialHandling: this.getConfigObject("OLLAMA_SPECIAL_HANDLING", {
|
|
324
|
+
baseUrl: this.getConfigValue("OLLAMA_BASE_URL", "http://localhost:11434"),
|
|
325
|
+
}),
|
|
326
|
+
},
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Create HuggingFace provider configuration
|
|
331
|
+
*/
|
|
332
|
+
createHuggingFaceConfig() {
|
|
333
|
+
return {
|
|
334
|
+
provider: "huggingface",
|
|
335
|
+
models: {
|
|
336
|
+
fast: this.getConfigValue("HUGGINGFACE_FAST_MODEL", MODEL_NAMES.HUGGINGFACE.FAST),
|
|
337
|
+
balanced: this.getConfigValue("HUGGINGFACE_BALANCED_MODEL", MODEL_NAMES.HUGGINGFACE.BALANCED),
|
|
338
|
+
quality: this.getConfigValue("HUGGINGFACE_QUALITY_MODEL", MODEL_NAMES.HUGGINGFACE.QUALITY),
|
|
339
|
+
},
|
|
340
|
+
defaultCost: {
|
|
341
|
+
input: this.parseFloat(process.env.HUGGINGFACE_DEFAULT_INPUT_COST, 0.0002),
|
|
342
|
+
output: this.parseFloat(process.env.HUGGINGFACE_DEFAULT_OUTPUT_COST, 0.0008),
|
|
343
|
+
},
|
|
344
|
+
requiredEnvVars: ["HUGGINGFACE_API_KEY"],
|
|
345
|
+
performance: {
|
|
346
|
+
speed: this.parseInt(process.env.HUGGINGFACE_SPEED_RATING, 3),
|
|
347
|
+
quality: this.parseInt(process.env.HUGGINGFACE_QUALITY_RATING, 3),
|
|
348
|
+
cost: this.parseInt(process.env.HUGGINGFACE_COST_RATING, 4),
|
|
349
|
+
},
|
|
350
|
+
modelBehavior: {
|
|
351
|
+
maxTokensIssues: this.getConfigArray("HUGGINGFACE_MAX_TOKENS_ISSUES", []),
|
|
352
|
+
},
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Create Mistral provider configuration
|
|
357
|
+
*/
|
|
358
|
+
createMistralConfig() {
|
|
359
|
+
return {
|
|
360
|
+
provider: "mistral",
|
|
361
|
+
models: {
|
|
362
|
+
fast: this.getConfigValue("MISTRAL_FAST_MODEL", MODEL_NAMES.MISTRAL.FAST),
|
|
363
|
+
balanced: this.getConfigValue("MISTRAL_BALANCED_MODEL", MODEL_NAMES.MISTRAL.BALANCED),
|
|
364
|
+
quality: this.getConfigValue("MISTRAL_QUALITY_MODEL", MODEL_NAMES.MISTRAL.QUALITY),
|
|
365
|
+
},
|
|
366
|
+
defaultCost: {
|
|
367
|
+
input: this.parseFloat(process.env.MISTRAL_DEFAULT_INPUT_COST, 0.0001),
|
|
368
|
+
output: this.parseFloat(process.env.MISTRAL_DEFAULT_OUTPUT_COST, 0.0003),
|
|
369
|
+
},
|
|
370
|
+
requiredEnvVars: ["MISTRAL_API_KEY"],
|
|
371
|
+
performance: {
|
|
372
|
+
speed: this.parseInt(process.env.MISTRAL_SPEED_RATING, 3),
|
|
373
|
+
quality: this.parseInt(process.env.MISTRAL_QUALITY_RATING, 3),
|
|
374
|
+
cost: this.parseInt(process.env.MISTRAL_COST_RATING, 4),
|
|
375
|
+
},
|
|
376
|
+
modelBehavior: {
|
|
377
|
+
maxTokensIssues: this.getConfigArray("MISTRAL_MAX_TOKENS_ISSUES", []),
|
|
378
|
+
},
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Load default configurations (replaces hardcoded values)
|
|
383
|
+
*/
|
|
384
|
+
loadDefaultConfigurations() {
|
|
385
|
+
// Load all provider configurations using centralized method
|
|
386
|
+
const defaultConfigs = this.createAllProviderConfigs();
|
|
353
387
|
// Load configurations
|
|
354
388
|
for (const [provider, config] of Object.entries(defaultConfigs)) {
|
|
355
389
|
this.configurations.set(provider, config);
|
|
@@ -468,6 +502,69 @@ export class ModelConfigurationManager {
|
|
|
468
502
|
this.configSource = "dynamic";
|
|
469
503
|
logger.debug(`Updated configuration for provider: ${provider}`);
|
|
470
504
|
}
|
|
505
|
+
/**
|
|
506
|
+
* Parse YAML content with basic support
|
|
507
|
+
* For full YAML support, would need a proper YAML library
|
|
508
|
+
*/
|
|
509
|
+
parseYAMLContent(configContent) {
|
|
510
|
+
// Basic YAML parsing for simple configurations
|
|
511
|
+
try {
|
|
512
|
+
return JSON.parse(configContent);
|
|
513
|
+
}
|
|
514
|
+
catch {
|
|
515
|
+
return this.convertSimpleYAMLToJSON(configContent);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Convert simple YAML to JSON object
|
|
520
|
+
* Handles basic key-value pairs only
|
|
521
|
+
*/
|
|
522
|
+
convertSimpleYAMLToJSON(configContent) {
|
|
523
|
+
const yamlLines = configContent.split("\n");
|
|
524
|
+
const jsonObj = {};
|
|
525
|
+
for (const line of yamlLines) {
|
|
526
|
+
const processedLine = this.processYAMLLine(line);
|
|
527
|
+
if (processedLine) {
|
|
528
|
+
jsonObj[processedLine.key] = processedLine.value;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
return jsonObj;
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Process a single YAML line
|
|
535
|
+
* Returns key-value pair if valid, null otherwise
|
|
536
|
+
*/
|
|
537
|
+
processYAMLLine(line) {
|
|
538
|
+
const trimmedLine = line.trim();
|
|
539
|
+
if (!trimmedLine || trimmedLine.startsWith("#")) {
|
|
540
|
+
return null;
|
|
541
|
+
}
|
|
542
|
+
const colonIndex = trimmedLine.indexOf(":");
|
|
543
|
+
if (colonIndex <= 0) {
|
|
544
|
+
return null;
|
|
545
|
+
}
|
|
546
|
+
const key = trimmedLine.substring(0, colonIndex).trim();
|
|
547
|
+
const value = trimmedLine.substring(colonIndex + 1).trim();
|
|
548
|
+
return {
|
|
549
|
+
key,
|
|
550
|
+
value: this.convertYAMLValue(value),
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* Convert YAML value to appropriate JavaScript type
|
|
555
|
+
*/
|
|
556
|
+
convertYAMLValue(value) {
|
|
557
|
+
if (value === "true") {
|
|
558
|
+
return true;
|
|
559
|
+
}
|
|
560
|
+
if (value === "false") {
|
|
561
|
+
return false;
|
|
562
|
+
}
|
|
563
|
+
if (!isNaN(Number(value))) {
|
|
564
|
+
return Number(value);
|
|
565
|
+
}
|
|
566
|
+
return value.replace(/['"]/g, "");
|
|
567
|
+
}
|
|
471
568
|
/**
|
|
472
569
|
* Load configurations from external source
|
|
473
570
|
*/
|
|
@@ -485,40 +582,7 @@ export class ModelConfigurationManager {
|
|
|
485
582
|
configData = JSON.parse(configContent);
|
|
486
583
|
}
|
|
487
584
|
else if (fileExtension === ".yaml" || fileExtension === ".yml") {
|
|
488
|
-
|
|
489
|
-
// For full YAML support, would need a proper YAML library
|
|
490
|
-
try {
|
|
491
|
-
configData = JSON.parse(configContent);
|
|
492
|
-
}
|
|
493
|
-
catch {
|
|
494
|
-
// Simple YAML-to-JSON conversion for basic cases
|
|
495
|
-
const yamlLines = configContent.split("\n");
|
|
496
|
-
const jsonObj = {};
|
|
497
|
-
for (const line of yamlLines) {
|
|
498
|
-
const trimmedLine = line.trim();
|
|
499
|
-
if (trimmedLine && !trimmedLine.startsWith("#")) {
|
|
500
|
-
const colonIndex = trimmedLine.indexOf(":");
|
|
501
|
-
if (colonIndex > 0) {
|
|
502
|
-
const key = trimmedLine.substring(0, colonIndex).trim();
|
|
503
|
-
const value = trimmedLine.substring(colonIndex + 1).trim();
|
|
504
|
-
// Basic type conversion
|
|
505
|
-
if (value === "true") {
|
|
506
|
-
jsonObj[key] = true;
|
|
507
|
-
}
|
|
508
|
-
else if (value === "false") {
|
|
509
|
-
jsonObj[key] = false;
|
|
510
|
-
}
|
|
511
|
-
else if (!isNaN(Number(value))) {
|
|
512
|
-
jsonObj[key] = Number(value);
|
|
513
|
-
}
|
|
514
|
-
else {
|
|
515
|
-
jsonObj[key] = value.replace(/['"]/g, "");
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
configData = jsonObj;
|
|
521
|
-
}
|
|
585
|
+
configData = this.parseYAMLContent(configContent);
|
|
522
586
|
}
|
|
523
587
|
else {
|
|
524
588
|
throw new Error(`Unsupported configuration file format: ${fileExtension}. Supported formats: .json, .yaml, .yml`);
|