#907
feat(providers): add Cheaper Inference as a named OpenAI-compatible provider
Adds Cheaper Inference as a named OpenAI-compatible provider. Cheaper Inference is an OpenAI-compatible LLM gateway. One API key gives access to models from several labs. It uses the same pattern as the OrcaRouter provider (#243).
Operator journey: add a provider and pick the type "Cheaper Inference".
The catalog gives the endpoint https://api.cheaperinference.com/v1 and the variable CHEAPER_INFERENCE_API_KEY, as for OrcaRouter.
Details
src/nebula/v3/providers.py:ProviderFlavor.CHEAPER_INFERENCEand aPROVIDER_CATALOGentry (adapterOPENAI_COMPATIBLE, tierstandard), next to OrcaRouter.tests/v3/test_providers.py: catalog mapping test and OpenAI-compatible chat round-trip test, as for OrcaRouter.ui/src/api/client.ts:cheaper_inferenceshows as a gateway provider.ui/src/api/client.test.ts: gateway mapping test, as for OrcaRouter.ui/src-tauri/src/sidecar.rs,ui/electron/main.mjs: allowCHEAPER_INFERENCE_API_KEYfor the sandboxed Core.ui/src/guides/catalog.ts: adds the provider to the desktop guide's list of known variables..github/test-selection.json: reviewed selection for this diff (digest against3fcd9f27).- No OpenRouter-specific logic, reasoning controls or defaults change.
Test selection:
- Python: the 2 new tests in
tests/v3/test_providers.py. Also ran the full file locally: 95 passed. - Frontend:
ui/src/api/client.test.ts: 87 passed. tsc -binui: pass.ruff format --checkon the changed Python files: pass.scripts/test_selection.pyandscripts/playwright_impact.py select: pass.
Limitations:
- No LAN Core journey and no Playwright run. The provider type comes from the existing catalog endpoint.
- Rust: the change adds one name to an allowlist.
cargo testwas not run.
Activity
2berylliumsec-handlerrequested changes6d ago
Reviewed commit
9d5ef6d0831d269a23c32b46d9b7caba8d0876faagainst current base7332d9a05127933d2cc649e6797c9586466cfa8a.The provider preset follows the existing OpenAI-compatible pattern. Please address these two items before merge:
Update the branch against current main, resolve the conflict in
.github/test-selection.json, and validate the reviewed test selection against the actual PR base. I reproduced a content conflict in this file.python scripts/test_selection.py --baseline 7332d9a05127933d2cc649e6797c9586466cfa8a --candidate HEADexits 2 withmissing/stale change_digest; the receipt currently validates only against the original parent3fcd9f27. CI uses the current PR base SHA.Add focused regression coverage and record acceptance evidence for the operator workflow: discover the provider in the catalog, save a profile, perform authenticated model discovery, select a discovered model, use chat/streaming, and verify the saved configuration after reload, including a credential failure/retry. The new tests cover catalog configuration, one mocked non-streaming completion, and a client mapping of a fabricated profile. They do not exercise the Settings-to-Core workflow or establish compatibility with the external service. The selection contains no Playwright journey, and the description explicitly reports no real-Core/LAN run. Use an isolated real Core with an inert upstream fixture for deterministic workflow coverage, run the applicable desktop/mobile browser profiles, and record the required production/LAN evidence from AGENTS.md and the product-quality skill. Live-service verification should be reported separately and must not be inferred from the mocked completion.
Validation I independently ran on this head: both new Python tests passed (2/2),
ui/src/api/client.test.tspassed (87/87), andnpm run buildpassed, including TypeScript and the production Vite build. Browser/mobile, LAN, packaged desktop/Rust, and live-provider checks were not run.