Skip to content

feat: add Cheaper Inference as an LLM provider - #66

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

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

Conversation

@aiapienthusiast

Copy link
Copy Markdown

This PR adds Cheaper Inference as an LLM provider preset in llm_client.py.
It uses the same pattern as #39 (OrcaRouter).

Cheaper Inference is an OpenAI-compatible LLM gateway.
One API key gives access to models from several labs.

Usage:

[api_keys]
cheaperinference_api_key = "ci_live_..."

[llm]
provider = "cheaperinference"
model = "gpt-5.4-mini"

You can also set CHEAPER_INFERENCE_API_KEY instead of the TOML key.

Details

Files:

  • src/standard/llm_client.py: new cheaperinference entry in PROVIDER_DEFAULTS (base URL https://api.cheaperinference.com/v1, default model gpt-5.4-mini) and the CHEAPER_INFERENCE_API_KEY env mapping.
  • tests/test_llm_client.py: provider defaults test and env key test.
  • config/config.example.toml, README.md, README-zh.md, docs/configuration.md, docs/api-reference.md, docs/pipeline.md: config example and provider lists.

Tests: python -m pytest -q passes on Python 3.10 and 3.12 (42 passed).

Live check: gpt-5.4-mini returned a reply through resolve_llm_config() and chat_completions() with the default temperature 1.3.

Docs: https://cheaperinference.com/docs
Models: https://cheaperinference.com/markets

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