You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (inputs.tools.is_array() && inputs.tool_choice != "none" && !inputs.grammar.empty()) {
1062
-
throwstd::runtime_error("Cannot specify grammar with tools");
1063
-
}
1064
-
1065
1049
constauto & src = tmpl.source();
1050
+
constauto & caps = tmpl.original_caps();
1051
+
1052
+
if (inputs.tools.is_array()) {
1053
+
if (inputs.tool_choice != "none" && !inputs.grammar.empty()) {
1054
+
throwstd::runtime_error("Cannot specify grammar with tools");
1055
+
}
1056
+
if (caps.supports_tool_calls && !caps.supports_tools) {
1057
+
LOG_WRN("Template supports tool calls but does not natively describe tools. The fallback behaviour used may produce bad results, inspect prompt w/ --verbose & consider overriding the template.");
1058
+
}
1059
+
}
1066
1060
1067
1061
// DeepSeek R1: use handler in all cases except json schema (thinking / tools).
1068
1062
if (src.find("<|tool▁calls▁begin|>") != std::string::npos && inputs.json_schema.is_null()) {
0 commit comments