Skip to content

feat: add Cheaper Inference provider - #24

Open
aiapienthusiast wants to merge 1 commit into
Jeomon:mainfrom
aiapienthusiast:cheaperinference-provider
Open

aiapienthusiast wants to merge 1 commit into
Jeomon:mainfrom
aiapienthusiast:cheaperinference-provider

Conversation

@aiapienthusiast

Copy link
Copy Markdown

This adds Cheaper Inference as a chat provider: ChatCheaperInference.
Cheaper Inference is an OpenAI-compatible LLM gateway.
One API key gives access to models from several labs.
It uses the same pattern as ChatDeepSeek and ChatNvidia: a small ChatOpenAI subclass with its own base URL.
The same provider was added to Windows-Use in Jeomon/Windows-Use#14.

  • New module src/providers/cheaper_inference/.
  • The default model is gpt-5.4-mini.
  • The key comes from CHEAPER_INFERENCE_API_KEY.
  • CHEAPER_INFERENCE_API_BASE can override the base URL.
  • ChatCheaperInference is exported from src.providers.
Usage and tests
from src.providers.cheaper_inference import ChatCheaperInference

llm = ChatCheaperInference(model="gpt-5.4-mini")
  • tests/test_cheaper_inference.py checks the defaults and the base URL override.
    It mocks the OpenAI clients, so it needs no key and no network.

Base URL: https://api.cheaperinference.com/v1
Docs: https://cheaperinference.com/docs

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.

1 participant