Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

K2 Vendor Verifier

We've updated the evaluation approach for kimi-vendor-verifier. Click here for more details.

What's K2VV

Since the release of the Kimi K2 model, we have received numerous feedback on the precision of Kimi K2 in toolcall. Given that K2 focuses on the agentic loop, the reliability of toolcall is of utmost importance.

We have observed significant differences in the toolcall performance of various open-source solutions and vendors. When selecting a provider, users often prioritize lower latency and cost, but may inadvertently overlook more subtle yet critical differences in model accuracy.

These inconsistencies not only affect user experience but also impact K2's performance in various benchmarking results. To mitigate these problems, we launch K2 Vendor Verifier to monitor and enhance the quality of all K2 APIs.

We hope K2VV can help ensuring that everyone can access a consistent and high-performing Kimi K2 model.

K2-thinking Evaluation Results

Test Time: 2025-11-15

  • temperature=1.0
  • max_tokens=64000
Model NameProviderApi SourceToolCall-Trigger SimilarityToolCall-Schema Accuracy
count_finish_reason_tool_callscount_successful_tool_callschema_accuracy
kimi-k2-thinkingMoonshotAIhttps://platform.moonshot.ai-19581958100.00%
Moonshot AI Turbohttps://platform.moonshot.ai>=73%19841984100.00%
Fireworkshttps://fireworks.ai17031703100.00%
InfiniAIhttps://cloud.infini-ai.com1827182599.89%
SiliconFlowhttps://siliconflow.cn2119209798.96%
GMICloudhttps://openrouter.ai1850177595.95%
AtlasCloudhttps://openrouter.ai1878179895.74%
SGLanghttps://github.com/sgl-project/sglang1874179095.52%
vLLMhttps://github.com/vllm-project/vllm2128185687.22%
Parasailhttps://openrouter.ai2108183787.14%
DeepInfrahttps://openrouter.ai2071180086.91%
GoogleVertexhttps://openrouter.ai1945166885.76%
Togetherhttps://openrouter.ai1893160284.63%
NovitaAIhttps://openrouter.ai72.22%1778171596.46%
Chuteshttps://openrouter.ai68.10%3657303783.05%
We ran the official API multiple times to test the fluctuation of tool_call_f1. The lowest score was 75.81%, and the average was 76%. Given the inherent randomness of the model, we believe that an tool_call_f1 score above 73% is acceptable and can be used as a reference.

K2 0905 Evaluation Results

Test Time: 2025-11-15

  • temperature=0.6
Model NameProviderApi SourceToolCall-Trigger SimilarityToolCall-Schema Accuracy
count_finish_reason_tool_callscount_successful_tool_callschema_accuracy
kimi-k2-0905-previewMoonshotAIhttps://platform.moonshot.ai-12741274100.00%
Moonshot AI Turbohttps://platform.moonshot.ai>=80%13981398100.00%
DeepInfrahttps://openrouter.ai13651365100.00%
Fireworkshttps://openrouter.ai14531453100.00%
Infinigencehttps://cloud.infini-ai.com12571257100.00%
NovitaAIhttps://openrouter.ai12991299100.00%
SiliconFlowhttps://siliconflow.cn1305130299.77%
Chuteshttps://openrouter.ai1271122996.70%
vLLMhttps://github.com/vllm-project/vllm1325100776.00%
SGLanghttps://github.com/sgl-project/sglang126992873.13%
Volchttps://www.volcengine.com133096972.86%
Basetenhttps://openrouter.ai124390172.49%
AtlasCloudhttps://openrouter.ai127792572.44%
Togetherhttps://openrouter.ai126691171.96%
Groqhttps://groq.com69.52%10421042100.00%
Nebiushttps://nebius.ai50.60%64454484.47%
We ran the official API multiple times to test the fluctuation of tool_call_f1. The lowest score was 82.71%, and the average was 84%. Given the inherent randomness of the model, we believe that an tool_call_f1 score above 80% is acceptable and can be used as a reference.

Evaluation Metrics

ToolCall-Trigger Similarity

We use tool_call_f1 to determine whether the model deployment is correct.

Label / MetricFormulaMeaning
TP (True Positive)Both model & official have finish_reason == "tool_calls".
FP (False Positive)Model finish_reason == "tool_calls" while official is "stop" or "others".
FN (False Negative)Model finish_reason == "stop" or "others" while official is "tool_calls".
TN (True Negative)Both model & official have finish_reason == "stop" or "others".
tool_call_precisionTP / (TP + FP)Proportion of triggered tool calls that should have been triggered.
tool_call_recallTP / (TP + FN)Proportion of tool calls that should have been triggered and were.
tool_call_f12*tool_call_precision*tool_call_recall / (tool_call_precision+tool_call_recall)Harmonic mean of precision and recall (primary metric for deployment check).

ToolCall-Schema Accuracy

We use schema_accuracy to measure the robustness of the engineering.

Label / MetricFormula / ConditionDescription
count_finish_reason_tool_callsNumber of responses with finish_reason == "tool_calls".
count_successful_tool_callNumber of tool_calls responses that passed schema validation.
schema_accuracycount_successful_tool_call / count_finish_reason_tool_callsProportion of triggered tool calls whose JSON payload satisfies the schema.

How we do the test

We test toolcall's response over a set of 4,000 requests. Each provider's responses are collected and compared against the official Moonshot AI API.

K2 vendors are periodically evaluated. If you are not on the list and would like to be included, feel free to contact us.

Sample Data: Detailed samples and MoonshotAI results are available in tool-calls-dataset (50% of the test set).

Suggestions to Vendors

  1. Use the Correct Versions
    Some vendors may not meet the requirements due to using incorrect versions. We recommend using the following versions and newer versions:
  1. Rename Tool Call IDs
    The Kimi-K2 model expects all tool call IDs in historical messages to follow the format functions.func_name:idx. However, previous test cases may contain malformed tool IDs like serach:0*, which could mislead Kimi-K2 into generating incorrect tool call IDs, resulting in parsing failures.
    In this version, we manually add the functions. prefix to all previous tool calls to make Kimi-K2 happy :). We recommend that users and vendors adopt this fix in practice as well.
    This type of tool ID was generated by our official API. Before invoking the K2 model, our official API automatically renames all tool call IDs to the format functions.func_name:idx, so this is not an issue for us.

  2. Add Guided Encoding
    Large language models generate text token-by-token according to probability; they have no built-in mechanism to enforce a hard JSON schema. Even with careful prompting, the model may omit fields, add extra ones, or nest them incorrectly. So please add guided encoding to ensure the correct schema.

Verify by yourself

To run the evaluation tool with sample data, use the following command:

python tool_calls_eval.py samples.jsonl \
    --model kimi-k2-0905-preview \
    --base-url https://api.moonshot.cn/v1 \
    --api-key YOUR_API_KEY \
    --concurrency 5 \
    --output results.jsonl \
    --summary summary.json
  • samples.jsonl: Path to the test set file in JSONL format
  • --model: Model name (e.g., kimi-k2-0905-preview)
  • --base-url: API endpoint URL
  • --api-key: API key for authentication (or set OPENAI_API_KEY environment variable)
  • --concurrency: Maximum number of concurrent requests (default: 5)
  • --output: Path to save detailed results (default: results.jsonl)
  • --summary: Path to save aggregated summary (default: summary.json)
  • --timeout: Per-request timeout in seconds (default: 600)
  • --retries: Number of retries on failure (default: 3)
  • --extra-body: Extra JSON body as string to merge into each request payload (e.g., '{"temperature":0.6}')
  • --incremental: Incremental mode to only rerun failed requests

For testing other providers via OpenRouter:

python tool_calls_eval.py samples.jsonl \
    --model moonshotai/kimi-k2-0905 \
    --base-url https://openrouter.ai/api/v1 \
    --api-key YOUR_OPENROUTER_API_KEY \
    --concurrency 5 \
    --extra-body '{"provider": {"only": ["YOUR_DESIGNATED_PROVIDER"]}}'

Note for Kimi K2.5 Model Testing

For third-party APIs deployed with vLLM/SGLang/KTransformers, please note that:

  • To use Instant mode (disable thinking), you need to pass {"chat_template_kwargs": {"thinking": false}} in extra_body:
python tool_calls_eval.py samples.jsonl \
    --model kimi-k2.5 \
    --base-url YOUR_API_BASE_URL \
    --api-key YOUR_API_KEY \
    --concurrency 5 \
    --extra-body '{"chat_template_kwargs": {"thinking": false}, "temperature": 0.6}'

Contact Us

We're preparing the next benchmark round and need your input.

If there's any metric or test case you care about, please drop a note in issue

And welcome to drop the name of any vendor you’d like to see in in issue


If you have any questions or concerns, please reach out to us at contact-kvv@kimi.com.

关于 About

Verify Precision of all Kimi K2 API Vendor

语言 Languages

Python100.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
13
Total Commits
峰值: 2次/周
Less
More

核心贡献者 Contributors