mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 02:11:28 +00:00
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:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user