[Feature]: Add Cheaper Inference provider
Pre-submission Checklist
- [x] I have searched existing issues and discussions
- [x] I have read the documentation
- [x] This is a feature request, not a bug report
Problem Statement
CLIO has no built-in provider for Cheaper Inference. Cheaper Inference is an OpenAI-compatible LLM gateway. One API key gives access to models from several labs. Today a user must set it up as a custom endpoint by hand.
Proposed Solution
Add cheaperinference as an OpenAI-compatible provider, the same way as Opper (#36).
api_base:https://api.cheaperinference.com/v1/chat/completions- Auth: API key,
Authorization: Bearer <key> - Tools and streaming: yes
- Model list:
GET https://api.cheaperinference.com/v1/models(needs the key) - Default model:
gpt-5.4-mini - Model ids are bare names, for example
gpt-5.4-mini,claude-sonnet-5,deepseek-v4-flash.
Which area would this affect?
API / Provider Integration
Alternatives Considered
A custom endpoint works, but each user must enter the URL and the model limits by hand.
Examples / References
- Docs: https://cheaperinference.com/docs
- Opper provider: #36
Would you be willing to contribute?
Yes, I'd like to implement this
Automated Triage Summary
| Field | Value |
|---|---|
| Classification | enhancement |
| Priority | medium |
| Completeness | 95% |
Analysis: Feature request to add Cheaper Inference as a built-in provider, mirroring the Opper provider pattern from #36. Investigation confirms the integration surface: a single %PROVIDERS registry entry in lib/CLIO/Providers.pm (Providers.pm:60-500+), a URL-detection branch in provider_from_url() (Providers.pm:1155+), a provider-defaults.json block (provider-defaults.json:222+), and a docs/PROVIDERS.md section (docs/PROVIDERS.md:344+). The OAI-compatible /v1/models endpoint is already handled by the default path in UI/Commands/API/Models.pm _fetch_provider_models (~line 292), so no special-casing is needed (unlike Opper which uses /v3/compat/ and gets a dedicated branch at line 348). No changes needed in APIManager, ModelCapabilitiesManager, or heuristics.json. The provider's bare model IDs (e.g. gpt-5.4-mini, deepseek-v4-flash) match existing heuristics patterns. Contributor has volunteered to implement.
Root Cause Analysis
Confidence: high
Relevant files:
lib/CLIO/Providers.pmlib/CLIO/Core/model-data/provider-defaults.jsonlib/CLIO/UI/Commands/API/Models.pmdocs/PROVIDERS.md
Relevant functions:
get_providerbuild_endpoint_configprovider_from_url_fetch_provider_models
Cheaper Inference is a standard OpenAI-compatible gateway at https://api.cheaperinference.com/v1/chat/completions with models at /v1/models. The provider does not yet exist in the %PROVIDERS registry in lib/CLIO/Providers.pm. Adding it requires: (1) a new registry entry mirroring the 'opper' block, (2) a URL-detection branch in provider_from_url(), (3) a 'cheaper_inference' block in provider-defaults.json with reasoning_schema mode 'disabled' (like opper), (4) a docs/PROVIDERS.md section. The models endpoint works via the existing default OAI-compatible path in _fetch_provider_models (no special-casing needed, unlike Opper's /v3/compat/ override). APIManager, ModelCapabilitiesManager, and heuristics.json need no changes since they resolve config generically.
Affected Areas
- lib/CLIO/Providers.pm
- lib/CLIO/Core/model-data/provider-defaults.json
- lib/CLIO/UI/Commands/API/Models.pm
- docs/PROVIDERS.md
This is an automated analysis. A maintainer will review shortly.