Skip to content

Move has_user_content() to a backend-neutral helpers module #1756

Closed

Description

@markstur

Context

has_user_content() was added in #1632 to guard the OpenAI, LiteLLM, and Ollama backends against empty user content (#1597), and lives in mellea/helpers/openai_compatible_helpers.py. The #1705 fix made the HuggingFace path (mellea/backends/utils.py) the first non-OpenAI-compatible caller — the trigger #1705 flagged: "Once a non-OpenAI-compatible backend calls it, a backend-neutral helpers module is a better home."

All four callers import it through the neutral mellea.helpers package, so this is a naming/organization cleanup, not a functional change.

Suggested change

Notes

Behavior-neutral refactor. has_user_content is currently absent from mellea/helpers/__init__.py's __all__ — worth adding while moving, since it now has four internal callers.

Activity

  1. self-assigned this
    on Oct 21, 2026
  2. added
    chore
    area/backends
    on Oct 21, 2026
  3. added a commit that references this issue on Oct 26, 2026
    1326efb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/backendschoretesting

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions