#907

feat(providers): add Cheaper Inference as a named OpenAI-compatible provider

Openaiapienthusiastwants to merge intofrom

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_INFERENCE and a PROVIDER_CATALOG entry (adapter OPENAI_COMPATIBLE, tier standard), 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_inference shows 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: allow CHEAPER_INFERENCE_API_KEY for 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 against 3fcd9f27).
  • 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 -b in ui: pass.
  • ruff format --check on the changed Python files: pass.
  • scripts/test_selection.py and scripts/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 test was not run.

Docs: https://cheaperinference.com/docs

Activity

2
berylliumsec-handlerrequested changes6d ago
berylliumsec-handler6d ago

Reviewed commit 9d5ef6d0831d269a23c32b46d9b7caba8d0876fa against current base 7332d9a05127933d2cc649e6797c9586466cfa8a.

The provider preset follows the existing OpenAI-compatible pattern. Please address these two items before merge:

  1. 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 HEAD exits 2 with missing/stale change_digest; the receipt currently validates only against the original parent 3fcd9f27. CI uses the current PR base SHA.

  2. 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.ts passed (87/87), and npm run build passed, including TypeScript and the production Vite build. Browser/mobile, LAN, packaged desktop/Rust, and live-provider checks were not run.