Skip to content

fix: strip standalone <text> tag lines anywhere in model output - #54

Merged
JaplinChen merged 1 commit into
masterfrom
fix/strip-text-tag-lines
Aug 18, 2026
Merged

JaplinChen merged 1 commit into
masterfrom
fix/strip-text-tag-lines

Conversation

@JaplinChen

Copy link
Copy Markdown
Owner

Summary

  • v1.0.19's strip only handled output fully wrapped in <text>...</text>; some model outputs still leak the tags mid-output (after the {source} template line).
  • Replace with a line-based strip: remove any standalone <text> / </text> tag line anywhere in the raw output. Applied in both translate_service.dart and translation_providers.py.

Verification

  • flutter analyze: No issues found
  • flutter test: +102 All tests passed
  • Python assert self-check on _strip_echoed_wrapper: PY OK

🤖 Generated with Claude Code

@JaplinChen
JaplinChen merged commit 8b91d70 into master Aug 18, 2026
2 checks passed
@JaplinChen
JaplinChen deleted the fix/strip-text-tag-lines branch August 18, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant