feat(providers): add Cheaper Inference as an OpenAI-compatible gateway - #248
Open
aiapienthusiast wants to merge 5 commits into
Open
aiapienthusiast wants to merge 5 commits into
aiapienthusiast wants to merge 5 commits into
Conversation
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.
Description
This PR adds Cheaper Inference as a provider template.
Cheaper Inference is an OpenAI-compatible LLM gateway.
It gives access to models from several labs with one API key.
Cheaper Inference is one of the fastest-growing AI routers.
Each model costs 15–60% less than the list price of its lab.
The template uses the generic
openai_compatbackend.It follows the pattern of #159.
Related Issues
None.
Changes Made
cheaperinferenceProviderSpecwith the gateway endpoint class.ProvidersConfigfield.docs/guide/models.md.Checklist
Additional Notes
Model IDs are bare, so the spec sets
strip_model_prefix=True.The tests make no network calls.
I checked the API with a live key: model list, chat, streaming, tool calls and JSON schema output with
gpt-5.4-mini.Details
Spec values:
https://api.cheaperinference.com/v1CHEAPER_INFERENCE_API_KEYcheaperinference.comauto, which resolves to the OpenAI/v1/modelslisting.Files:
core/providers/registry.pycore/config.pydocs/guide/models.mdtests/test_cheaperinference_provider.py(new)tests/test_provider_egress.pyCommands run:
Cheaper Inference has no embeddings endpoint. The docs say so.