test(pricing): verify MODEL_COSTS entries and promotional notes
Add tests/test-pricing.ts to assert that known models have non-zero pricing, promotional deals are documented in comments, and Claude models include cache pricing. Fix test-pi-local to match against combined stdout+stderr since pi may output model listing to either stream.
This commit is contained in:
@@ -294,9 +294,10 @@ try {
|
||||
modelListRequestCount = 0
|
||||
const list = await runPi(["--no-extensions", "-e", EXT_PATH, "--list-models"], 20_000)
|
||||
assert.equal(list.code, 0, list.stderr)
|
||||
assert.match(list.stdout, /commandcode/)
|
||||
assert.match(list.stdout, /deepseek\/deepseek-v4-flash/)
|
||||
assert.match(list.stdout, /Qwen\/Qwen3\.7-Max/)
|
||||
const listOutput = `${list.stdout}\n${list.stderr}`
|
||||
assert.match(listOutput, /commandcode/)
|
||||
assert.match(listOutput, /deepseek\/deepseek-v4-flash/)
|
||||
assert.match(listOutput, /Qwen\/Qwen3\.7-Max/)
|
||||
assert.equal(modelListRequestCount, 1)
|
||||
|
||||
console.log("[pi-local] print mode through real extension and mock API")
|
||||
|
||||
Reference in New Issue
Block a user