Skip to content

feat(shared): add Cheaper Inference proxy preset - #438

Open
aiapienthusiast wants to merge 3 commits into
OpenCoworkAI:mainfrom
aiapienthusiast:feat/cheaperinference-preset
Open

aiapienthusiast wants to merge 3 commits into
OpenCoworkAI:mainfrom
aiapienthusiast:feat/cheaperinference-preset

Conversation

@aiapienthusiast

Copy link
Copy Markdown

Summary

This PR adds Cheaper Inference as a proxy preset.
Cheaper Inference is an OpenAI-compatible LLM gateway.
Its base URL is https://api.cheaperinference.com/v1.

Cheaper Inference is one of the fastest-growing AI routers.
Each model costs 15–60% less than the list price of its lab.

The change adds one entry to PROXY_PRESETS, one test assertion and one changeset.
It follows the pattern of #397.

Type of change

  • Bug fix
  • New feature
  • Refactor (no behavior change)
  • Documentation
  • Build / CI / tooling
  • Breaking change

Linked issue

Closes #437

Checklist

  • I checked the linked issue / relevant context before starting
  • pnpm lint && pnpm typecheck && pnpm test passes locally
  • Added/updated tests for the change
  • Added a changeset (pnpm changeset) if user-visible
  • Updated docs if behavior changed
Details

Files:

  • packages/shared/src/proxy-presets.ts: new cheaperinference entry at the end of the list.
  • packages/shared/src/proxy-presets.test.ts: new toContain('cheaperinference') assertion.
  • .changeset/cheaperinference-proxy-preset.md: patch changeset for @open-codesign/shared.

Preset values:

  • id: cheaperinference
  • label: Cheaper Inference
  • provider: openai
  • baseUrl: https://api.cheaperinference.com/v1
  • notes: Multi-model relay

The ProxyPresetId type and the z.enum schema derive from the as const tuple.
No other code changes are necessary.

How tested:

  • pnpm exec vitest run in packages/shared: 18 files, 292 tests passed.
  • pnpm exec tsc --noEmit in packages/shared: no errors.
  • pnpm exec biome check on the two changed .ts files: no issues.
  • I checked the API with a live key: model list, chat, streaming, tool calls and JSON schema output with gpt-5.4-mini.

@github-actions github-actions Bot added the docs Documentation label Sep 25, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review mode: initial

Findings

  • [Nit] The changeset contains an unverifiable marketing/pricing claim that will land in the public CHANGELOG.md — packages/shared consumers and the project changelog are user-facing, and the repo asks for truthful, source-backed content (AGENTS.md "AI Visibility For Web Work" / no-spam guidance). The line "Each model costs 15–60% less than the list price of its lab" is a vendor claim, not a description of the code change.
    Evidence: .changeset/cheaperinference-proxy-preset.md:5
    Suggested fix: keep the entry factual, e.g.
    ---
    "@open-codesign/shared": patch
    ---
    
    Add Cheaper Inference as an OpenAI-compatible proxy preset in provider settings.

Everything else in the diff is consistent with the existing PROXY_PRESETS pattern:

  • New entry is well-formed and matches sibling relays: packages/shared/src/proxy-presets.ts:48 (id, label, provider: 'openai', baseUrl includes /v1, non-empty notes).
  • ProxyPresetId, presetIds, and ProxyPresetIdSchema derive from the as const tuple, so no separate schema edit is required (packages/shared/src/proxy-presets.ts:74).
  • No new dependency, no bundled asset, no provider SDK import — no constraint (dependency budget, MIT-compatible, pi-ai-only) impact.

Questions

  • Can you confirm the acceptance criteria of the linked issue #437? The PR body says Closes #437, but I could not load the issue body from the context available to this run. If #437 is broader than adding this single preset (e.g. a general relay/preset-request thread), the link should be Refs #437 with a follow-up issue for the remaining criteria.
  • The PR checklist leaves pnpm lint && pnpm typecheck && pnpm test unchecked, and the body only reports tsc --noEmit scoped to packages/shared. If any exhaustive Record<ProxyPresetId, ...> or switch over preset ids exists outside packages/shared (for example in the desktop provider settings UI), did the repo-wide pnpm typecheck pass? A new union member would otherwise fail CI there.

Summary

  • Review mode: initial
  • This is a small, mechanical addition that follows the established third-party relay preset pattern (duckcoding, openrouter, requesty). No correctness, security, persistence, or regression risk found; no version-sensitive claims to verify; no release/distribution impact.
  • The test update and changeset are present and in the right shape for a user-visible feature.
  • Residual observations: (1) the linked-issue closure claim could not be validated in this run — please confirm #437 is fully satisfied or downgrade the link; (2) whether a third-party relay belongs in the built-in preset list (vs. the existing custom preset) is a maintainer product judgment, not a code defect, so it is not filed as a finding.
  • No merge blockers identified; the only actionable item is the changelog wording nit above.

Testing

  • Not run (automation). The new preset is already covered structurally by the existing generic tests (every preset has all required fields, all preset ids are valid ProxyPresetIdSchema values) plus the added toContain('cheaperinference') assertion in packages/shared/src/proxy-presets.test.ts:37. No additional unit test is required for this change.

Open-CoDesign Bot

This branch has not been deployed

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

Labels

docs Documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add Cheaper Inference as a proxy preset

1 participant