Skip to content

feat(models): add CloudGPU as an OpenAI-compatible provider - #1182

Open
cloudgpuapp wants to merge 1 commit into
ScrapeGraphAI:pre/betafrom
cloudgpuapp:cursor/cloudgpu-provider-5c73
Open

cloudgpuapp wants to merge 1 commit into
ScrapeGraphAI:pre/betafrom
cloudgpuapp:cursor/cloudgpu-provider-5c73

Conversation

@cloudgpuapp

Copy link
Copy Markdown

Adds CloudGPU as a model provider, so a graph config can use "model": "cloudgpu/deepseek-v4-flash" with a CLOUDGPU_API_KEY.

CloudGPU (cloudgpu.app) has an OpenAI-compatible model API at https://cloudgpu.app/v1: a model API for DeepSeek, Kimi, GLM, MiniMax, Qwen and more.

Changes

  • scrapegraphai/models/cloudgpu.py: CloudGPU(ChatOpenAI) wrapper, same shape as MiniMax: maps api_key, defaults the base URL to https://cloudgpu.app/v1 unless base_url / openai_api_base is given.

  • scrapegraphai/models/__init__.py: re-export CloudGPU, matching the other model wrappers.

  • scrapegraphai/graphs/abstract_graph.py: cloudgpu added to the known providers and to the custom-class branch, returning CloudGPU(**llm_params).

  • scrapegraphai/helpers/models_tokens.py: cloudgpu context lengths for seven chat models, taken from context_length in GET https://cloudgpu.app/v1/models.

  • examples/smart_scraper_graph/cloudgpu/smart_scraper_cloudgpu.py: SmartScraper example.

  • tests/test_cloudgpu_model.py: base URL / key mapping, custom base URL kept, token table entries, and cloudgpu/<model> resolution through SmartScraperGraph (graph creation patched, no network).

Testing

  • ruff check, black --check, and isort --check-only on the touched files: clean.

  • pytest tests/test_cloudgpu_model.py: 4 passed. These tests do not call the network.

  • Context lengths were checked against the public GET https://cloudgpu.app/v1/models (no key). Every model id in this PR is in that list, with the context_length values used here:

deepseek-v4-flash 131072

  • deepseek-v4-pro 131072

  • glm-5.3 131072

  • kimi-k2.6 262144

  • minimax-m3 1000000

  • qwen3-coder-480b 262144

  • qwen3.5-397b 262144

  • Live graph execution was not run.

  • make lint is not clean on pre/beta without this change (pre-existing ruff, black, and isort findings in unrelated files). mypy reports a missing annotation on CloudGPU.__init__, the same pattern as MiniMax and AtlasCloud, plus existing errors in abstract_graph.py.

  • A unit run excluding integration, e2e, and requires_api_key was 272 passed, 98 failed, 1 error. The failures are pre-existing (missing Playwright browser, network graph tests, and token-table assertions). The same four failures in tests/test_models_tokens.py and tests/graphs/abstract_graph_test.py::test_llm_missing_tokens fail on pre/beta without this change. The new CloudGPU tests are not among the failures.

Checklist

  • Follows the existing provider pattern (MiniMax, DeepSeek)

  • Example added under examples/smart_scraper_graph/

  • Unit tests added (no network)

  • Target branch pre/beta per CONTRIBUTING

Disclosure: I work on CloudGPU.

Open in Web Open in Cursor

Register CloudGPU so a graph config can use cloudgpu/<model> with
CLOUDGPU_API_KEY. Context lengths match the public models list.

Co-authored-by: CloudGPU <mrhy7176@users.noreply.github.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants