Skip to content

feat(ai): add Cheaper Inference adapter - #1055

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
aiapienthusiast:cheaperinference-provider
Nov 6, 2026
Merged

ralyodio merged 1 commit into
profullstack:masterfrom
aiapienthusiast:cheaperinference-provider

Conversation

@aiapienthusiast

Copy link
Copy Markdown
Contributor

This adds a Cheaper Inference AI adapter.
Cheaper Inference is an OpenAI-compatible LLM gateway.
One API key gives access to models from several labs.
It uses the same pattern as #870 (Chutes) and #267 (LiteLLM).

  • New package packages/ai/cheaperinference (@profullstack/sh1pt-ai-cheaperinference, adapter ID ai-cheaperinference).
  • The code follows the current Chutes adapter: dry-run short-circuit, usage token mapping, clean base URL validation and redacted error excerpts.
  • The API key comes from the CHEAPERINFERENCE_API_KEY vault secret.
  • The chat URL is https://api.cheaperinference.com/v1/chat/completions.
  • ai in packages/cli/src/adapter-registry.ts lists the new directory, so the registry test stays green.
Details
  • Default model: gpt-5.4-mini.
    Other listed models: gpt-5.4, claude-sonnet-5, deepseek-v4-flash, glm-5.3.
    All ids come from the public model list (https://api.cheaperinference.com/public/models).
  • baseUrl config is optional, like the other integrated adapters.
  • src/index.test.ts mirrors the Chutes tests: smoke test, dry-run, request body and usage mapping, base URL normalization, unclean base URL rejection, redacted errors.
  • README.md uses the same format as the generated module READMEs.
  • pnpm-lock.yaml has the new workspace importer entry.

Test:

pnpm vitest run packages/ai/cheaperinference/src/index.test.ts packages/cli/src/adapter-registry.test.ts
pnpm --filter @profullstack/sh1pt-ai-cheaperinference typecheck

Docs: https://cheaperinference.com/docs

@ralyodio
ralyodio merged commit 93474fe into profullstack:master Nov 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants