Skip to content

feat: 添加 Cheaper Inference 模型平台 - #1263

Open
aiapienthusiast wants to merge 1 commit into
codexu:devfrom
aiapienthusiast:feat/cheaperinference-provider
Open

aiapienthusiast wants to merge 1 commit into
codexu:devfrom
aiapienthusiast:feat/cheaperinference-provider

Conversation

@aiapienthusiast

@aiapienthusiast aiapienthusiast commented Sep 16, 2026

Copy link
Copy Markdown

Adds Cheaper Inference to the provider template config.

Cheaper Inference is an OpenAI-compatible gateway at https://api.cheaperinference.com/v1. It serves models from several upstream providers behind one endpoint. NoteGen's existing OpenAI-compatible model-service path works with it, so the code needs no change.

Changes

  • config/provider-templates.json — one entry appended to providers
  • config/provider-templates-cn.json — the same entry, as in every earlier provider addition

Each insertion is 8 lines. No other line changes. The entry uses the same fields as the existing entries: key, title, baseURL, apiKeyUrl, icon and enabled.

config/config-manifest.json stays unchanged. Since 7c0ca5e, the publish-config workflow bumps versionCode in its "Prepare manifest" step at publish time.

src/ needs no change. promotion is not set. src/lib/ai/utils.ts needs no per-provider handling, because the gateway speaks the standard OpenAI chat-completions API.

Precedent

Same file, same field set and same insertion shape as:

Testing

  • The Validate config JSON and credentials step from .github/workflows/publish-config.yml runs clean against both files.
  • Both files round-trip identically through JSON.stringify(payload, null, 2) + "\n". The formatting is unchanged.
  • Provider keys stay unique in both files.
  • normalizeProviderTemplatesPayload accepts the new entry. It passes every filter (enabled, key, title, isValidUrl(baseURL)).
  • excludeBuiltInOpenAIProviders keeps the entry in the -cn list. Its key is not chatgpt or openai, and its host is not *.openai.com.

Question for the maintainer

apiKeyUrl points to the docs page for now. Please confirm the correct target.


本次改动仅在 config/provider-templates.jsonconfig/provider-templates-cn.json 中各追加一个条目,新增 Cheaper Inference (https://api.cheaperinference.com/v1),它是 OpenAI 兼容网关,无需改动代码。未改动 config/config-manifest.jsonpublish-config 工作流会自行递增 versionCode)。icon 使用官方站点自带的 https://www.cheaperinference.com/icon.svgapiKeyUrl 暂时指向文档页,请维护者确认。

OpenAI-compatible gateway at https://api.cheaperinference.com/v1, added to both
template files the way every earlier provider was. The icon is the provider own
mark it serves at https://www.cheaperinference.com/icon.svg, the same pattern as
the infistar entry.
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.

1 participant