test: tighten openrouter capability assertions · openclaw/openclaw@4d6091c
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 |
|---|
@@ -76,18 +76,17 @@ describe("openrouter-model-capabilities", () => {
|
76 | 76 | const module = await importOpenRouterModelCapabilities("top-level-max-tokens"); |
77 | 77 | await module.loadOpenRouterModelCapabilities("acme/top-level-max-completion"); |
78 | 78 | |
79 | | -expect(module.getOpenRouterModelCapabilities("acme/top-level-max-completion")).toMatchObject({ |
80 | | -input: ["text", "image"], |
81 | | -reasoning: true, |
82 | | -contextWindow: 65432, |
83 | | -maxTokens: 12345, |
84 | | -}); |
85 | | -expect(module.getOpenRouterModelCapabilities("acme/top-level-max-output")).toMatchObject({ |
86 | | -input: ["text", "image"], |
87 | | -reasoning: false, |
88 | | -contextWindow: 54321, |
89 | | -maxTokens: 23456, |
90 | | -}); |
| 79 | +const maxCompletion = module.getOpenRouterModelCapabilities("acme/top-level-max-completion"); |
| 80 | +expect(maxCompletion?.input).toEqual(["text", "image"]); |
| 81 | +expect(maxCompletion?.reasoning).toBe(true); |
| 82 | +expect(maxCompletion?.contextWindow).toBe(65432); |
| 83 | +expect(maxCompletion?.maxTokens).toBe(12345); |
| 84 | + |
| 85 | +const maxOutput = module.getOpenRouterModelCapabilities("acme/top-level-max-output"); |
| 86 | +expect(maxOutput?.input).toEqual(["text", "image"]); |
| 87 | +expect(maxOutput?.reasoning).toBe(false); |
| 88 | +expect(maxOutput?.contextWindow).toBe(54321); |
| 89 | +expect(maxOutput?.maxTokens).toBe(23456); |
91 | 90 | }); |
92 | 91 | }); |
93 | 92 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。