Conversation
Add a FutureInfra ChatOpenAI subclass with base URL https://futureinfra.ai/v1/ai, export it from scrapegraphai.models, add two models to models_tokens, and add unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a
FutureInframodel wrapper.It follows the Cheaper Inference wrapper from #1158 and the Atlas Cloud wrapper from #1104.
FutureInfra (https://futureinfra.ai/) is a cloud provider with an OpenAI-compatible AI API router.
Its base URL is
https://futureinfra.ai/v1/ai. Model ids use theprovider/modelformat, e.g.openai/gpt-4o-mini.Changes
scrapegraphai/models/futureinfra.py. It is aChatOpenAIsubclass with a fixed base URL.FutureInfrafromscrapegraphai.models.futureinfraentry with two models tomodels_tokens.py(openai/gpt-4o-miniandopenai/gpt-4o, 128000 each, as reported by thecontext_lengthfield of the publicGET https://futureinfra.ai/v1/ai/modelsendpoint).tests/test_futureinfra_model.py.Usage
Testing
pytest tests/test_futureinfra_model.py tests/test_cheaperinference_model.py tests/test_atlascloud_model.py --no-cov: 6 passed.ruff checkpasses on the changed files.black --checkandisort --check-onlypass on the new files.Details
pre/beta.abstract_graph.py. This matches Add Atlas Cloud OpenAI-compatible model wrapper #1104 and feat(models): add Cheaper Inference OpenAI-compatible model wrapper #1158.tests/test_futureinfra_model.pyto the list.black --checkreportsscrapegraphai/models/__init__.py. The__all__line is already too long onpre/beta.ruff check scrapegraphai testsreports 6 F401 errors inbatch_generate_answer_node.pyandbatch_api.py. They are already onpre/beta. This PR does not change those files.langchain-openai,pytest,ruff,blackandisort(not a fulluv sync).🤖 Generated with Claude Code