Skip to content

fix: handle invalid UTF-8 in DSML pack templates - #1

Merged
Jumbomuffin777 merged 1 commit into
Jumbomuffin777:mainfrom
bettercallcaleb:fix/dsml-invalid-utf8-template
Nov 11, 2026
Merged

Jumbomuffin777 merged 1 commit into
Jumbomuffin777:mainfrom
bettercallcaleb:fix/dsml-invalid-utf8-template

Conversation

@bettercallcaleb

Copy link
Copy Markdown
Contributor

Summary

  • Fall back to the bundled DeepSeek V4.1 template when a pack template cannot be decoded as UTF-8.
  • Add a regression test with invalid UTF-8 bytes.

Validation

  • python3 -m unittest serve.test_dsml -q: 26 passed (CPU only).
  • git diff --check: passed.
  • Intel GPU, free/contrib-llvm builds: unverified (Python-only template selection change).
  • tools/lint/run.sh: incomplete because optional lint tools and upstream tags are unavailable; gitleaks flagged possible secrets, not yet triaged.

No model inference or GPU tests performed.

@Jumbomuffin777

Copy link
Copy Markdown
Owner

Thank you @bettercallcaleb — this is XeMaya's first outside contribution. Reviewed and reproduced: without the change a pack template that is not valid UTF-8 raises UnicodeDecodeError out of pick_template (it is a ValueError, not an OSError) and the server does not start for a DeepSeek-V4.1 config; with it the server falls back to the V4.1 template and says so. serve/test_dsml.py: 26 passed with the fix, the new test fails without it. Merging; it goes out in 0.1.0-alpha.2 with credit in the changelog and release notes.

@Jumbomuffin777
Jumbomuffin777 merged commit 5d1fa7a into Jumbomuffin777:main Nov 11, 2026
Jumbomuffin777 added a commit that referenced this pull request Nov 11, 2026
…late

serve: a DSML pack template that is not valid UTF-8 falls back to the DeepSeek-V4.1 template instead of stopping the server's start. By bettercallcaleb. serve/test_dsml.py: 26 passed; the new test fails without the change.
Jumbomuffin777 added a commit that referenced this pull request Nov 11, 2026
…in the changelog and release notes; the version
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.

2 participants