feat(shared): add Cheaper Inference proxy preset - #438
Open
aiapienthusiast wants to merge 3 commits into
Open
aiapienthusiast wants to merge 3 commits into
aiapienthusiast wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Review mode: initial
Findings
- [Nit] The changeset contains an unverifiable marketing/pricing claim that will land in the public
CHANGELOG.md—packages/sharedconsumers 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',baseUrlincludes/v1, non-emptynotes). ProxyPresetId,presetIds, andProxyPresetIdSchemaderive from theas consttuple, 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 beRefs #437with a follow-up issue for the remaining criteria. - The PR checklist leaves
pnpm lint && pnpm typecheck && pnpm testunchecked, and the body only reportstsc --noEmitscoped topackages/shared. If any exhaustiveRecord<ProxyPresetId, ...>orswitchover preset ids exists outsidepackages/shared(for example in the desktop provider settings UI), did the repo-widepnpm typecheckpass? 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
custompreset) 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 addedtoContain('cheaperinference')assertion inpackages/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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Linked issue
Closes #437
Checklist
pnpm lint && pnpm typecheck && pnpm testpasses locallypnpm changeset) if user-visibleDetails
Files:
packages/shared/src/proxy-presets.ts: newcheaperinferenceentry at the end of the list.packages/shared/src/proxy-presets.test.ts: newtoContain('cheaperinference')assertion..changeset/cheaperinference-proxy-preset.md: patch changeset for@open-codesign/shared.Preset values:
cheaperinferenceCheaper Inferenceopenaihttps://api.cheaperinference.com/v1Multi-model relayThe
ProxyPresetIdtype and thez.enumschema derive from theas consttuple.No other code changes are necessary.
How tested:
pnpm exec vitest runinpackages/shared: 18 files, 292 tests passed.pnpm exec tsc --noEmitinpackages/shared: no errors.pnpm exec biome checkon the two changed.tsfiles: no issues.gpt-5.4-mini.