Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: add new default moonshot model (#17106)

Lynn9a2a3c04594c
diff --git a/api/apps/services/provider_api_service.py b/api/apps/services/provider_api_service.py
index f07197900b..0038777f08 100644
--- a/api/apps/services/provider_api_service.py
+++ b/api/apps/services/provider_api_service.py
@@ -717,11 +717,13 @@ async def verify_api_key(provider_id_or_name: str, api_key: str | dict, base_url
continue
mdl = ChatModel[provider_name](api_key_str, llm["llm_name"], base_url=base_url, **extra)
+ temperature = 1 if llm["llm_name"] in ("kimi-k3", "kimi-k2.7-code") else 0.9
+
async def check_streamly():
async for chunk in mdl.async_chat_streamly(
None,
[{"role": "user", "content": "Hi"}],
- {"temperature": 0.9},
+ {"temperature": temperature},
):
if chunk and isinstance(chunk, str) and chunk.find("**ERROR**") < 0:
return True
diff --git a/conf/llm_factories.json b/conf/llm_factories.json
index 77eab67a8e..5a91f32288 100644
--- a/conf/llm_factories.json
+++ b/conf/llm_factories.json
@@ -1806,6 +1806,27 @@
"rank": "995",
"url": "https://api.moonshot.cn/v1",
"llm": [
+ {
+ "llm_name": "kimi-k3",
+ "tags": "LLM,CHAT,1M",
+ "max_tokens": 1048576,
+ "model_type": "chat",
+ "is_tools": true
+ },
+ {
+ "llm_name": "kimi-k2.6",
+ "tags": "LLM,CHAT,256k",
+ "max_tokens": 262144,
+ "model_type": "chat",
+ "is_tools": true
+ },
+ {
+ "llm_name": "kimi-k2.7-code",
+ "tags": "LLM,CHAT,256k",
+ "max_tokens": 262144,
+ "model_type": "chat",
+ "is_tools": true
+ },
{
"llm_name": "kimi-thinking-preview",
"tags": "LLM,CHAT,1M",