Skip to content

BUG: Fix Jinja template error for models using {% break %} tag (e.g. ……Kimi K2.5) - #4770

Merged
qinxuye merged 1 commit into
xorbitsai:mainfrom
amumu96:fix/jinja-loopcontrols-break
Apr 7, 2026
Merged

BUG: Fix Jinja template error for models using {% break %} tag (e.g. ……Kimi K2.5)#4770
qinxuye merged 1 commit into
xorbitsai:mainfrom
amumu96:fix/jinja-loopcontrols-break

Conversation

@amumu96

@amumu96 amumu96 commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Add jinja2.ext.loopcontrols extension to ImmutableSandboxedEnvironment so that chat templates using {% break %} or {% continue %} in for loops are properly supported.

…Kimi K2.5)

Add jinja2.ext.loopcontrols extension to ImmutableSandboxedEnvironment
so that chat templates using {% break %} or {% continue %} in for loops
are properly supported.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@XprobeBot XprobeBot added the bug Something isn't working label Apr 7, 2026
@XprobeBot XprobeBot added this to the v2.x milestone Apr 7, 2026

@qinxuye qinxuye left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qinxuye
qinxuye merged commit 378186a into xorbitsai:main Apr 7, 2026
12 of 14 checks passed
@qinxuye
qinxuye deleted the fix/jinja-loopcontrols-break branch April 7, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants