nyxora 1.1.5 → 1.1.6
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/dist/agent/reasoning.js +6 -2
- package/package.json +1 -1
package/dist/agent/reasoning.js
CHANGED
|
@@ -27,9 +27,13 @@ function getOpenAI() {
|
|
|
27
27
|
}
|
|
28
28
|
// Get API key from config (UI) or fallback to .env
|
|
29
29
|
let apiKey = '';
|
|
30
|
-
|
|
30
|
+
let configuredKeys = config.llm.api_keys;
|
|
31
|
+
if (typeof configuredKeys === 'string') {
|
|
32
|
+
configuredKeys = [configuredKeys];
|
|
33
|
+
}
|
|
34
|
+
if (Array.isArray(configuredKeys) && configuredKeys.length > 0) {
|
|
31
35
|
// Filter out empty keys
|
|
32
|
-
const keys =
|
|
36
|
+
const keys = configuredKeys.filter(k => typeof k === 'string' && k.trim() !== '');
|
|
33
37
|
if (keys.length > 0) {
|
|
34
38
|
currentKeyIndex = currentKeyIndex % keys.length;
|
|
35
39
|
apiKey = keys[currentKeyIndex];
|