test(agents): fix embedded runner test config types · openclaw/openclaw@cd1846a
vincentkoc
·
2026-05-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -346,12 +346,16 @@ describe("runEmbeddedPiAgent", () => {
|
346 | 346 | it("resolves explicit OpenAI PI runs through Codex when auth order starts with Codex OAuth", async () => { |
347 | 347 | const sessionFile = nextSessionFile(); |
348 | 348 | const baseConfig = createEmbeddedPiRunnerOpenAiConfig(["mock-1"]); |
| 349 | +const openAIProvider = baseConfig.models?.providers?.openai; |
| 350 | +if (!openAIProvider) { |
| 351 | +throw new Error("expected OpenAI provider test config"); |
| 352 | +} |
349 | 353 | const cfg = { |
350 | 354 | ...baseConfig, |
351 | 355 | models: { |
352 | 356 | providers: { |
353 | 357 | openai: { |
354 | | - ...baseConfig.models?.providers?.openai, |
| 358 | + ...openAIProvider, |
355 | 359 | baseUrl: "https://api.openai.com/v1", |
356 | 360 | }, |
357 | 361 | }, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。