open-agents-ai 0.185.16 → 0.185.17
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/index.js +14 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -66197,6 +66197,20 @@ async function startInteractive(config, repoPath) {
|
|
|
66197
66197
|
}
|
|
66198
66198
|
if (savedSettings.apiKey)
|
|
66199
66199
|
config = { ...config, apiKey: savedSettings.apiKey };
|
|
66200
|
+
if (config.backendUrl && /trycloudflare\.com/i.test(config.backendUrl)) {
|
|
66201
|
+
try {
|
|
66202
|
+
const probeUrl = normalizeBaseUrl(config.backendUrl) + "/v1/models";
|
|
66203
|
+
const headers = {};
|
|
66204
|
+
if (config.apiKey)
|
|
66205
|
+
headers["Authorization"] = `Bearer ${config.apiKey}`;
|
|
66206
|
+
const probe = await fetch(probeUrl, { headers, signal: AbortSignal.timeout(5e3) });
|
|
66207
|
+
if (!probe.ok) {
|
|
66208
|
+
config = { ...config, backendUrl: "http://127.0.0.1:11434", backendType: "ollama", apiKey: "" };
|
|
66209
|
+
}
|
|
66210
|
+
} catch {
|
|
66211
|
+
config = { ...config, backendUrl: "http://127.0.0.1:11434", backendType: "ollama", apiKey: "" };
|
|
66212
|
+
}
|
|
66213
|
+
}
|
|
66200
66214
|
if (savedSettings.endpointKeys && savedSettings.endpointKeys.length > 0) {
|
|
66201
66215
|
config._keyPool = savedSettings.endpointKeys.map((k) => k.key);
|
|
66202
66216
|
}
|
package/package.json
CHANGED