openfox 1.4.0 → 1.5.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.
Files changed (29) hide show
  1. package/dist/{auto-compaction-C7URGBG3.js → auto-compaction-PLUVACIZ.js} +2 -2
  2. package/dist/{chat-handler-BUCN7QJG.js → chat-handler-WH2DZLWN.js} +4 -4
  3. package/dist/{chunk-7POE2HLF.js → chunk-CGUR45BP.js} +2 -2
  4. package/dist/{chunk-NJ24TM3O.js → chunk-DGYNNFLS.js} +6 -6
  5. package/dist/{chunk-UZ6LHPX7.js → chunk-ICPQDI4L.js} +3 -3
  6. package/dist/{chunk-JVAYCY76.js → chunk-LJRH7ICU.js} +2 -2
  7. package/dist/{chunk-TXTPA76S.js → chunk-PJRARONG.js} +26 -5
  8. package/dist/{chunk-G5U2OBHQ.js → chunk-SDRFMWBP.js} +3 -18
  9. package/dist/{chunk-L46YMTF2.js → chunk-UNCPQRFP.js} +12 -6
  10. package/dist/{chunk-M6HB2O3B.js → chunk-ZY3YGCDZ.js} +19 -19
  11. package/dist/cli/dev.js +1 -1
  12. package/dist/cli/index.js +1 -1
  13. package/dist/{config-ONC2MTDE.js → config-NITYYKDA.js} +4 -4
  14. package/dist/{orchestrator-L3MBTPG2.js → orchestrator-545FRLUM.js} +3 -3
  15. package/dist/package.json +1 -1
  16. package/dist/{processor-77Z5BZPK.js → processor-GFCR73FQ.js} +2 -2
  17. package/dist/{protocol-BZ6OIASP.d.ts → protocol-CLWtTnMd.d.ts} +3 -1
  18. package/dist/{provider-K4HAXILY.js → provider-ES2JTHXK.js} +6 -6
  19. package/dist/{serve-6QG3HSOL.js → serve-XX2UY3ID.js} +9 -9
  20. package/dist/server/index.d.ts +2 -2
  21. package/dist/server/index.js +6 -6
  22. package/dist/shared/index.d.ts +2 -2
  23. package/dist/{tools-G6PT5NJO.js → tools-DGYGRPUZ.js} +2 -2
  24. package/dist/{vision-fallback-P7WM3UGQ.js → vision-fallback-KM6LRAXF.js} +2 -2
  25. package/dist/web/assets/{index-D8PVAl5p.js → index-DItewd-V.js} +57 -57
  26. package/dist/web/assets/{index-BBtTirUQ.css → index-DwL8X9JS.css} +1 -1
  27. package/dist/web/index.html +2 -2
  28. package/dist/web/sw.js +1 -1
  29. package/package.json +1 -1
@@ -2,7 +2,7 @@ import {
2
2
  maybeAutoCompactContext,
3
3
  performManualContextCompaction,
4
4
  resolveCompactionStatsIdentity
5
- } from "./chunk-G5U2OBHQ.js";
5
+ } from "./chunk-SDRFMWBP.js";
6
6
  import "./chunk-XFXOSPYH.js";
7
7
  import "./chunk-NW7PIZH3.js";
8
8
  import "./chunk-WQ4W5H6A.js";
@@ -20,4 +20,4 @@ export {
20
20
  performManualContextCompaction,
21
21
  resolveCompactionStatsIdentity
22
22
  };
23
- //# sourceMappingURL=auto-compaction-C7URGBG3.js.map
23
+ //# sourceMappingURL=auto-compaction-PLUVACIZ.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  runChatTurn
3
- } from "./chunk-7POE2HLF.js";
4
- import "./chunk-G5U2OBHQ.js";
3
+ } from "./chunk-CGUR45BP.js";
4
+ import "./chunk-SDRFMWBP.js";
5
5
  import {
6
6
  generateSessionName,
7
7
  needsNameGeneration
@@ -59,7 +59,7 @@ async function startChatSession(sessionId, content, deps, options) {
59
59
  sessionManager.setRunning(sessionId, true);
60
60
  broadcastForSession(sessionId, createSessionRunningMessage(true));
61
61
  try {
62
- const { maybeAutoCompactContext } = await import("./auto-compaction-C7URGBG3.js");
62
+ const { maybeAutoCompactContext } = await import("./auto-compaction-PLUVACIZ.js");
63
63
  await maybeAutoCompactContext({
64
64
  sessionManager,
65
65
  sessionId,
@@ -198,4 +198,4 @@ export {
198
198
  startChatSession,
199
199
  stopSessionExecution
200
200
  };
201
- //# sourceMappingURL=chat-handler-BUCN7QJG.js.map
201
+ //# sourceMappingURL=chat-handler-WH2DZLWN.js.map
@@ -13,7 +13,7 @@ import {
13
13
  getToolRegistryForAgent,
14
14
  loadAllAgentsDefault,
15
15
  runTopLevelAgentLoop
16
- } from "./chunk-G5U2OBHQ.js";
16
+ } from "./chunk-SDRFMWBP.js";
17
17
  import {
18
18
  getCurrentContextWindowId,
19
19
  getEventStore
@@ -311,4 +311,4 @@ export {
311
311
  runBuilderTurn,
312
312
  runVerifierTurn
313
313
  };
314
- //# sourceMappingURL=chunk-7POE2HLF.js.map
314
+ //# sourceMappingURL=chunk-CGUR45BP.js.map
@@ -27,7 +27,7 @@ Options:
27
27
  }
28
28
  async function runNetworkSetup(mode) {
29
29
  const { loadAuthConfig, saveAuthConfig, encryptPassword } = await import("./auth-JF2HDJ6P.js");
30
- const { saveGlobalConfig } = await import("./config-ONC2MTDE.js");
30
+ const { saveGlobalConfig } = await import("./config-NITYYKDA.js");
31
31
  const { getAuthKeyPath } = await import("./paths-ZRI56O63.js");
32
32
  const existingAuth = await loadAuthConfig(mode);
33
33
  if (existingAuth) {
@@ -88,7 +88,7 @@ async function runNetworkSetup(mode) {
88
88
  console.log("\u2713 Configuration saved!\n");
89
89
  }
90
90
  async function runConfig(mode) {
91
- const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-ONC2MTDE.js");
91
+ const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-NITYYKDA.js");
92
92
  const { getGlobalConfigPath } = await import("./paths-ZRI56O63.js");
93
93
  const config = await loadGlobalConfig(mode);
94
94
  const configPath = getGlobalConfigPath(mode);
@@ -143,18 +143,18 @@ async function runCli(options) {
143
143
  break;
144
144
  }
145
145
  case "provider": {
146
- const { runProviderCommand } = await import("./provider-K4HAXILY.js");
146
+ const { runProviderCommand } = await import("./provider-ES2JTHXK.js");
147
147
  const [, subcommand] = positionals;
148
148
  await runProviderCommand(mode, subcommand);
149
149
  break;
150
150
  }
151
151
  default: {
152
- const { configFileExists } = await import("./config-ONC2MTDE.js");
152
+ const { configFileExists } = await import("./config-NITYYKDA.js");
153
153
  const configExists = await configFileExists(mode);
154
154
  if (!configExists) {
155
155
  await runNetworkSetup(mode);
156
156
  }
157
- const { runServe } = await import("./serve-6QG3HSOL.js");
157
+ const { runServe } = await import("./serve-XX2UY3ID.js");
158
158
  await runServe({
159
159
  mode,
160
160
  port: values.port ? parseInt(values.port) : void 0,
@@ -167,4 +167,4 @@ async function runCli(options) {
167
167
  export {
168
168
  runCli
169
169
  };
170
- //# sourceMappingURL=chunk-NJ24TM3O.js.map
170
+ //# sourceMappingURL=chunk-DGYNNFLS.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  detectBackend,
3
3
  detectModel
4
- } from "./chunk-L46YMTF2.js";
4
+ } from "./chunk-UNCPQRFP.js";
5
5
  import {
6
6
  getGlobalConfigPath
7
7
  } from "./chunk-R4HADRYO.js";
@@ -44,7 +44,7 @@ async function configFileExists(mode) {
44
44
  return false;
45
45
  }
46
46
  }
47
- var backendSchema = z.enum(["auto", "vllm", "sglang", "ollama", "llamacpp", "openai", "anthropic", "unknown"]);
47
+ var backendSchema = z.enum(["auto", "vllm", "sglang", "ollama", "llamacpp", "openai", "anthropic", "opencode-go", "unknown"]);
48
48
  var modelConfigSchema = z.object({
49
49
  id: z.string(),
50
50
  contextWindow: z.number(),
@@ -380,4 +380,4 @@ export {
380
380
  activateProvider,
381
381
  mergeConfigs
382
382
  };
383
- //# sourceMappingURL=chunk-UZ6LHPX7.js.map
383
+ //# sourceMappingURL=chunk-ICPQDI4L.js.map
@@ -29,7 +29,7 @@ function isVisionFallbackEnabled() {
29
29
  async function ensureVisionFallbackConfigLoaded() {
30
30
  if (configLoaded) return;
31
31
  try {
32
- const { loadGlobalConfig, getVisionFallback } = await import("./config-ONC2MTDE.js");
32
+ const { loadGlobalConfig, getVisionFallback } = await import("./config-NITYYKDA.js");
33
33
  const { getRuntimeConfig } = await import("./runtime-config-2XJJIMSC.js");
34
34
  const runtimeConfig = getRuntimeConfig();
35
35
  const mode = runtimeConfig.mode ?? "production";
@@ -134,4 +134,4 @@ export {
134
134
  describeImage,
135
135
  describeImageFromDataUrl
136
136
  };
137
- //# sourceMappingURL=chunk-JVAYCY76.js.map
137
+ //# sourceMappingURL=chunk-LJRH7ICU.js.map
@@ -3,7 +3,7 @@ import {
3
3
  createLLMClient,
4
4
  detectBackend,
5
5
  detectModel
6
- } from "./chunk-L46YMTF2.js";
6
+ } from "./chunk-UNCPQRFP.js";
7
7
  import {
8
8
  logger
9
9
  } from "./chunk-PNBH3RAX.js";
@@ -43,7 +43,14 @@ async function fetchModelsWithContext(baseUrl, apiKey, backend) {
43
43
  logger.info("Fetching Ollama models via /api/tags and /api/show");
44
44
  return fetchOllamaModelsWithContext(baseUrl, apiKey);
45
45
  }
46
- const url = baseUrl.includes("/v1") ? `${baseUrl}/models` : `${baseUrl}/v1/models`;
46
+ const isOpenCodeGo = baseUrl.includes("opencode.ai/zen/go");
47
+ let url;
48
+ if (isOpenCodeGo) {
49
+ url = baseUrl.replace("/zen/go", "/zen").replace(/\/v1$/, "") + "/v1/models";
50
+ logger.info("OpenCode Go detected, using alternate models endpoint", { original: baseUrl, modelsUrl: url });
51
+ } else {
52
+ url = baseUrl.includes("/v1") ? `${baseUrl}/models` : `${baseUrl}/v1/models`;
53
+ }
47
54
  logger.info("Fetching models via /v1/models", { url });
48
55
  try {
49
56
  const headers = {
@@ -144,7 +151,6 @@ function parseDefaultModelSelection(selection) {
144
151
  }
145
152
  function createProviderManager(config) {
146
153
  let providers = [...config.providers ?? []];
147
- const { providerId: initialProviderId, model: initialModel } = parseDefaultModelSelection(config.defaultModelSelection);
148
154
  let defaultModelSelection = config.defaultModelSelection;
149
155
  let llmClient = createLLMClient(config);
150
156
  const providerStatus = /* @__PURE__ */ new Map();
@@ -159,7 +165,8 @@ function createProviderManager(config) {
159
165
  ...config.llm,
160
166
  baseUrl: provider.url.includes("/v1") ? provider.url : `${provider.url}/v1`,
161
167
  model,
162
- backend: provider.backend
168
+ backend: provider.backend,
169
+ ...provider.apiKey && { apiKey: provider.apiKey }
163
170
  }
164
171
  };
165
172
  }
@@ -309,12 +316,26 @@ function createProviderManager(config) {
309
316
  return true;
310
317
  },
311
318
  setProviders(newProviders, newDefaultModelSelection) {
319
+ const wasActiveProviderId = this.getActiveProviderId();
312
320
  providers = [...newProviders];
313
321
  defaultModelSelection = newDefaultModelSelection;
314
322
  providerStatus.clear();
315
323
  for (const p of providers) {
316
324
  providerStatus.set(p.id, "unknown");
317
325
  }
326
+ const newActiveProviderId = this.getActiveProviderId();
327
+ if (newActiveProviderId && newActiveProviderId !== wasActiveProviderId) {
328
+ const activeProvider = providers.find((p) => p.id === newActiveProviderId);
329
+ if (activeProvider) {
330
+ const providerConfig = createConfigForProvider(activeProvider, this.getCurrentModel() ?? "auto");
331
+ llmClient = createLLMClient(providerConfig);
332
+ logger.info("setProviders: recreated LLM client for new active provider", {
333
+ providerId: newActiveProviderId,
334
+ url: activeProvider.url,
335
+ hasApiKey: !!activeProvider.apiKey
336
+ });
337
+ }
338
+ }
318
339
  },
319
340
  getProviderStatus(providerId) {
320
341
  return providerStatus.get(providerId) ?? "unknown";
@@ -441,4 +462,4 @@ export {
441
462
  parseDefaultModelSelection,
442
463
  createProviderManager
443
464
  };
444
- //# sourceMappingURL=chunk-TXTPA76S.js.map
465
+ //# sourceMappingURL=chunk-PJRARONG.js.map
@@ -3608,7 +3608,7 @@ var callSubAgentTool = {
3608
3608
  };
3609
3609
  }
3610
3610
  try {
3611
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-G6PT5NJO.js");
3611
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-DGYGRPUZ.js");
3612
3612
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3613
3613
  const turnMetrics = new TurnMetrics();
3614
3614
  const result = await executeSubAgent({
@@ -4437,23 +4437,8 @@ async function performContextCompaction(options) {
4437
4437
  content: file.content ?? "",
4438
4438
  source: file.source
4439
4439
  }));
4440
- let requestMessages = toRequestContextMessages2(getContextMessages(sessionId));
4440
+ const requestMessages = toRequestContextMessages2(getContextMessages(sessionId));
4441
4441
  const config = getRuntimeConfig();
4442
- const safeInputLimit = Math.floor(config.context.maxTokens * 0.75);
4443
- if (tokenCountAtClose > safeInputLimit && requestMessages.length > 4) {
4444
- const avgTokensPerMessage = tokenCountAtClose / requestMessages.length;
4445
- const messagesToDrop = Math.ceil((tokenCountAtClose - safeInputLimit) / avgTokensPerMessage);
4446
- if (messagesToDrop > 0 && messagesToDrop < requestMessages.length - 2) {
4447
- const kept = requestMessages.length - messagesToDrop;
4448
- logger.info("Truncating compaction input to fit model context", {
4449
- sessionId,
4450
- originalMessages: requestMessages.length,
4451
- keptMessages: kept,
4452
- estimatedTokensSaved: Math.round(messagesToDrop * avgTokensPerMessage)
4453
- });
4454
- requestMessages = [requestMessages[0], ...requestMessages.slice(-kept + 1)];
4455
- }
4456
- }
4457
4442
  const allAgents = await loadAllAgentsDefault();
4458
4443
  const plannerDef = findAgentById("planner", allAgents);
4459
4444
  const subAgentDefs = getSubAgents(allAgents);
@@ -4606,4 +4591,4 @@ export {
4606
4591
  getToolRegistryForAgent,
4607
4592
  createToolRegistry
4608
4593
  };
4609
- //# sourceMappingURL=chunk-G5U2OBHQ.js.map
4594
+ //# sourceMappingURL=chunk-SDRFMWBP.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  describeImageFromDataUrl,
3
3
  ensureVisionFallbackConfigLoaded
4
- } from "./chunk-JVAYCY76.js";
4
+ } from "./chunk-LJRH7ICU.js";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-PNBH3RAX.js";
@@ -28,6 +28,11 @@ var BACKEND_CAPABILITIES = {
28
28
  supportsChatTemplateKwargs: false,
29
29
  supportsTopK: true
30
30
  },
31
+ "opencode-go": {
32
+ supportsReasoningField: false,
33
+ supportsChatTemplateKwargs: false,
34
+ supportsTopK: true
35
+ },
31
36
  unknown: {
32
37
  // Assume vLLM-like for unknown backends
33
38
  supportsReasoningField: true,
@@ -155,6 +160,8 @@ function getBackendDisplayName(backend) {
155
160
  return "Ollama";
156
161
  case "llamacpp":
157
162
  return "llama.cpp";
163
+ case "opencode-go":
164
+ return "OpenCode Go";
158
165
  case "unknown":
159
166
  return "Unknown";
160
167
  }
@@ -772,8 +779,7 @@ function createLLMClient(config, initialBackend = "unknown") {
772
779
  const baseURL = config.llm.baseUrl.includes("/v1") ? config.llm.baseUrl : `${config.llm.baseUrl}/v1`;
773
780
  const openai = new OpenAI({
774
781
  baseURL,
775
- apiKey: "not-needed"
776
- // Most local backends don't require API key
782
+ apiKey: config.llm.apiKey ?? "not-needed"
777
783
  });
778
784
  let model = config.llm.model;
779
785
  let profile = getModelProfile(model);
@@ -818,7 +824,7 @@ function createLLMClient(config, initialBackend = "unknown") {
818
824
  try {
819
825
  const shouldDisableThinking = disableThinking || request.disableThinking === true;
820
826
  await ensureVisionFallbackConfigLoaded();
821
- const { isVisionFallbackEnabled } = await import("./vision-fallback-P7WM3UGQ.js");
827
+ const { isVisionFallbackEnabled } = await import("./vision-fallback-KM6LRAXF.js");
822
828
  const paramsOptions = {
823
829
  model,
824
830
  request,
@@ -896,7 +902,7 @@ function createLLMClient(config, initialBackend = "unknown") {
896
902
  });
897
903
  try {
898
904
  await ensureVisionFallbackConfigLoaded();
899
- const { isVisionFallbackEnabled } = await import("./vision-fallback-P7WM3UGQ.js");
905
+ const { isVisionFallbackEnabled } = await import("./vision-fallback-KM6LRAXF.js");
900
906
  const shouldDisableThinking = disableThinking || request.disableThinking === true;
901
907
  const createParams = await buildStreamingCreateParams({
902
908
  model,
@@ -1111,4 +1117,4 @@ export {
1111
1117
  getLlmStatus,
1112
1118
  clearModelCache
1113
1119
  };
1114
- //# sourceMappingURL=chunk-L46YMTF2.js.map
1120
+ //# sourceMappingURL=chunk-UNCPQRFP.js.map
@@ -2,7 +2,7 @@ import {
2
2
  createVerifierNudgeConfig,
3
3
  runBuilderTurn,
4
4
  runChatTurn
5
- } from "./chunk-7POE2HLF.js";
5
+ } from "./chunk-CGUR45BP.js";
6
6
  import {
7
7
  TurnMetrics,
8
8
  agentExists,
@@ -40,7 +40,7 @@ import {
40
40
  saveSkill,
41
41
  setSkillEnabled,
42
42
  skillExists
43
- } from "./chunk-G5U2OBHQ.js";
43
+ } from "./chunk-SDRFMWBP.js";
44
44
  import {
45
45
  generateSessionName,
46
46
  needsNameGeneration
@@ -48,7 +48,7 @@ import {
48
48
  import {
49
49
  createProviderManager,
50
50
  parseDefaultModelSelection
51
- } from "./chunk-TXTPA76S.js";
51
+ } from "./chunk-PJRARONG.js";
52
52
  import {
53
53
  SessionNotFoundError,
54
54
  createLLMClient,
@@ -57,7 +57,7 @@ import {
57
57
  getBackendDisplayName,
58
58
  getLlmStatus,
59
59
  getModelProfile
60
- } from "./chunk-L46YMTF2.js";
60
+ } from "./chunk-UNCPQRFP.js";
61
61
  import {
62
62
  createSession,
63
63
  deleteSession,
@@ -5788,7 +5788,7 @@ async function createServerHandle(config) {
5788
5788
  return res.status(400).json({ error: "providerId is required" });
5789
5789
  }
5790
5790
  sessionManager.setSessionProvider(sessionId, providerId, model ?? "auto");
5791
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-ONC2MTDE.js");
5791
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-NITYYKDA.js");
5792
5792
  const globalConfig = await loadGlobalConfig(config.mode ?? "production");
5793
5793
  const updatedConfig = setDefaultModelSelection(globalConfig, providerId, model ?? "auto");
5794
5794
  await saveGlobalConfig(config.mode ?? "production", updatedConfig);
@@ -5853,7 +5853,7 @@ async function createServerHandle(config) {
5853
5853
  if (!callId || approved === void 0) {
5854
5854
  return res.status(400).json({ error: "callId and approved are required" });
5855
5855
  }
5856
- const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-G6PT5NJO.js");
5856
+ const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-DGYGRPUZ.js");
5857
5857
  const result = providePathConfirmation2(callId, approved, alwaysAllow);
5858
5858
  if (!result.found) {
5859
5859
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
@@ -5878,7 +5878,7 @@ async function createServerHandle(config) {
5878
5878
  if (!callId || !answer) {
5879
5879
  return res.status(400).json({ error: "callId and answer are required" });
5880
5880
  }
5881
- const { provideAnswer: provideAnswer2 } = await import("./tools-G6PT5NJO.js");
5881
+ const { provideAnswer: provideAnswer2 } = await import("./tools-DGYGRPUZ.js");
5882
5882
  const found = provideAnswer2(callId, answer);
5883
5883
  if (!found) {
5884
5884
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -5914,8 +5914,8 @@ async function createServerHandle(config) {
5914
5914
  if (!session) {
5915
5915
  return res.status(404).json({ error: "Session not found" });
5916
5916
  }
5917
- const { stopSessionExecution } = await import("./chat-handler-BUCN7QJG.js");
5918
- const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-G6PT5NJO.js");
5917
+ const { stopSessionExecution } = await import("./chat-handler-WH2DZLWN.js");
5918
+ const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-DGYGRPUZ.js");
5919
5919
  stopSessionExecution(sessionId, sessionManager);
5920
5920
  abortSession(sessionId);
5921
5921
  cancelQuestionsForSession2(sessionId, "Session stopped by user");
@@ -5973,7 +5973,7 @@ async function createServerHandle(config) {
5973
5973
  let visionFallback;
5974
5974
  let globalWorkdir;
5975
5975
  try {
5976
- const { loadGlobalConfig, getVisionFallback } = await import("./config-ONC2MTDE.js");
5976
+ const { loadGlobalConfig, getVisionFallback } = await import("./config-NITYYKDA.js");
5977
5977
  const globalConfig = await loadGlobalConfig(config.mode ?? "production");
5978
5978
  const fallback = getVisionFallback(globalConfig);
5979
5979
  if (fallback) {
@@ -6025,12 +6025,12 @@ async function createServerHandle(config) {
6025
6025
  });
6026
6026
  });
6027
6027
  app.post("/api/providers/test", async (req, res) => {
6028
- const { url } = req.body;
6028
+ const { url, skipBackendDetection } = req.body;
6029
6029
  if (!url) {
6030
6030
  return res.status(400).json({ error: "url is required" });
6031
6031
  }
6032
6032
  try {
6033
- const backend = await detectBackend(url);
6033
+ const backend = skipBackendDetection ? "auto" : await detectBackend(url);
6034
6034
  const model = await detectModel(url);
6035
6035
  res.json({
6036
6036
  success: true,
@@ -6051,7 +6051,7 @@ async function createServerHandle(config) {
6051
6051
  return res.status(400).json({ error: "name, url, and backend are required" });
6052
6052
  }
6053
6053
  try {
6054
- const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-ONC2MTDE.js");
6054
+ const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-NITYYKDA.js");
6055
6055
  const globalConfig = await loadGlobalConfig(config.mode ?? "production");
6056
6056
  const providerBackend = backend;
6057
6057
  const configWithProvider = addProvider(globalConfig, {
@@ -6084,7 +6084,7 @@ async function createServerHandle(config) {
6084
6084
  app.post("/api/init/config", async (req, res) => {
6085
6085
  const { workdir, visionFallback } = req.body;
6086
6086
  try {
6087
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-ONC2MTDE.js");
6087
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-NITYYKDA.js");
6088
6088
  const globalConfig = await loadGlobalConfig(config.mode ?? "production");
6089
6089
  const updatedConfig = {
6090
6090
  ...globalConfig,
@@ -6112,7 +6112,7 @@ async function createServerHandle(config) {
6112
6112
  });
6113
6113
  app.delete("/api/providers/:id", async (req, res) => {
6114
6114
  const { id } = req.params;
6115
- const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-ONC2MTDE.js");
6115
+ const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-NITYYKDA.js");
6116
6116
  const globalConfig = await loadGlobalConfig(config.mode ?? "production");
6117
6117
  const updatedConfig = removeProvider(globalConfig, id);
6118
6118
  await saveGlobalConfig(config.mode ?? "production", updatedConfig);
@@ -6132,7 +6132,7 @@ async function createServerHandle(config) {
6132
6132
  return res.status(400).json({ error: result.error });
6133
6133
  }
6134
6134
  const llmClient = getLLMClient();
6135
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-ONC2MTDE.js");
6135
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-NITYYKDA.js");
6136
6136
  const globalConfig = await loadGlobalConfig(config.mode ?? "production");
6137
6137
  const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
6138
6138
  await saveGlobalConfig(config.mode ?? "production", updatedConfig);
@@ -6153,7 +6153,7 @@ async function createServerHandle(config) {
6153
6153
  if (!result.success) {
6154
6154
  return res.status(400).json({ error: result.error });
6155
6155
  }
6156
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-ONC2MTDE.js");
6156
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-NITYYKDA.js");
6157
6157
  const globalConfig = await loadGlobalConfig(config.mode ?? "production");
6158
6158
  const updatedProviders = providerManager.getProviders();
6159
6159
  const updatedConfig = {
@@ -6341,7 +6341,7 @@ async function createServerHandle(config) {
6341
6341
  providerManager
6342
6342
  );
6343
6343
  const wss = wssExports.wss;
6344
- const { QueueProcessor } = await import("./processor-77Z5BZPK.js");
6344
+ const { QueueProcessor } = await import("./processor-GFCR73FQ.js");
6345
6345
  const queueProcessor = new QueueProcessor({
6346
6346
  sessionManager,
6347
6347
  providerManager,
@@ -6411,4 +6411,4 @@ export {
6411
6411
  createServerHandle,
6412
6412
  createServer
6413
6413
  };
6414
- //# sourceMappingURL=chunk-M6HB2O3B.js.map
6414
+ //# sourceMappingURL=chunk-ZY3YGCDZ.js.map
package/dist/cli/dev.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-NJ24TM3O.js";
4
+ } from "../chunk-DGYNNFLS.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-PNBH3RAX.js";
package/dist/cli/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-NJ24TM3O.js";
4
+ } from "../chunk-DGYNNFLS.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-PNBH3RAX.js";
@@ -13,11 +13,11 @@ import {
13
13
  saveGlobalConfig,
14
14
  setDefaultModelSelection,
15
15
  trySmartDefaults
16
- } from "./chunk-UZ6LHPX7.js";
17
- import "./chunk-L46YMTF2.js";
16
+ } from "./chunk-ICPQDI4L.js";
17
+ import "./chunk-UNCPQRFP.js";
18
18
  import "./chunk-XFXOSPYH.js";
19
19
  import "./chunk-R4HADRYO.js";
20
- import "./chunk-JVAYCY76.js";
20
+ import "./chunk-LJRH7ICU.js";
21
21
  import "./chunk-PNBH3RAX.js";
22
22
  export {
23
23
  activateProvider,
@@ -35,4 +35,4 @@ export {
35
35
  setDefaultModelSelection,
36
36
  trySmartDefaults
37
37
  };
38
- //# sourceMappingURL=config-ONC2MTDE.js.map
38
+ //# sourceMappingURL=config-NITYYKDA.js.map
@@ -3,7 +3,7 @@ import {
3
3
  runBuilderTurn,
4
4
  runChatTurn,
5
5
  runVerifierTurn
6
- } from "./chunk-7POE2HLF.js";
6
+ } from "./chunk-CGUR45BP.js";
7
7
  import {
8
8
  TurnMetrics,
9
9
  createChatDoneEvent,
@@ -11,7 +11,7 @@ import {
11
11
  createMessageStartEvent,
12
12
  createToolCallEvent,
13
13
  createToolResultEvent
14
- } from "./chunk-G5U2OBHQ.js";
14
+ } from "./chunk-SDRFMWBP.js";
15
15
  import "./chunk-XFXOSPYH.js";
16
16
  import "./chunk-NW7PIZH3.js";
17
17
  import "./chunk-WQ4W5H6A.js";
@@ -36,4 +36,4 @@ export {
36
36
  runChatTurn,
37
37
  runVerifierTurn
38
38
  };
39
- //# sourceMappingURL=orchestrator-L3MBTPG2.js.map
39
+ //# sourceMappingURL=orchestrator-545FRLUM.js.map
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -188,7 +188,7 @@ var QueueProcessor = class {
188
188
  backend: provider?.backend ?? llmClient.getBackend(),
189
189
  model: llmClient.getModel()
190
190
  };
191
- const { runChatTurn } = await import("./orchestrator-L3MBTPG2.js");
191
+ const { runChatTurn } = await import("./orchestrator-545FRLUM.js");
192
192
  runChatTurn({
193
193
  sessionManager,
194
194
  sessionId,
@@ -233,4 +233,4 @@ var QueueProcessor = class {
233
233
  export {
234
234
  QueueProcessor
235
235
  };
236
- //# sourceMappingURL=processor-77Z5BZPK.js.map
236
+ //# sourceMappingURL=processor-GFCR73FQ.js.map
@@ -397,7 +397,7 @@ interface Diagnostic {
397
397
  code?: string | number;
398
398
  }
399
399
  /** Supported LLM inference backends */
400
- type LlmBackend = 'vllm' | 'sglang' | 'ollama' | 'llamacpp' | 'unknown';
400
+ type LlmBackend = 'vllm' | 'sglang' | 'ollama' | 'llamacpp' | 'opencode-go' | 'unknown';
401
401
  /** Extended backend type including cloud providers */
402
402
  type ProviderBackend = LlmBackend | 'openai' | 'anthropic' | 'auto';
403
403
  /** Model configuration with context window */
@@ -425,6 +425,8 @@ interface Config {
425
425
  idleTimeout: number;
426
426
  /** Backend type - 'auto' for auto-detection, or explicit backend name */
427
427
  backend: LlmBackend | 'auto';
428
+ /** API key for cloud providers */
429
+ apiKey?: string;
428
430
  /** Disable thinking/reasoning globally (for e2e tests) */
429
431
  disableThinking?: boolean;
430
432
  };
@@ -5,17 +5,17 @@ import {
5
5
  loadGlobalConfig,
6
6
  removeProvider,
7
7
  saveGlobalConfig
8
- } from "./chunk-UZ6LHPX7.js";
8
+ } from "./chunk-ICPQDI4L.js";
9
9
  import {
10
10
  fetchAvailableModelsFromBackend
11
- } from "./chunk-TXTPA76S.js";
11
+ } from "./chunk-PJRARONG.js";
12
12
  import {
13
13
  detectBackend,
14
14
  detectModel
15
- } from "./chunk-L46YMTF2.js";
15
+ } from "./chunk-UNCPQRFP.js";
16
16
  import "./chunk-XFXOSPYH.js";
17
17
  import "./chunk-R4HADRYO.js";
18
- import "./chunk-JVAYCY76.js";
18
+ import "./chunk-LJRH7ICU.js";
19
19
  import "./chunk-PNBH3RAX.js";
20
20
 
21
21
  // src/cli/provider.ts
@@ -248,7 +248,7 @@ async function runProviderAdd(mode) {
248
248
  isActive: makeActive
249
249
  });
250
250
  if (makeActive) {
251
- const { setDefaultModelSelection } = await import("./config-ONC2MTDE.js");
251
+ const { setDefaultModelSelection } = await import("./config-NITYYKDA.js");
252
252
  newConfig = setDefaultModelSelection(newConfig, newConfig.providers[newConfig.providers.length - 1].id, selectedModel);
253
253
  }
254
254
  await saveGlobalConfig(mode, newConfig);
@@ -372,4 +372,4 @@ export {
372
372
  runProviderRemove,
373
373
  runProviderUse
374
374
  };
375
- //# sourceMappingURL=provider-K4HAXILY.js.map
375
+ //# sourceMappingURL=provider-ES2JTHXK.js.map
@@ -2,15 +2,15 @@ import {
2
2
  getActiveProvider,
3
3
  getDefaultModel,
4
4
  loadGlobalConfig
5
- } from "./chunk-UZ6LHPX7.js";
5
+ } from "./chunk-ICPQDI4L.js";
6
6
  import {
7
7
  createServer
8
- } from "./chunk-M6HB2O3B.js";
9
- import "./chunk-7POE2HLF.js";
10
- import "./chunk-G5U2OBHQ.js";
8
+ } from "./chunk-ZY3YGCDZ.js";
9
+ import "./chunk-CGUR45BP.js";
10
+ import "./chunk-SDRFMWBP.js";
11
11
  import "./chunk-QDEKU5RL.js";
12
- import "./chunk-TXTPA76S.js";
13
- import "./chunk-L46YMTF2.js";
12
+ import "./chunk-PJRARONG.js";
13
+ import "./chunk-UNCPQRFP.js";
14
14
  import "./chunk-XFXOSPYH.js";
15
15
  import "./chunk-NW7PIZH3.js";
16
16
  import "./chunk-WQ4W5H6A.js";
@@ -29,7 +29,7 @@ import {
29
29
  import {
30
30
  loadConfig
31
31
  } from "./chunk-TVQOONDR.js";
32
- import "./chunk-JVAYCY76.js";
32
+ import "./chunk-LJRH7ICU.js";
33
33
  import {
34
34
  logger
35
35
  } from "./chunk-PNBH3RAX.js";
@@ -39,7 +39,7 @@ import os from "os";
39
39
  import { statSync } from "fs";
40
40
 
41
41
  // src/constants.ts
42
- var VERSION = "1.4.0";
42
+ var VERSION = "1.5.0";
43
43
 
44
44
  // src/server/utils/network.ts
45
45
  function getNetworkInterfaces() {
@@ -190,4 +190,4 @@ async function runServe(options) {
190
190
  export {
191
191
  runServe
192
192
  };
193
- //# sourceMappingURL=serve-6QG3HSOL.js.map
193
+ //# sourceMappingURL=serve-XX2UY3ID.js.map