mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[GH-ISSUE #299] DeepSeek-V4.1 prompt format loses tool associations and later system instructions #110
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#110
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Gazelle221B on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/299
Maya v1.1.17 (
8d9a9b5d705049a87da853717cdc59440252de30, currentmainwhen checked) does not fully match DeepSeek-V4.1-Flash-1017's reference prompt format. This is an offline rendering/parsing result, independent of model weights or generation quality.Reference: DeepSeek's encoder and five paired fixtures, pinned at
1bae0e1088993b9b82de08f59de5be5a34e42170(MIT).To reproduce the failure offline, use an unmodified checkout at the Maya commit above. Copy the pinned upstream
encoding/tests/test_input_{1..5}.jsonandtest_output_{1..5}.txtintofixtures/(the accompanying branch also includes those unchanged files underserve/fixtures/deepseek_v41). Install Maya's Python test dependencies, then run from that baseline checkout:Expected output: test 3 has 2481/608 bytes and first differs at byte 100; test 4 has 574/506 bytes and first differs at byte 145. On the accompanying fix branch, run the full offline regression suite instead:
The regression tests send the original message metadata through Maya's API adapter and renderer, request the fixture's thinking mode (the reference defaults unspecified modes to chat), and compare UTF-8 bytes against the supplied TXT outputs. Neither reproduction needs a server, network or GPU once the fixture files and dependencies are present. The pre-fix audit gave:
Fixture 3 first differs at character 56 / UTF-8 byte 100, after
该助手为DeepSeek,由深度求索公司创造。:The reminder, later system role and that message's tool declarations disappear. Fixture 4 first differs at character 79 / UTF-8 byte 145, after
今天是2025年10月17日,星期五。:Fixture 4 also loses the later
<|action|>marker. Reminder, task and message-local tools are reference extensions; ordinary OpenAI requests need not contain them.Separate ordinary API probes show why this matters to agents:
medium/xhighcompatibility aliases work.string="true"arguments such as123become JSON numbers without a schema; schema heuristics can also overridestring="false".All 48 comparisons of the official fixtures' completed assistant messages passed the existing parser. The parser failures above require targeted examples beyond those fixtures. These findings do not establish a measured generation-quality regression.
Expected: preserve DeepSeek's documented roles, metadata, tool associations, argument types and text while retaining Maya's compatibility aliases and keeping other model families unchanged.
@mw00 commented on GitHub (Oct 20, 2026):
Fixed in v1.1.19 by #300: DeepSeek prompts are now rendered with DeepSeek's reference encoder, so later system messages, message-local tools and parallel tool results with their call ids are kept. Thanks, @Gazelle221B!