mirror of
https://github.com/modelstudioai/cli.git
synced 2026-09-14 19:49:23 +08:00
d74d4efcd0
Reviewed against the official text-tuning data rules; fixes two confirmed mismatches and fills enforcement gaps: - thinking: exempt assistant messages carrying tool_calls from the THINK_TAG_NOT_LAST check — the spec's tool+thinking combo example puts <think> on a non-last assistant and was previously false-flagged - DPO support matrix: reject image/video content items, tools, tool_calls and role:tool (DPO_UNSUPPORTED_ELEMENT); also scan chosen/rejected - DPO: messages not ending with user upgraded warning -> error - OpenAI migration: name/weight upgraded warning -> error (spec: must not carry); drop dead record-level name branch - tool_call_id: unmatched tool response upgraded warning -> error (one-to-one per spec); new TOOL_CALL_NO_RESPONSE warning for orphan calls - loss_weight: validate range at message level too; warn when placed on anything but the last assistant message (LOSS_WEIGHT_PLACEMENT) - video params: fps/sample_fps must be within [0.1, 10] (INVALID_VIDEO_FPS); mode-mismatched params warned (VIDEO_PARAM_MODE_MISMATCH); video_start/video_end type-checked - zip: skip macOS packaging metadata (__MACOSX/, .DS_Store, ._*) in filename constraints and image counting to stop false failures on Finder-created archives Tests 45 -> 59 covering every new/changed rule, including a replica of the spec's official tool+thinking example.