Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
coderai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
coderai
Commits
861f8741
Commit
861f8741
authored
Mar 16, 2026
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regex to handle </tool_call> closing tag
parent
36da321b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
model_parser.py
codai/model_parser.py
+3
-1
No files found.
codai/model_parser.py
View file @
861f8741
...
...
@@ -118,7 +118,9 @@ class QwenParser(BaseParser):
# Try with <tool_call> wrapper first
coder_blocks
=
re
.
findall
(
r'<tool_call>\s*(.*?)\s*</tool_call>'
,
clean_text
,
re
.
DOTALL
)
if
not
coder_blocks
:
# Try direct <tool=func_name> format
# Try direct <tool=func_name> format (with </tool> or </tool_call> closing)
coder_blocks
=
re
.
findall
(
r'(<tool=[^>]+>.*?</tool_call>)'
,
clean_text
,
re
.
DOTALL
)
if
not
coder_blocks
:
coder_blocks
=
re
.
findall
(
r'(<tool=[^>]+>.*?</tool>)'
,
clean_text
,
re
.
DOTALL
)
if
not
coder_blocks
:
# Try <function=func_name> format without wrapper
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment