Skip to content

feat(providers): add Cheaper Inference as an OpenAI-compatible gateway - #1016

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

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

Conversation

@aiapienthusiast

Copy link
Copy Markdown

Summary

This PR adds Cheaper Inference as an OpenAI-compatible gateway provider.
It uses the same pattern as #990 (Eden AI).

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

Usage:

"models": { "providers": { "cheaperinference": { "api_key": "ci_live_..." } } }

Or set CHEAPER_INFERENCE_API_KEY.
Model ids have no lab prefix.
Example model ref: cheaperinference/gpt-5.4-mini.

Details

Files:

  • src/providers/factory.zig: compat_providers entry with base URL https://api.cheaperinference.com/v1, plus tests.
  • src/providers/api_key.zig: env candidates CHEAPER_INFERENCE_API_KEY, CHEAPERINFERENCE_API_KEY, plus a test.
  • src/provider_names.zig: aliases cheaper-inference and cheaper_inference, plus tests.
  • src/onboard.zig: known_providers entry, default model gpt-5.4-mini.
  • src/model_refs.zig: known provider namespace.
  • src/integrations.zig: integrations list entry.
  • README.md, config.example.json, docs/en and docs/zh (architecture.md, configuration.md): provider lists and config example.

Each entry goes after Eden AI.
#990 also added a models_dev_providers row.
This PR does not add that row, because I could not confirm a models.dev entry for this provider.
Onboarding then uses the default model.

Validation

  • zig build test --summary all (Zig 0.16.0): 13/13 steps succeeded, 7400/7414 tests passed (14 skipped).
  • zig fmt --check src/: pass.
  • git diff --check: pass.

Live check: nullclaw agent -m with cheaperinference/gpt-5.4-mini returned a reply.

Notes

  • No new dependencies.
  • No behavior change for other providers.

This branch has not been deployed

No deployments
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