Skip to content

feat(providers): onboard Cheaper Inference catalog provider - #2154

Merged
murdore merged 1 commit into
juspay:releasefrom
aiapienthusiast:cheaperinference-provider
Nov 23, 2026
Merged

murdore merged 1 commit into
juspay:releasefrom
aiapienthusiast:cheaperinference-provider

Conversation

@aiapienthusiast

@aiapienthusiast aiapienthusiast commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Description

What does this PR do?

This PR adds Cheaper Inference as a Tier 2 catalog 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 #1725 (API Route).

Related Issues

Does this PR close any issues?

None.

Type of Change

  • New feature (non-breaking change which adds functionality)

Motivation and Context

Why is this change needed? What problem does it solve?

Users with a Cheaper Inference key can select it as a named provider.
They set CHEAPER_INFERENCE_API_KEY and use --provider cheaper-inference (alias cheaperinference).

Changes Made

  • Added src/lib/providers/catalog/cheaper-inference.json.
  • Base URL: https://api.cheaperinference.com/v1. Default model: gpt-5.4-mini.
  • Added the generated entries: the AIProviderName member, CheaperInferenceModels, the NeurolinkCredentials key and the catalog index.
  • Updated the four docs/api pages that list these names.
Catalog data and evidence
  • All model ids, context windows, output limits and vision flags come from the public roster GET https://api.cheaperinference.com/public/models (no key, HTTP 200, 2026-11-04).
  • glm-5.3 has no maxOutputTokens, because the roster figure equals the context window.
  • An unauthenticated GET /v1/models returns 401 with invalid_api_key. This is recorded as authProbe.
  • liveMatrix is null, as for the other entries without a live run.
  • toolsWithStreaming and structuredOutputWithTools stay false because they were not probed.
  • billingPolicy is no-free-tier.
  • addedInPR is PENDING_PR. I can set it to this PR's URL.

Breaking Changes

  • No breaking changes

New Provider Onboarding

  • N/A — no provider/model change

  • Tier 1 — aggregator passthrough only

  • Tier 2/3/4 — adds a new AIProviderName member — complete the checklist below

  • Tier selected (2/3/4) per docs/provider-integration/tiers/README.md

  • Manifest added at docs/provider-integration/manifests/<name>.json (Tier 2 keeps the evidence in the catalog JSON)

  • Mocked-contract test section added to test/continuous-test-suite-providers-mocked.ts (Tier 2 rows derive from the catalog)

  • pnpm run test:providers-mocked passes locally

  • pnpm run verify:provider-onboarding passes locally

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • E2E tests pass
  • Manual testing completed
  • Tested with multiple providers: [list providers]
  • Tested on multiple platforms: [list platforms]

I validated the JSON against provider-catalog.schema.json.
I checked every model figure against the public roster.
I ran prettier --check on the changed source files.
I did not run the pnpm suites locally. CI runs them.
No live call with a key was made.

Test Coverage

Manual Testing Steps

  1. Set CHEAPER_INFERENCE_API_KEY in .env.
  2. Run pnpm cli generate "hello" --provider cheaper-inference.
  3. Check that the answer comes from gpt-5.4-mini.

Code Quality

  • Code is properly formatted (Prettier applied)
  • Self-review of code completed
  • No console.log statements (using logger instead)
  • No hardcoded API keys or secrets

Documentation

  • Documentation in /docs updated (if needed)

Commit Message Format

  • Commit message follows format: type(scope): description
  • Valid type used: feat, fix, docs, style, refactor, test, chore, build, ci, perf, revert
  • Scope specified (e.g., providers, cli, docs, middleware)

Dependencies

  • No dependency changes

Performance Impact

  • No performance impact

Security Considerations

  • No security implications

Deployment Notes

  • No special deployment steps

The new variable CHEAPER_INFERENCE_API_KEY is optional.

Screenshots / Videos

Not applicable.

Additional Notes

The setup URL is https://cheaperinference.com. The docs are at https://cheaperinference.com/docs.


Pre-submission Checklist

  • Read and followed the Contributing Guidelines
  • Verified all automated pre-commit checks pass
  • Tested changes locally with pnpm test
  • Built the project successfully with pnpm build
  • Run pnpm run validate:all and all checks pass
  • Reviewed your own code for obvious issues
  • Ensured commit messages follow semantic format
  • Updated relevant documentation
  • Added tests for new functionality
  • Checked that CI/CD pipeline passes (after creating PR)

Summary by CodeRabbit

  • New Features
    • Added Cheaper Inference as an AI provider, with six available models and configurable API credentials.
    • Added provider setup guidance, a default model, and fallback options.
    • The provider supports text generation, streaming, tool use, and structured output.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Files ignored due to path filters: 7

  • action-dist/index.js.map is excluded by !**/*.map
  • docs/api/enumerations/AIProviderName.md is excluded by !docs/api/**
  • docs/api/type-aliases/CatalogCredentialKey.md is excluded by !docs/api/**
  • docs/api/type-aliases/CatalogProviderName.md is excluded by !docs/api/**
  • docs/api/type-aliases/NeurolinkCredentials.md is excluded by !docs/api/**
  • src/lib/providers/catalog/index.generated.ts is excluded by !**/*.generated.*
  • src/lib/types/providerCatalog.generated.ts is excluded by !**/*.generated.*
Run configuration

Commits

Reviewing files that changed from the base of the PR and between dbe39b3 and 509ab5d.

Files ignored due to path filters: 7

  • action-dist/index.js.map is excluded by !**/*.map
  • docs/api/enumerations/AIProviderName.md is excluded by !docs/api/**
  • docs/api/type-aliases/CatalogCredentialKey.md is excluded by !docs/api/**
  • docs/api/type-aliases/CatalogProviderName.md is excluded by !docs/api/**
  • docs/api/type-aliases/NeurolinkCredentials.md is excluded by !docs/api/**
  • src/lib/providers/catalog/index.generated.ts is excluded by !**/*.generated.*
  • src/lib/types/providerCatalog.generated.ts is excluded by !**/*.generated.*

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The change adds the Cheaper Inference provider identifier, six model identifiers, optional credential fields, and a provider catalog with model defaults, capabilities, authentication handling, setup instructions, and verification evidence.

Changes: Cheaper Inference provider

Layer / File(s) Summary
Provider identifiers and credentials
src/lib/constants/enums.ts, src/lib/types/providers.ts, action-dist/index.js
Adds the provider identifier and six model identifiers, optional API key and base URL credential fields, and the corresponding provider and model enum values in the distributed action.
Provider catalog configuration
src/lib/providers/catalog/cheaper-inference.json
Adds the provider endpoint, model defaults and fallbacks, capability flags, authentication rule, setup instructions, and verification evidence.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: murdore

Merge Risk: Minimal · previous review dbe39

This adds the Cheaper Inference provider as catalog data, enum values, and an optional credentials type. No concrete defect was found in the change. Live-call verification was not performed, so confirm the provider works with a real API key before relying on it.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(providers): onboard Cheaper Inference catalog provider" matches the main change. The PR adds Cheaper Inference as a Tier 2 catalog provider, including its catalog JSON, enum values, an…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(providers): onboard Cheaper Inference catalog provider" matches the main change. The PR adds Cheaper Inference as a Tier 2 catalog provider, including its catalog JSON, enum values, and credential type. The title is short, specific, and uses a conventional commit style.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7c41cb3 and dbe39b3.

Files ignored due to path filters: 7

  • action-dist/index.js.map is excluded by !**/*.map
  • docs/api/enumerations/AIProviderName.md is excluded by !docs/api/**
  • docs/api/type-aliases/CatalogCredentialKey.md is excluded by !docs/api/**
  • docs/api/type-aliases/CatalogProviderName.md is excluded by !docs/api/**
  • docs/api/type-aliases/NeurolinkCredentials.md is excluded by !docs/api/**
  • src/lib/providers/catalog/index.generated.ts is excluded by !**/*.generated.*
  • src/lib/types/providerCatalog.generated.ts is excluded by !**/*.generated.*
Files selected for processing: 2

  • action-dist/index.js
  • src/lib/providers/catalog/cheaper-inference.json

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@murdore

murdore commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

build-check and security-suites fail because action-dist/ is stale. Please rebase, run pnpm run codegen:catalog && pnpm run build:action, and amend the single commit. Please also confirm the models were live-probed, since the Tier 2 guide requires it. claude-sonnet-5 and glm-5.3 look unverified. Check that evidence.rosterVerified and evidence.addedInPR are set.

@murdore
murdore force-pushed the cheaperinference-provider branch from 7c41cb3 to dbe39b3 Compare November 17, 2026 18:35
@murdore

murdore commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Thanks for the catalog entry. The catalog matches the public roster endpoint (I checked all six models' context windows, output limits, vision and tool-use flags against GET /public/models), verify:provider-onboarding passes, and CI is green. One requirement is still open before this can merge: docs/provider-integration/tiers/tier-2-catalog-entry.md ("Live verification") asks for a keyed live matrix run, and the entry has liveMatrix: null. Could you run --provider=cheaper-inference with a real key (generate, stream, tool calling, structured output, and the real error body for a bad key), record the result in evidence.liveMatrix, and note what the authenticated roster shows for the default model? If you cannot run it, say so here and a maintainer can decide whether to waive it.

Tier-2 catalog onboarding for Cheaper Inference
(https://api.cheaperinference.com/v1), an OpenAI-wire-compatible gateway.
One catalog JSON plus the generated regions it drives: the AIProviderName
member, the CheaperInferenceModels enum, the credentials key, the catalog
index and the four docs/api pages that list them.

Evidence recorded in the JSON: the unauthenticated public roster
GET /public/models returned 200 on 2026-11-04, and an unauthenticated
GET /v1/models returned 401. Every context and output figure comes from
that roster. liveMatrix is null until a run with a real key.
addedInPR records this PR.
@murdore
murdore force-pushed the cheaperinference-provider branch from dbe39b3 to 509ab5d Compare November 23, 2026 03:24
@murdore

murdore commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Maintainer decision: the keyed live-matrix run is waived for this entry. It merges on the roster check (all six models matched GET /public/models), the mocked suites and CI; evidence.liveMatrix stays null and records that. I rebased it onto current release as one commit, 509ab5d40, keeping your authorship. Only the catalog JSON is hand-written, so everything else was regenerated from it: codegen:catalog, build:action (this fixes the stale action-dist/ from earlier) and the four docs/api pages. check:docs-api, verify:provider-onboarding (87/87) and test:provider-structure (10/10) pass, and CI is green. Thanks for the entry.

@murdore
murdore merged commit fb3dc12 into juspay:release Nov 23, 2026
27 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 13.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants