Repository navigation
Conversation
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.
关联 Issue
Closes #115
变更说明
Adds cheapaimodel as a built-in API-key provider preset. Mirrors #101 (Cheaper Inference).
I work on cheapaimodel. It is an OpenAI-compatible LLM gateway billed per token from a prepaid USD balance.
config/provider/zcode-builtin.json: templatecheapaimodel(openai-chat-completions, base URLhttps://api.cheapaimodel.ai/v1), placed right aftercheaperinference, withdeepseek-v4-1-flashandglm-5.3enabled intemplateModelRules.providerSiteRules: both models already match genericmodelRules, and the limits match the gateway catalog (https://cheapaimodel.ai/models):deepseek-v4-1-flash1000000 context / 384000 max output, image input;glm-5.31000000 / 128000, text only.ProviderLogo.tsxandmodel-provider-logo-sources.json.revisionis not changed, same as feat(provider): add Cheaper Inference preset #101.验证
zcode-builtin.jsonandmodel-provider-logo-sources.jsonparse as JSON.deepseek-v4-1-flashmatches the.*deepseek-v4[.-]1-flashrule andglm-5.3the.*glm-5\.3(?:-flash)?rule, and that their context and max output equal the catalog values above.GET https://api.cheapaimodel.ai/v1/modelswithout a key returns 401 (endpoint is up and requires auth).pnpm verify:pre-push, Vitest, oxfmt and oxlint; I did not install the repo toolchain.https://api.cheapaimodel.ai/v1with a real key, using the same OpenAI-compatible Chat Completions requests the existing path sends:GET /v1/modelslists the models, and all five (deepseek-v4-1-flash,glm-5.3,glm-5.3-flash,kimi-k3,grok-4.7) answer non-streaming and streaming requests and make tool calls. Image input works on all of them exceptglm-5.3, which is text only. The two built-in models,deepseek-v4-1-flash(text and image) andglm-5.3(text only), match the context and modality limits of the existing rules they fall under. I did not run ZCodium itself.