惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
爱范儿
爱范儿
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
博客园 - 聂微东
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog
博客园 - Franky
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
宝玉的分享
宝玉的分享
罗磊的独立博客
Jina AI
Jina AI

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: keep runtime model auth alias after build · openclaw...
steipete · 2026-05-03 · via Recent Commits to openclaw:main

File tree

  • extensions/qa-lab/src/providers

    • shared

  • scripts

  • test/scripts

Original file line numberDiff line numberDiff line change

@@ -32,14 +32,16 @@ describe("QA provider image generation config", () => {

3232

"qa-channel",

3333

]);

3434

});

35-

it("uses the selected mock provider for AIMock image generation", () => {

35+

it("routes AIMock image generation through the OpenAI image provider", () => {

3636

const patch = buildQaImageGenerationConfigPatch({

3737

providerMode: "aimock",

3838

providerBaseUrl: "http://127.0.0.1:45080/v1",

3939

requiredPluginIds: [],

4040

});

4141
42-

expect(patch.agents.defaults.imageGenerationModel.primary).toBe("aimock/gpt-image-1");

42+

expect(patch.plugins.allow).toEqual(["acpx", "memory-core", "openai"]);

43+

expect(patch.plugins.entries).toEqual({ openai: { enabled: true } });

44+

expect(patch.agents.defaults.imageGenerationModel.primary).toBe("openai/gpt-image-1");

4345

expect(patch.models?.providers.aimock?.baseUrl).toBe("http://127.0.0.1:45080/v1");

4446

expect(patch.models?.providers["mock-openai"]).toBeUndefined();

4547

});

Original file line numberDiff line numberDiff line change

@@ -45,8 +45,7 @@ export function buildQaImageGenerationConfigPatch(input: QaImageGenerationPatchI

4545

providerBaseUrl: input.providerBaseUrl,

4646

});

4747

})();

48-

const providerPluginIds =

49-

provider.usesModelProviderPlugins || usesOpenAiMockImageProvider ? [imageProviderId] : [];

48+

const providerPluginIds = imageProviderId ? [imageProviderId] : [];

5049

const enabledPluginIds = uniqueNonEmpty(providerPluginIds);

5150
5251

return {

Original file line numberDiff line numberDiff line change

@@ -25,8 +25,9 @@ export function createMockQaProviderDefinition(

2525

serverLabel: params.serverLabel,

2626

},

2727

defaultModel: (options) => mockModelRef(params.mode, options?.alternate),

28-

defaultImageGenerationProviderIds: [],

29-

defaultImageGenerationModel: () => `${params.mode}/gpt-image-1`,

28+

defaultImageGenerationProviderIds: ["openai"],

29+

defaultImageGenerationModel: ({ modelProviderIds }) =>

30+

modelProviderIds.includes("openai") ? "openai/gpt-image-1" : null,

3031

usesFastModeByDefault: () => false,

3132

resolveModelParams: () => ({

3233

transport: "sse",

Original file line numberDiff line numberDiff line change

@@ -74,13 +74,38 @@ export function writeStableRootRuntimeAliases(params = {}) {

7474

candidatesByAlias.set(aliasFileName, candidates);

7575

}

7676
77+

const resolveAliasCandidate = (candidates) => {

78+

if (candidates.length === 1) {

79+

return candidates[0];

80+

}

81+

const candidateSet = new Set(candidates);

82+

const wrappers = candidates.filter((candidate) => {

83+

const filePath = path.join(distDir, candidate);

84+

let source;

85+

try {

86+

source = fsImpl.readFileSync(filePath, "utf8");

87+

} catch {

88+

return false;

89+

}

90+

return candidates.some(

91+

(target) =>

92+

target !== candidate &&

93+

candidateSet.has(target) &&

94+

source.includes(`"./${target}"`) &&

95+

!source.includes("\n//#region "),

96+

);

97+

});

98+

return wrappers.length === 1 ? wrappers[0] : null;

99+

};

100+
77101

for (const [aliasFileName, candidates] of candidatesByAlias) {

78102

const aliasPath = path.join(distDir, aliasFileName);

79-

if (candidates.length !== 1) {

103+

const candidate = resolveAliasCandidate(candidates);

104+

if (!candidate) {

80105

fsImpl.rmSync?.(aliasPath, { force: true });

81106

continue;

82107

}

83-

writeTextFileIfChanged(aliasPath, `export * from "./${candidates[0]}";\n`);

108+

writeTextFileIfChanged(aliasPath, `export * from "./${candidate}";\n`);

84109

}

85110

}

86111
Original file line numberDiff line numberDiff line change

@@ -145,6 +145,28 @@ describe("runtime postbuild static assets", () => {

145145

await expect(fs.stat(path.join(distDir, "install.runtime.js"))).rejects.toThrow();

146146

});

147147
148+

it("keeps stable aliases when one colliding root runtime chunk re-exports the implementation", async () => {

149+

const rootDir = createTempDir("openclaw-runtime-postbuild-");

150+

const distDir = path.join(rootDir, "dist");

151+

await fs.mkdir(distDir, { recursive: true });

152+

await fs.writeFile(

153+

path.join(distDir, "runtime-model-auth.runtime-Impl123.js"),

154+

"export const auth = true;\n",

155+

"utf8",

156+

);

157+

await fs.writeFile(

158+

path.join(distDir, "runtime-model-auth.runtime-Wrap456.js"),

159+

'import { auth } from "./runtime-model-auth.runtime-Impl123.js";\nexport { auth };\n',

160+

"utf8",

161+

);

162+
163+

writeStableRootRuntimeAliases({ rootDir });

164+
165+

expect(await fs.readFile(path.join(distDir, "runtime-model-auth.runtime.js"), "utf8")).toBe(

166+

'export * from "./runtime-model-auth.runtime-Wrap456.js";\n',

167+

);

168+

});

169+
148170

it("rewrites root runtime imports to stable aliases", async () => {

149171

const rootDir = createTempDir("openclaw-runtime-postbuild-");

150172

const distDir = path.join(rootDir, "dist");