Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ suite('KimiPrompts', () => {
const renderedPrompts = await Promise.all([
renderSystemPrompt('kimi-k2.6'),
renderSystemPrompt('kimi-k2.7-code'),
renderSystemPrompt('kimi-k3'),
]);

for (const renderedPrompt of renderedPrompts) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export function isGpt53Codex(model: LanguageModelChat | IChatEndpoint | string)
export function isKimiFamily(model: LanguageModelChat | IChatEndpoint | string): boolean {
const matches = (value: string): boolean => {
const normalized = value.toLowerCase();
return normalized.includes('kimi-k2.6') || normalized.includes('kimi-k2.7-code');
return normalized.includes('kimi-k2.6') || normalized.includes('kimi-k2.7-code') || normalized.includes('kimi-k3');
};

if (typeof model === 'string') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,14 +529,14 @@ describe('ChatEndpoint - Kimi CAPI customization', () => {
postOptions: { temperature: 0, top_p: 1 }
});

it.each(['kimi-k2.6', 'kimi-k2.7-code'])('should force temperature=1 and top_p=0.95 for %s', (family) => {
it.each(['kimi-k2.6', 'kimi-k2.7-code', 'kimi-k3'])('should force temperature=1 and top_p=0.95 for %s', (family) => {
const endpoint = createEndpoint(createNonAnthropicModelMetadata(family));
const body = endpoint.createRequestBody(createOptionsWithPostOptions());
expect(body.temperature).toBe(1);
expect(body.top_p).toBe(0.95);
});

it.each(['kimi-k2.6', 'kimi-k2.7-code'])('should normalize tool call IDs for %s', family => {
it.each(['kimi-k2.6', 'kimi-k2.7-code', 'kimi-k3'])('should normalize tool call IDs for %s', family => {
const history = createToolHistory();
const endpoint = createEndpoint(createNonAnthropicModelMetadata(family));
const body = endpoint.createRequestBody(createTestOptions(history));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ describe('Kimi edit tool capabilities', () => {
const models = {
'kimi-k2.6': fakeModel('kimi-k2.6'),
'kimi-k2.7-code': fakeModel('kimi-k2.7-code'),
'kimi-k3': fakeModel('kimi-k3'),
'moonshot/kimi-k2.7-code': fakeModel('moonshot/kimi-k2.7-code'),
'moonshot/kimi-k2.6': fakeModel('moonshot/kimi-k2.6'),
'unknown-family + kimi model id': fakeModel('unknown-family', 'kimi-k2.7-code-preview'),
Expand Down Expand Up @@ -76,6 +77,14 @@ describe('Kimi edit tool capabilities', () => {
supportsApplyPatch: false,
canUseApplyPatchExclusively: false,
},
'kimi-k3': {
isKimiFamily: true,
supportsReplaceString: true,
supportsMultiReplaceString: true,
canUseReplaceStringExclusively: true,
supportsApplyPatch: false,
canUseApplyPatchExclusively: false,
},
'moonshot/kimi-k2.7-code': {
isKimiFamily: true,
supportsReplaceString: true,
Expand Down
Loading