Local text-to-image fallback violates the return_url contract
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Read astrbot/core/utils/t2i/renderer.py, starting at the remote-renderer fallback and the call to LocalRenderStrategy.render(text). Check how return_url=True is handled by the public Star.text_to_image entry point and local strategy; done means callers receive a URL or a clear error when a local URL cannot be provided.
Written by the indexing model from the issue text.
Description
The public Star.text_to_image(..., return_url=True) contract says the result is a URL. When the remote renderer fails, astrbot/core/utils/t2i/renderer.py falls back to LocalRenderStrategy.render(text) without forwarding return_url; the local strategy returns a filesystem path. Callers explicitly requesting a URL can therefore receive a local path that cannot be used as a remotely accessible image URL.
Please preserve the requested result kind through fallback, or return a clear error when a local URL cannot be provided.
- Dominant language
- Python
- Stars
- 41.4k
- Forks
- 3k
- Avg merge
- 1d
- Merged PRs (30d)
- 131
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AstrBotDevs/AstrBot
-
Text-to-image rendering suppresses asyncio task cancellationPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
AstrBotDevs/AstrBot#10389 ·
Maintainers usually reply within 1 day
-
Boxlite boot treats any HTTP response as a healthy sandboxPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
AstrBotDevs/AstrBot#10385 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AstrBotDevs/AstrBot#10378 · 1 comment ·
Maintainers usually reply within 1 day
-
[Feature] 移除「切换到旧版知识库」入口Possibly taken @silvaling claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AstrBotDevs/AstrBot#10340 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AstrBotDevs/AstrBot#10322 · 1 comment ·
Maintainers usually reply within 1 day
All issues in AstrBotDevs/AstrBot
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Qiskit/qiskit-ibm-runtime#3431 · 1 comment ·
Maintainers usually reply within 1 day
-
[Lesson] A compatibility-gate rejection is a verdict, not something to overwrite with --accept-riskOpenlesson-submission needs-ac pending-review
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Ikalus1988/MisakaNet#2870 ·
Maintainers usually reply within 1 day
-
feature:LinkChecker
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
digitalfabrik/integreat-cms#4594 ·
Maintainers usually reply within 5 days