Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

test(pi): normalize optional tier costs in native provider fixture

DavidShen5cbfe0dfc767
diff --git a/packages/maker-core/src/agents/pi/__tests__/pi-agent.integration.test.ts b/packages/maker-core/src/agents/pi/__tests__/pi-agent.integration.test.ts
index 30e1fc24c2..cb739ef5f6 100644
--- a/packages/maker-core/src/agents/pi/__tests__/pi-agent.integration.test.ts
+++ b/packages/maker-core/src/agents/pi/__tests__/pi-agent.integration.test.ts
@@ -1035,7 +1035,13 @@ describe.skipIf(!piAvailable)('PiAgent integration (real pi binary + fake gatewa
baseUrl: `${endpoint}/v1`, inheritModels: true,
models: [{ ...row, api, input: row.input.filter((kind): kind is 'text' | 'image' => kind === 'text' || kind === 'image'),
cost: { ...row.cost, input: row.cost?.input ?? 0, output: row.cost?.output ?? 0,
- cacheRead: row.cost?.cacheRead ?? 0, cacheWrite: row.cost?.cacheWrite ?? 0 },
+ cacheRead: row.cost?.cacheRead ?? 0, cacheWrite: row.cost?.cacheWrite ?? 0,
+ tiers: row.cost?.tiers?.map(tier => ({ ...tier,
+ input: tier.input ?? row.cost?.input ?? 0,
+ output: tier.output ?? row.cost?.output ?? 0,
+ cacheRead: tier.cacheRead ?? row.cost?.cacheRead ?? 0,
+ cacheWrite: tier.cacheWrite ?? row.cost?.cacheWrite ?? 0,
+ })) },
baseUrl: `${endpoint}/v1`, wireId: row.id }],
}], env: {},
});