Skip to content

feat(models): add Cheaper Inference OpenAI-compatible model wrapper - #1158

Merged
VinciGit00 merged 4 commits into
ScrapeGraphAI:pre/betafrom
aiapienthusiast:feat/cheaperinference
Sep 25, 2026
Merged

VinciGit00 merged 4 commits into
ScrapeGraphAI:pre/betafrom
aiapienthusiast:feat/cheaperinference

Conversation

@aiapienthusiast

Copy link
Copy Markdown
Contributor

This PR adds a CheaperInference model wrapper.
It follows the Atlas Cloud wrapper from #1104.

Cheaper Inference is an OpenAI-compatible LLM gateway.
Its base URL is https://api.cheaperinference.com/v1.

Cheaper Inference is one of the fastest-growing AI routers.
Each model costs 15–60% less than the list price of its lab.

Changes

  • Add scrapegraphai/models/cheaperinference.py. It is a ChatOpenAI subclass with a fixed base URL.
  • Export CheaperInference from scrapegraphai.models.
  • Add a cheaperinference entry with two models to models_tokens.py.
  • Add tests/test_cheaperinference_model.py.

Testing

  • The new tests and the Atlas Cloud tests pass.
  • ruff passes. black and isort pass on the new files.
Details
  • Base branch: pre/beta.
  • Usage: pass a CheaperInference object as model_instance, with model_tokens, in the graph config. This PR does not register the provider in abstract_graph.py. This matches Add Atlas Cloud OpenAI-compatible model wrapper #1104.
  • The Test Suite workflow runs a fixed list of test files. This PR does not change the workflow. A maintainer can add tests/test_cheaperinference_model.py to the list.
  • black --check reports scrapegraphai/models/__init__.py. The __all__ line is already too long on pre/beta.
  • isort --check-only reports scrapegraphai/models/minimax.py. This PR does not change that file.

@VinciGit00
VinciGit00 merged commit ecae206 into ScrapeGraphAI:pre/beta Sep 25, 2026
1 check passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.3.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants