Skip to content

Commit 2092ce8

Browse files
sfbemerkBenjamin Merkelchaunceyjiang
authored
Tool Call Parser logs should not contain user input / model output except on DEBUG (#29160)
Signed-off-by: Benjamin Merkel <[email protected]> Co-authored-by: Benjamin Merkel <[email protected]> Co-authored-by: Chauncey <[email protected]>
1 parent fc9f821 commit 2092ce8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

vllm/entrypoints/openai/tool_parsers/glm4_moe_tool_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _is_string_type(
7878
.get("type", None)
7979
)
8080
return arg_type == "string"
81-
logger.warning("No tool named '%s'.", tool_name)
81+
logger.debug("No tool named '%s'.", tool_name)
8282
return False
8383

8484
def _deserialize(value: str) -> Any:

vllm/entrypoints/openai/tool_parsers/qwen3coder_tool_parser.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def _get_arguments_config(
128128
return params
129129
else:
130130
return {}
131-
logger.warning("Tool '%s' is not defined in the tools list.", func_name)
131+
logger.debug("Tool '%s' is not defined in the tools list.", func_name)
132132
return {}
133133

134134
def _convert_param_value(
@@ -141,7 +141,7 @@ def _convert_param_value(
141141

142142
if param_name not in param_config:
143143
if param_config != {}:
144-
logger.warning(
144+
logger.debug(
145145
"Parsed parameter '%s' is not defined in the tool "
146146
"parameters for tool '%s', directly returning the "
147147
"string value.",
@@ -169,7 +169,7 @@ def _convert_param_value(
169169
try:
170170
return int(param_value)
171171
except (ValueError, TypeError):
172-
logger.warning(
172+
logger.debug(
173173
"Parsed value '%s' of parameter '%s' is not an "
174174
"integer in tool '%s', degenerating to string.",
175175
param_value,
@@ -186,7 +186,7 @@ def _convert_param_value(
186186
else int(float_param_value)
187187
)
188188
except (ValueError, TypeError):
189-
logger.warning(
189+
logger.debug(
190190
"Parsed value '%s' of parameter '%s' is not a float "
191191
"in tool '%s', degenerating to string.",
192192
param_value,
@@ -197,7 +197,7 @@ def _convert_param_value(
197197
elif param_type in ["boolean", "bool", "binary"]:
198198
param_value = param_value.lower()
199199
if param_value not in ["true", "false"]:
200-
logger.warning(
200+
logger.debug(
201201
"Parsed value '%s' of parameter '%s' is not a boolean "
202202
"(`true` or `false`) in tool '%s', degenerating to "
203203
"false.",
@@ -216,7 +216,7 @@ def _convert_param_value(
216216
param_value = json.loads(param_value)
217217
return param_value
218218
except (json.JSONDecodeError, TypeError, ValueError):
219-
logger.warning(
219+
logger.debug(
220220
"Parsed value '%s' of parameter '%s' cannot be "
221221
"parsed with json.loads in tool '%s', will try "
222222
"other methods to parse it.",
@@ -227,7 +227,7 @@ def _convert_param_value(
227227
try:
228228
param_value = ast.literal_eval(param_value) # safer
229229
except (ValueError, SyntaxError, TypeError):
230-
logger.warning(
230+
logger.debug(
231231
"Parsed value '%s' of parameter '%s' cannot be "
232232
"converted via Python `ast.literal_eval()` in tool "
233233
"'%s', degenerating to string.",

0 commit comments

Comments
 (0)