Skip to content

Bug: missing requests-toolbelt and httpx dependencies cause ImportError #265

@golldyck

Description

@golldyck

Problem

pyproject.toml is missing two runtime dependencies that are directly imported in the code:

  1. requests-toolbelt — imported in src/opengradient/client/model_hub.py line 9 (from requests_toolbelt import MultipartEncoder), but not listed in [project.dependencies]
  2. httpx — imported in src/opengradient/client/llm.py line 8 and src/opengradient/client/twins.py line 5, but not listed as a direct dependency (only available transitively through og-x402)

Steps to Reproduce

pip install opengradient
python -c "from opengradient.client.model_hub import ModelHub; print('ok')"
# ImportError: No module named 'requests_toolbelt'

Additional Issues

  • pyproject.toml Ruff target-version = "py310" does not match requires-python = ">=3.11"
  • README CI badge URLs reference OpenGradient/sdk which does not exist (should be OpenGradient/OpenGradient-SDK)
  • src/opengradient/cli.py has unreachable code after raise NotImplementedError in generate_image

Impact

Any user who installs the SDK via pip and uses ModelHub.upload() gets an ImportError. The httpx dependency is fragile — if og-x402 changes its dependency tree, httpx disappears and llm.py/twins.py break.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions