Skip to content

Improve /imagine Hugging Face errors (429, JSON errors, retries) #9

@rosspeili

Description

@rosspeili

Problem

generate_image_from_prompt handles missing token and 503 with a friendly line; other statuses use response.text in the error string (OPSIIE_0_3_80_XP.py ~1541–1545), which can leak long JSON bodies to the terminal and TTS.

Goal

  • Map common codes (429, 401, 503) to short operator messages; truncate or omit raw body in user-visible paths.
  • Optional: one retry with backoff on 503 / model loading.

Acceptance criteria

  • No full HF error payload printed/s spoken by default.
  • docs/TROUBLESHOOTING.md updated with retry guidance if implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions