Fix: add new default moonshot model (#17106)

This commit is contained in:
Lynn
2026-07-20 19:07:26 +08:00
committed by GitHub
parent 392b249404
commit 9a2a3c0459
2 changed files with 24 additions and 1 deletions

View File

@@ -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

View File

@@ -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",