fix(cliproxy): add kimi-k2 pricing and kimi catalog tests

Address review feedback from PR #585:
- Add missing kimi-k2 pricing entry ($0.60/$2.50, cache $0.15)
  to avoid fallback to unknown model pricing
- Add kimi provider tests to model-catalog.test.js verifying
  catalog structure, default model, and model IDs
This commit is contained in:
Tam Nhu Tran
2026-02-19 10:36:42 +07:00
parent 3767b95735
commit dd38df6b8d
2 changed files with 33 additions and 0 deletions
+6
View File
@@ -489,6 +489,12 @@ const PRICING_REGISTRY: Record<string, ModelPricing> = {
cacheCreationPerMillion: 0.0,
cacheReadPerMillion: 0.15,
},
'kimi-k2': {
inputPerMillion: 0.6,
outputPerMillion: 2.5,
cacheCreationPerMillion: 0.0,
cacheReadPerMillion: 0.15,
},
'kimi-k2-instruct': {
inputPerMillion: 1.0,
outputPerMillion: 3.0,
+27
View File
@@ -36,6 +36,33 @@ describe('Model Catalog', () => {
});
});
describe('Kimi models', () => {
it('contains Kimi provider catalog', () => {
const { MODEL_CATALOG } = modelCatalog;
assert(MODEL_CATALOG.kimi, 'Should have kimi provider');
assert.strictEqual(MODEL_CATALOG.kimi.provider, 'kimi');
assert.strictEqual(MODEL_CATALOG.kimi.displayName, 'Kimi (Moonshot)');
});
it('has correct default model', () => {
const { MODEL_CATALOG } = modelCatalog;
assert.strictEqual(MODEL_CATALOG.kimi.defaultModel, 'kimi-k2.5');
});
it('includes K2.5, K2 Thinking, K2', () => {
const { MODEL_CATALOG } = modelCatalog;
const ids = MODEL_CATALOG.kimi.models.map((m) => m.id);
assert(ids.includes('kimi-k2.5'), 'Should include kimi-k2.5');
assert(ids.includes('kimi-k2-thinking'), 'Should include kimi-k2-thinking');
assert(ids.includes('kimi-k2'), 'Should include kimi-k2');
});
it('has 3 models total', () => {
const { MODEL_CATALOG } = modelCatalog;
assert.strictEqual(MODEL_CATALOG.kimi.models.length, 3);
});
});
describe('AGY models', () => {
it('has correct default model', () => {
const { MODEL_CATALOG } = modelCatalog;