Skip to content

fix(web): pass end_user.external_user_id string to transcript_asr#35898

Merged
crazywoola merged 1 commit into
langgenius:mainfrom
ki3nd:fix/web-audio-to-text-end-user-type
May 8, 2026
Merged

fix(web): pass end_user.external_user_id string to transcript_asr#35898
crazywoola merged 1 commit into
langgenius:mainfrom
ki3nd:fix/web-audio-to-text-end-user-type

Conversation

@ki3nd
Copy link
Copy Markdown
Contributor

@ki3nd ki3nd commented May 7, 2026

AudioApi.post() was passing the raw EndUser object to AudioService.transcript_asr() which expects str | None. The object gets serialized as a dict when forwarded to the plugin daemon, causing Tongyi and other providers to fail with a type error.

Also adds EndUser type annotations to AudioApi and TextApi post methods.

Fixes #35877

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

AudioApi.post() was passing the raw EndUser object to AudioService.transcript_asr()
which expects str | None. The object gets serialized as a dict when forwarded to the
plugin daemon, causing Tongyi and other providers to fail with a type error.

Also adds EndUser type annotations to AudioApi and TextApi post methods.

Fixes langgenius#35877
@ki3nd ki3nd requested a review from QuantumGhost as a code owner May 7, 2026 15:18
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 0.00% 40.13% +40.13%
Strict coverage 0.00% 39.65% +39.65%
Typed symbols 0 20,088 +20,088
Untyped symbols 0 30,335 +30,335
Modules 0 2536 +2,536

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 8, 2026
@crazywoola crazywoola added this pull request to the merge queue May 8, 2026
Merged via the queue into langgenius:main with commit 5cc62fd May 8, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Voice input abnormal(audio-to-text)

2 participants