fix(opencode-go): add qwen plus tiered pricing (#91351)

* fix(opencode-go): add qwen plus tiered pricing

* fix(usage): tier pricing by total prompt tokens

* fix(pricing): select qwen tiers by prompt tokens

* fix(pricing): preserve tier basis across catalogs

* fix(opencode-go): keep qwen pricing representable

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
This commit is contained in:
Yzx
2026-06-11 07:36:14 +08:00
committed by GitHub
parent 003b3ca6b2
commit ecf29d74ec

View File

@@ -182,6 +182,12 @@ describe("opencode-go provider plugin", () => {
expect(qwen37Plus.reasoning).toBe(true);
expect(qwen37Plus.contextWindow).toBe(1_000_000);
expect(qwen37Plus.maxTokens).toBe(65_536);
expect(qwen37Plus.cost).toMatchObject({
input: 0.4,
output: 1.6,
cacheRead: 0.04,
cacheWrite: 0.5,
});
const dynamicModel = requireRecord(
provider.resolveDynamicModel?.({