Skip to content

Add Cheaper Inference preset - #768

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

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

Conversation

@aiapienthusiast

Copy link
Copy Markdown

This PR adds Cheaper Inference as a preset in the CLI.
It uses the same pattern as #752.

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

Usage:

export CHEAPER_INFERENCE_API_KEY=your-token
humanify cheaperinference obfuscated.js -o readable.js

The default model is gpt-5.4-mini. Use -m to change it.

Details

Files:

  • src/cli/cheaperinference.rs: preset defaults and a unit test.
  • src/cli/mod.rs, src/main.rs: new cheaperinference subcommand.
  • tests/common/mod.rs, tests/e2e_cheaperinference.rs: label-gated e2e test.
  • .github/workflows/e2e-cheaperinference.yml: runs with label test-cheaperinference on branches in this repository.
  • README.md: usage line, "Cheaper Inference mode" section, e2e label list.

Tests: cargo fmt -- --check, cargo clippy -- -D warnings, cargo test --lib (206 passed), cargo test --test cli_smoke pass.
The e2e test compiles. It is ignored by default, as the other provider e2e tests are.

Live check: gpt-5.4-mini returned a reply through humanify cheaperinference -.
The output had readable names.

The e2e workflow needs a CHEAPER_INFERENCE_API_KEY repository secret to run.

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