Fix flaky tool calls in the Kimi K2.5 model (#17914)
Signed-off-by: Xinyuan Tong <xinyuantong.cs@gmail.com>
This commit is contained in:
@@ -27,7 +27,7 @@ import tempfile
|
||||
from typing import Any, Callable, Dict, List, Literal, Optional, Union
|
||||
|
||||
from sglang.srt.connector import ConnectorType
|
||||
from sglang.srt.environ import ToolStrictLevel, envs
|
||||
from sglang.srt.environ import envs
|
||||
from sglang.srt.function_call.function_call_parser import FunctionCallParser
|
||||
from sglang.srt.layers.attention.fla.chunk_delta_h import CHUNK_SIZE as FLA_CHUNK_SIZE
|
||||
from sglang.srt.lora.lora_registry import LoRARef
|
||||
@@ -2485,12 +2485,6 @@ class ServerArgs:
|
||||
envs.SGLANG_ENABLE_DETERMINISTIC_INFERENCE.set(
|
||||
"1" if self.enable_deterministic_inference else "0"
|
||||
)
|
||||
# Set the highest strict level for Kimi K2 tool calls
|
||||
if (
|
||||
self.tool_call_parser == "kimi_k2"
|
||||
and not envs.SGLANG_TOOL_STRICT_LEVEL.is_set()
|
||||
):
|
||||
envs.SGLANG_TOOL_STRICT_LEVEL.set(ToolStrictLevel.PARAMETER)
|
||||
|
||||
def _handle_cache_compatibility(self):
|
||||
if self.enable_hierarchical_cache and self.disable_radix_cache:
|
||||
|
||||
Reference in New Issue
Block a user