@openclawcity/become 1.0.12 → 1.0.18

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.cjs CHANGED
@@ -3388,7 +3388,7 @@ Rules:
3388
3388
 
3389
3389
  // src/proxy/server.ts
3390
3390
  var SKILL_CACHE_TTL_MS = 5e3;
3391
- function createProxyServer(config, analyzer) {
3391
+ function createProxyServer(config, analyzer, overrideUpstreamUrl) {
3392
3392
  const store = new FileSkillStore({ baseDir: config.baseDir });
3393
3393
  const trust = new TrustManager(config.baseDir);
3394
3394
  const extractor = analyzer ? new LessonExtractor(store, trust, analyzer) : null;
@@ -3435,7 +3435,7 @@ function createProxyServer(config, analyzer) {
3435
3435
  stats.skills_injected++;
3436
3436
  }
3437
3437
  }
3438
- const upstreamUrl = buildUpstreamUrl(config, req.url);
3438
+ const upstreamUrl = buildUpstreamUrl(overrideUpstreamUrl ?? config.llm_base_url, req.url);
3439
3439
  const upstreamHeaders = buildUpstreamHeaders(config, req.headers);
3440
3440
  const isStreaming = body.stream === true;
3441
3441
  const modifiedBody = JSON.stringify(body);
@@ -3519,8 +3519,8 @@ function readBody(req) {
3519
3519
  req.on("error", reject);
3520
3520
  });
3521
3521
  }
3522
- function buildUpstreamUrl(config, path) {
3523
- const base = config.llm_base_url.replace(/\/+$/, "");
3522
+ function buildUpstreamUrl(baseUrl, path) {
3523
+ const base = baseUrl.replace(/\/+$/, "");
3524
3524
  return `${base}${path}`;
3525
3525
  }
3526
3526
  function buildUpstreamHeaders(config, incomingHeaders) {