Skip to content
Merged
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
11 changes: 11 additions & 0 deletions src/main/presenter/configPresenter/modelDefaultSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,17 @@ export const defaultModelsSettings: DefaultModelSetting[] = [
functionCall: true,
reasoning: false
},
{
id: 'kimi-k2-0711-preview',
name: 'Kimi K2 Preview',
temperature: 0.7,
maxTokens: 12800,
contextLength: 131072,
match: ['kimi-k2-0711-preview', 'kimi-k2-preview', 'kimi-k2', 'kimi/k2'],
vision: false,
functionCall: true,
reasoning: false
},
Comment on lines +1593 to +1603
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Kimi K2 default config LGTM – please double-check duplicate ids and consider extra aliases

The new entry is syntactically correct and follows the surrounding schema.
Two minor follow-ups:

  1. The codebase already contains a duplicated id: 'o1-mini' further up. While unrelated to this PR, a quick automated check helps ensure no additional collisions slip in.
  2. If the provider ever exposes a “latest” suffix (e.g. kimi-k2-latest), you might want to add it to the match array now to avoid a future patch.

The script lists any IDs that appear more than once; the expected output should be empty.


🏁 Script executed:

#!/bin/bash
# Detect duplicate model IDs in the defaultModelsSettings array.
rg --no-line-number '\bid:' src/main/presenter/configPresenter/modelDefaultSettings.ts \
  | sed -E 's/.*id:\s*'\''([^'\'']+)'\''.*/\1/' \
  | sort | uniq -d

Length of output: 159


Kimi K2 default config LGTM – new ID is unique; existing duplicate detected

Verified via the provided script: the only duplicate ID in modelDefaultSettings.ts is o1-mini (preexisting), and your new kimi-k2-0711-preview entry does not collide.

Next steps:

  • (Optional) Address the existing o1-mini duplicate in src/main/presenter/configPresenter/modelDefaultSettings.ts.
  • Consider adding 'kimi-k2-latest' to the match array now to future-proof against a “latest” suffix from the provider.
🤖 Prompt for AI Agents
In src/main/presenter/configPresenter/modelDefaultSettings.ts around lines 1593
to 1603, your new model config ID 'kimi-k2-0711-preview' is unique and correct.
To improve, optionally locate and resolve the existing duplicate 'o1-mini' IDs
elsewhere in the file to prevent conflicts. Also, update the 'match' array of
your new entry by adding 'kimi-k2-latest' to handle potential future suffixes
from the provider.


// Azure OpenAI配置
{
Expand Down