Repository navigation
feat(providers): add Cheaper Inference API-key preset - #6336
aiapienthusiast wants to merge 1 commit into
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (23)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughAdds a Cheaper Inference API-key preset with an OpenAI Chat adapter, authenticated model discovery filtered to text rows, and ChangesCheaper Inference provider
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant User
participant CLIorDashboard as CLI or Dashboard
participant CheaperInferenceRegistry
participant CheaperInferenceAPI
User->>CLIorDashboard: Add provider with API key
CLIorDashboard->>CheaperInferenceRegistry: Resolve provider preset
CheaperInferenceRegistry->>CheaperInferenceAPI: GET /v1/models with Bearer key
CheaperInferenceAPI-->>CheaperInferenceRegistry: Return model rows
CheaperInferenceRegistry->>CheaperInferenceRegistry: Retain rows with type "text"
Merge Risk: ⚪ Minimal · up to The Cheaper Inference preset adds authenticated text-model discovery and chat routing without an established merge-blocking issue. The translated guides remain consistent with their partial catalogs. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The integration uses existing safeguards and preserves explicitly configured destinations. Its exposure is limited to users who select the gateway, but credential-change recovery and the complete outbound request path were not fully verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (20 skipped: 20 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. This PR stays in draft until every box above is ticked. |
|
Thanks for the preset. Maintainer review found two blockers, so this stays open for now:
Endpoint, authentication, legal entity, maintenance owner and verification date look fine. |
Summary
This PR adds Cheaper Inference as an API-key preset in the provider registry.
It uses the same pattern as #6221 (TokenLab).
Cheaper Inference is an OpenAI-compatible LLM gateway.
One API key gives access to models from several labs.
Usage:
The preset uses the
openai-chatadapter athttps://api.cheaperinference.com/v1.Model discovery sends the key to
GET /v1/models.It keeps only rows with
type: "text".Image and video rows are excluded.
The seeded default model is
gpt-5.4-mini.A same-named custom destination is preserved.
Provider evidence
POST https://api.cheaperinference.com/v1/chat/completions(docs: https://cheaperinference.com/docs).GET https://api.cheaperinference.com/v1/modelswithAuthorization: Bearer <key>. It returns 401 without a key (checked 2026-09-30).Section 9 says that third-party provider terms can apply.
I did not find a public statement about separate reseller agreements with each model lab.
Verification
bun test tests/providers/cheaperinference-provider.test.ts tests/providers/tokenlab-provider.test.ts tests/providers/provider-registry-parity.test.ts tests/ci-workflows/docs-provider-preset-counts.test.ts: 92 pass, 0 fail.bun test tests/test-layout-tooling.test.ts: 16 pass, 0 fail.bun x tsc --noEmit: pass.bun run privacy:scan: pass.gpt-5.4-minireturned a reply through theopenai-chatadapter.Details
Files:
src/providers/registry/entries-extended.ts: newcheaperinferenceentry aftertokenlab.tests/providers/cheaperinference-provider.test.ts: new test. It uses stubbedfetchonly.tests/providers/provider-registry-parity.test.ts: add the id to the expected key list.scripts/test-layout/layout.json,tests/fixtures/test-layout-expected.json: register the new test.docs-site/.../guides/providers.md: table row and setup paragraph.structure/ops/docs-and-release.md.structure/providers-and-adapters.md: short section for the preset.Tests:
type: "text"rows.The new test uses mocks only.
Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
gpt-5.4-minias the default model.