feat: 添加 Cheaper Inference 模型平台 - #1263
Open
aiapienthusiast wants to merge 1 commit into
Open
aiapienthusiast wants to merge 1 commit into
aiapienthusiast wants to merge 1 commit into
Conversation
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.
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.
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 toprovidersconfig/provider-templates-cn.json— the same entry, as in every earlier provider additionEach insertion is 8 lines. No other line changes. The entry uses the same fields as the existing entries:
key,title,baseURL,apiKeyUrl,iconandenabled.config/config-manifest.jsonstays unchanged. Since7c0ca5e, thepublish-configworkflow bumpsversionCodein its "Prepare manifest" step at publish time.src/needs no change.promotionis not set.src/lib/ai/utils.tsneeds 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:
7c0ca5eadd PackyCodef3557e5add Infistar4cd803a([bug] 自定义模型不能操作 #1196) add the batch of domestic model platformsTesting
Validate config JSON and credentialsstep from.github/workflows/publish-config.ymlruns clean against both files.JSON.stringify(payload, null, 2) + "\n". The formatting is unchanged.keys stay unique in both files.normalizeProviderTemplatesPayloadaccepts the new entry. It passes every filter (enabled,key,title,isValidUrl(baseURL)).excludeBuiltInOpenAIProviderskeeps the entry in the-cnlist. Its key is notchatgptoropenai, and its host is not*.openai.com.Question for the maintainer
apiKeyUrlpoints to the docs page for now. Please confirm the correct target.本次改动仅在
config/provider-templates.json与config/provider-templates-cn.json中各追加一个条目,新增 Cheaper Inference (https://api.cheaperinference.com/v1),它是 OpenAI 兼容网关,无需改动代码。未改动config/config-manifest.json(publish-config工作流会自行递增versionCode)。icon使用官方站点自带的https://www.cheaperinference.com/icon.svg;apiKeyUrl暂时指向文档页,请维护者确认。