test: tighten codex forward compat assertion · openclaw/openclaw@8f023f3
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
File tree
src/agents/pi-embedded-runner
| Original file line number | Diff line number | Diff line change |
|---|
@@ -219,12 +219,12 @@ describe("resolveModel forward-compat errors and overrides", () => {
|
219 | 219 | |
220 | 220 | const result = resolveModelForTest("openai-codex", "gpt-5.4", "/tmp/agent", cfg); |
221 | 221 | expect(result.error).toBeUndefined(); |
222 | | -expect(result.model).toMatchObject({ |
223 | | - api: "openai-codex-responses", |
224 | | - baseUrl: "https://custom.example.com", |
225 | | - headers: { "X-Custom-Auth": "token-123" }, |
226 | | - id: "gpt-5.4", |
227 | | -provider: "openai-codex", |
| 222 | +expect(result.model?.api).toBe("openai-codex-responses"); |
| 223 | +expect(result.model?.baseUrl).toBe("https://custom.example.com"); |
| 224 | +expect(result.model?.id).toBe("gpt-5.4"); |
| 225 | +expect(result.model?.provider).toBe("openai-codex"); |
| 226 | +expect((result.model as unknown as { headers?: Record<string, string> }).headers).toEqual({ |
| 227 | +"X-Custom-Auth": "token-123", |
228 | 228 | }); |
229 | 229 | }); |
230 | 230 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。