Skip to content

🐛 fix: localize provider moderation generation errors#14220

Merged
tjx666 merged 6 commits into
canaryfrom
lobe-8248-provider-content-moderation
Apr 27, 2026
Merged

🐛 fix: localize provider moderation generation errors#14220
tjx666 merged 6 commits into
canaryfrom
lobe-8248-provider-content-moderation

Conversation

@tjx666

@tjx666 tjx666 commented Apr 27, 2026

Copy link
Copy Markdown
Member

💻 Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • ✅ test
  • 📝 docs
  • 🔨 chore

🔗 Related Issue

Related to LOBE-8248

🔀 Description of Change

  • Add a dedicated async task error type for provider content moderation failures.
  • Localize content policy messages used by generation error UI.
  • Show a single actionable message for image and video generation moderation failures instead of raw technical details.

🧪 How to Test

  • Tested locally
  • Added/updated tests
  • No tests needed

Verified with VS Code diagnostics on modified files.

📸 Screenshots / Videos

N/A

📝 Additional Information

This keeps provider moderation details generic and does not expose downstream business logic.

@vercel

vercel Bot commented Apr 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Apr 27, 2026 7:10am

Request Review

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. feature:image AI image i18n labels Apr 27, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42f0dbe921

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/server/routers/lambda/video/index.ts Outdated
Comment thread src/server/routers/async/image.ts
@codecov

codecov Bot commented Apr 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.02521% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.07%. Comparing base (f32fff1) to head (63b0e39).
⚠️ Report is 1 commits behind head on canary.

Additional details and impacted files
@@             Coverage Diff             @@
##           canary   #14220       +/-   ##
===========================================
- Coverage   86.03%   68.07%   -17.97%     
===========================================
  Files         620     2266     +1646     
  Lines       51652   194266   +142614     
  Branches     8719    20337    +11618     
===========================================
+ Hits        44440   132238    +87798     
- Misses       7083    61899    +54816     
  Partials      129      129               
Flag Coverage Δ
app 61.56% <58.25%> (?)
database 92.03% <ø> (-0.01%) ⬇️
packages/agent-runtime 79.93% <ø> (ø)
packages/context-engine 83.25% <ø> (ø)
packages/conversation-flow 92.40% <ø> (ø)
packages/file-loaders 87.02% <ø> (ø)
packages/memory-user-memory 74.74% <ø> (ø)
packages/model-bank 99.89% <ø> (ø)
packages/model-runtime 84.29% <93.75%> (+<0.01%) ⬆️
packages/prompts 68.17% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/utils 88.41% <ø> (ø)
packages/web-crawler 88.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Store 67.20% <ø> (∅)
Services 53.36% <ø> (∅)
Server 68.42% <57.29%> (∅)
Libs 53.30% <ø> (∅)
Utils 80.04% <ø> (-13.43%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tjx666 tjx666 merged commit cca1050 into canary Apr 27, 2026
33 of 35 checks passed
@tjx666 tjx666 deleted the lobe-8248-provider-content-moderation branch April 27, 2026 07:23
mutoe pushed a commit to mutoe/lobehub that referenced this pull request May 1, 2026
sxueck pushed a commit to sxueck/lobehub that referenced this pull request May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature:image AI image i18n size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant