fix(dingtalk): route native voice media to STT - #38276
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the focused DingTalk regression coverage. The underlying bug is still present on current main: plugins/platforms/dingtalk/adapter.py:797-804 assigns MessageType.VOICE, but :817-822 resets non-image richText messages to TEXT; its extraction and resolution paths also do not inspect extensions content (:774-813, :1316-1324).
Problems
- The diff targets
gateway/platforms/dingtalk.py, which was moved toplugins/platforms/dingtalk/adapter.pyby560010547; GitHub consequently reports this PR as conflicting.
Suggested changes
- Salvage the media-item iteration, raw-extension preservation, and richText classification fix into
plugins/platforms/dingtalk/adapter.py, then port the tests to its current import path.
Automated hermes-sweeper review.
| @@ -1468,6 +1490,11 @@ async def process(self, message: "CallbackMessage"): | |||
| if raw_flag: | |||
There was a problem hiding this comment.
This preservation logic needs to be ported to plugins/platforms/dingtalk/adapter.py: commit 560010547 moved the active adapter there, and this old path no longer exists on current main.
|
Closing as stale target: this PR patches DingTalk native voice→STT routing is being salvaged via #50014 against the live Thanks @sweetcornna — if anything in your change isn't covered by the salvage noted above, please resubmit against the current plugin adapter. |
…ication The msg_type_str == "richText" branch reset msg_type to PHOTO/TEXT after the rich-text item scan had already promoted it (e.g. a native voice item → VOICE), dropping voice notes from the auto-STT path. Only re-derive when the scan left the type at TEXT. Ports the root-cause analysis from PR #38276 (stale, targeted the deleted gateway/platforms/dingtalk.py) onto the live plugin adapter, with regression tests. Refs #38211 #38219 #38276
…ication The msg_type_str == "richText" branch reset msg_type to PHOTO/TEXT after the rich-text item scan had already promoted it (e.g. a native voice item → VOICE), dropping voice notes from the auto-STT path. Only re-derive when the scan left the type at TEXT. Ports the root-cause analysis from PR #38276 (stale, targeted the deleted gateway/platforms/dingtalk.py) onto the live plugin adapter, with regression tests. Refs #38211 #38219 #38276
…ication The msg_type_str == "richText" branch reset msg_type to PHOTO/TEXT after the rich-text item scan had already promoted it (e.g. a native voice item → VOICE), dropping voice notes from the auto-STT path. Only re-derive when the scan left the type at TEXT. Ports the root-cause analysis from PR #38276 (stale, targeted the deleted gateway/platforms/dingtalk.py) onto the live plugin adapter, with regression tests. Refs #38211 #38219 #38276
…ication The msg_type_str == "richText" branch reset msg_type to PHOTO/TEXT after the rich-text item scan had already promoted it (e.g. a native voice item → VOICE), dropping voice notes from the auto-STT path. Only re-derive when the scan left the type at TEXT. Ports the root-cause analysis from PR NousResearch#38276 (stale, targeted the deleted gateway/platforms/dingtalk.py) onto the live plugin adapter, with regression tests. Refs NousResearch#38211 NousResearch#38219 NousResearch#38276
Summary
message.extensions["content"]in addition to richText itemsMessageType.VOICEfor DingTalk voice notes so the gateway STT path runsRoot cause
DingTalk stream callbacks can keep native voice/audio/video/file payloads inside
extensions["content"], and SDK-shaped richText voice items could be classified as VOICE before the richText fallback reset non-image content back to TEXT. That skipped the existing voice/STT pipeline.Closes #38219.
Verification