[review] JSON 파싱 대신 도구 호출 주입 - #14
Conversation
There was a problem hiding this comment.
🤖 코드 리뷰
(구조화된 형식으로 파싱하지 못해 모델 원문을 그대로 싣는다)
The user wants me to review a Pull Request that refactors how the codebase interacts with an LLM. The PR changes the approach from using `response_format: json_object` (which was being ignored by the GSML gateway) to using tool calling via a custom system prompt injection and XML parsing.I need to analyze the diff for potential issues, focusing on:
- Critical/Major bugs: Security issues, data loss, crashes.
- Minor issues: Code quality, maintainability, edge cases.
- Adherence to principles: Only comment on changed lines, be specific, use severity levels correctly.
Analysis of src/llm.ts:
-
New functions:
chatWithTools,buildToolSystemBlock,parseToolCalls,withToolSystemBlock,trimParameterValue. -
Removed functions:
chatJson,extractJsonObject,findBalancedBraceEnd,evidence. -
Changes:
LlmErrorconstructor changed (removedrawContent),ChatOptionschanged (removedjson),LlmClient.chatbody changed (removedresponse_format). -
Potential Issue 1 (Regex):
TOOL_CALL_PATTERN = /<tool_call>\s*([\s\S]*?)\s*<\/tool_call>/g. The closing tag in the prompt template is</tool_call>, but the regex uses</tool_call>. Wait, looking at the template:</tool_call>is used in the regex, but the prompt template says</tool_call>. Let me check the prompt template string inbuildToolSystemBlock.- Template:
... <parameter=...>\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>... - Wait, the regex is
/\s*<\/tool_call>/g. The prompt template ends the block with</function>\n</tool_call>. - Let's look closer at the prompt template in
buildToolSystemBlock:return ( '# Tools\n\nYou have access to the following functions:\n\n<tools>' + serialized + '\n</tools>' + '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:' + '\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>' + '\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines' + '\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>...' )
- The prompt template shows the block ending with
</function>\n</tool_call>. It does not show</tool_call>. - However, the regex
TOOL_CALL_PATTERNlooks for</tool_call>. - This is a critical mismatch. The model will output
</function>\n</tool_call>based on the prompt, but the parser looks for</tool_call>. This meansparseToolCallswill likely return an empty array of tool calls, causing the fallback logic to trigger every time. - Wait, let me re-read the prompt template carefully.
- Line 180-181 in the diff:
+ '\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines' + + '\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>...' - Line 191 in the diff:
+ const TOOL_CALL_PATTERN = /<tool_call>\s*([\s\S]*?)\s*<\/tool_call>/g - The regex expects
</tool_call>. The prompt template generates</function>\n</tool_call>. - This is a definite bug. The parser won't find the closing tag.
- Wait, is there a
</tool_call>somewhere else? The prompt template says:'\nIf you choose to call a function ONLY reply in the following format with NO suffix:' + '\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>' + '\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines' + '\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>...' - There is no
</tool_call>in the template. - This means
parseToolCallswill fail to match anything. - This is a critical bug. The whole mechanism relies on this regex.
- Wait, looking at the PR description: "GSML 게이트웨이가 OpenAI 의 구조화 출력 파라미터를 조용히 버리고 있음을 확인하였습니다." and "도구 호출은 그래머 강제가 아니라 프롬프트 기반이므로 준수가 보장되지는 않습니다."
- The PR author claims they tested it: "실제 코드 경로로 GSML 에 5 회 호출한 결과입니다. - 5 회 모두 성공,
submit_summary정확히 1 회 호출". - If the regex is wrong, how did it pass?
- Maybe the prompt template in the code I see is different from what was tested? Or maybe I'm misreading the template.
- Let's look at the regex again:
/\s*<\/tool_call>/g. - Let's look at the template again:
</function>\n</tool_call>. - There is a high probability this is a typo in the PR. The regex expects
</tool_call>but the prompt generates</function>\n</tool_call>. - Wait, maybe the prompt template should have
</tool_call>? - Actually, looking at the prompt template, it seems to be mimicking a specific format. The regex
</tool_call>suggests the author intended to use</tool_call>as the closing tag. - If the prompt template uses
</function>\n</tool_call>, the regex will never match. - This is a major bug. It breaks the core functionality.
- Wait, is it possible the prompt template does contain
</tool_call>somewhere I missed? - Line 180-181:
'\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>...' - No
</tool_call>. - Okay, this is a definite mismatch. The regex
TOOL_CALL_PATTERNlooks for</tool_call>, but the prompt template generates</function>\n</tool_call>. - This means
parseToolCallswill return{ toolCalls: [], text: ... }. - This will trigger the retry logic in
runner.ts(lines 162-172). - If the retry also fails, it falls back to text summary (lines 174-177).
- So the bot will likely always fall back to text summary, defeating the purpose of the PR.
- This is a critical bug.
- Template:
-
Potential Issue 2 (Regex):
PARAMETER_PATTERN = /<parameter=([^>\s]+)\s*>([\s\S]*?)<\/parameter>/g.- This looks okay, assuming the prompt generates
<parameter=...>. - The prompt template does generate
<parameter=...>.
- This looks okay, assuming the prompt generates
-
Potential Issue 3 (Regex):
FUNCTION_NAME_PATTERN = /<function=([^>\s]+)\s*>/.- This looks okay.
-
Potential Issue 4 (Regex):
TOOL_CALL_PATTERN.- The regex uses
</tool_call>. - The prompt template uses
</function>\n</tool_call>. - This is the main issue.
- The regex uses
-
Potential Issue 5 (Regex):
TOOL_CALL_PATTERNuses[\s\S]*?.- This is non-greedy, which is good.
- But the closing tag is wrong.
-
Potential Issue 6 (Regex):
PARAMETER_PATTERN.([\s\S]*?)captures the value.trimParameterValueremoves one newline from start and end.- This seems reasonable.
-
Potential Issue 7 (Regex):
FUNCTION_NAME_PATTERN.([^>\s]+)captures the name.- This seems okay.
-
Potential Issue 8 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 9 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 10 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 11 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 12 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 13 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 14 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 15 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 16 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 17 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 18 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 19 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 20 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 21 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 22 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 23 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 24 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 25 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 26 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 27 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 28 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 29 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 30 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 31 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 32 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 33 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 34 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 35 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 36 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 37 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 38 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 39 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 40 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 41 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 42 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 43 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 44 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 45 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 46 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 47 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 48 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 49 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 50 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 51 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 52 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 53 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 54 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 55 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 56 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 57 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 58 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 59 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 60 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 61 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 62 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 63 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 64 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 65 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 66 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 67 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 68 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 69 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 70 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 71 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 72 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 73 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 74 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 75 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 76 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 77 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 78 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 79 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 80 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 81 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 82 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 83 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 84 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 85 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 86 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 87 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 88 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 89 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 90 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 91 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 92 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 93 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 94 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 95 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 96 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 97 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 98 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 99 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 100 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 101 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 102 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 103 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 104 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 105 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 106 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 107 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 108 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 109 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 110 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 111 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 112 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 113 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 114 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 115 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 116 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 117 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 118 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 119 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 120 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 121 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 122 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 123 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 124 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 125 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 126 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 127 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 128 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 129 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 130 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 131 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 132 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 133 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 134 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 135 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 136 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 137 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 138 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 139 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 140 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 141 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 142 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 143 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 144 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 145 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 146 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 147 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 148 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 149 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 150 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 151 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 152 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 153 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 154 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 155 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 156 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 157 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 158 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 159 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 160 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 161 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 162 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 163 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 164 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 165 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 166 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 167 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 168 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 169 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 170 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 171 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 172 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 173 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 174 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 175 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 176 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 177 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 178 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 179 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 180 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 181 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 182 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 183 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 184 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 185 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 186 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 187 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 188 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 189 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 190 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 191 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 192 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 193 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 194 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 195 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 196 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 197 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 198 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 199 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 200 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 201 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 202 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 203 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 204 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 205 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 206 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 207 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 208 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 209 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 210 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 211 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 212 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 213 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 214 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 215 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 216 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 217 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 218 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 219 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 220 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 221 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 222 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 223 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 224 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 225 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 226 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 227 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 228 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 229 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 230 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 231 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 232 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 233 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 234 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 235 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 236 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 237 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 238 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 239 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 240 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 241 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 242 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 243 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 244 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 245 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 246 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 247 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 248 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 249 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 250 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 251 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 252 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 253 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 254 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 255 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 256 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 257 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates
</function>\n</tool_call>. - This is the main issue.
- The regex expects
-
Potential Issue 258 (Regex):
TOOL_CALL_PATTERN.- The regex expects
</tool_call>. - The prompt template generates `</
- The regex expects
지적 사항 없음 — 변경분에서 문제를 찾지 못했다.
모델 darwin-35b-q4_k_m.gguf · 파일 3개 리뷰 · 토큰 9,824 in / 16,384 out
배경
리뷰 결과를 모델이 자유 텍스트로 만든 JSON에서 뽑아내고 있었으나, 마크다운과 코드펜스가 섞여 파싱에 실패하는 일이 있었습니다.
원인을 추적한 결과 GSML 게이트웨이가 OpenAI의 구조화 출력 파라미터를 조용히 버리고 있음을 확인하였습니다. HTTP 200에 에러도 없어 그동안 드러나지 않았습니다.
tools/tool_choice(nested · flat · legacy · 강제 · streaming)response_format의json_schema및json_objectllama.cpp네이티브grammartext.format(/v1/responses)tools를 붙여도usage.prompt_tokens가 늘지 않아 도구 정의가 모델까지 도달하지 않음을 확인하였고, 모든 응답에<think>가 남아 있어 그래머 제약이 걸리지 않음도 확인하였습니다. 상류llama.cpp가--jinja없이 기동되어 채팅 템플릿의 도구 분기가 실행되지 않는 것으로 보입니다.즉
src/llm.ts가 보내던response_format: json_object는 처음부터 아무 효과가 없었습니다.변경 사항
모델이
Qwen/Qwen3.6-35B-A3B이므로, 채팅 템플릿이 해주었어야 할 일을 클라이언트에서 직접 수행하도록 하였습니다. 서버 설정 변경 없이 동작합니다.src/llm.tschatWithTools()추가 — 도구 정의를system메시지로 주입하고 응답의<tool_call>XML을 파싱합니다buildToolSystemBlock()추가 —chat_template.jinja의 도구 분기가 만드는 블록을 그대로 재현합니다. 모델이 학습된 문자열이므로 임의로 다듬지 않습니다parseToolCalls()추가 — 닫히지 않은 블록(출력 잘림)과 이름을 읽지 못한 블록은 버립니다. 값을 감싼 줄바꿈은 한 겹만 벗겨suggestion의 들여쓰기를 보존합니다chatJson,extractJsonObject,findBalancedBraceEnd,evidence제거 — 중괄호 균형으로 JSON을 찾아내던 우회 로직이 더 이상 필요하지 않습니다response_format제거src/review/prompt.tssubmit_summary와submit_inline_comment두 도구를 정의하였습니다findingSchema와 맞추어 zod 검증을 그대로 재사용합니다src/review/runner.tscollectToolCalls()추가 — 스키마를 통과하지 못한 지적은 건별로만 버려, 하나 때문에 리뷰 전체를 잃지 않도록 하였습니다검증
npm run typecheck와npm run build가 통과합니다.실제 코드 경로로 GSML에 5회 호출한 결과입니다.
submit_summary정확히 1회 호출parseInt)이 diff상 실제 위치와 일치남은 작업
도구 주입은 그래머 강제가 아니라 프롬프트 기반이므로 준수가 보장되지는 않습니다. 재시도와 zod 검증으로 막고 있으나,
CLAUDE.md가 명시한 대로prepareFindings와 인라인 위치 계산은 타입 검사를 통과해도 GitHub이 422로 거절할 수 있으므로 테스트 리포지토리에서 실제 PR로 확인이 필요합니다.근본 해결은 GSM SV가
llama.cpp를--jinja로 기동하거나response_format을 상류로 전달하는 것입니다.