Skip to content

feat(provider): add cheapaimodel preset - #116

Open
nicho810 wants to merge 1 commit into
ZCodium-project:mainfrom
nicho810:feat/cheapaimodel-provider
Open

nicho810 wants to merge 1 commit into
ZCodium-project:mainfrom
nicho810:feat/cheapaimodel-provider

Conversation

@nicho810

@nicho810 nicho810 commented Nov 5, 2026 •

Copy link
Copy Markdown

关联 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: template cheapaimodel (openai-chat-completions, base URL https://api.cheapaimodel.ai/v1), placed right after cheaperinference, with deepseek-v4-1-flash and glm-5.3 enabled in templateModelRules.
  • No new providerSiteRules: both models already match generic modelRules, and the limits match the gateway catalog (https://cheapaimodel.ai/models): deepseek-v4-1-flash 1000000 context / 384000 max output, image input; glm-5.3 1000000 / 128000, text only.
  • Logo: light and dark SVG of the official mark from https://cheapaimodel.ai/favicon.svg (background tile removed, square 30x30 viewBox), registered in ProviderLogo.tsx and model-provider-logo-sources.json.
  • The config revision is not changed, same as feat(provider): add Cheaper Inference preset #101.
  • No OAuth flow and no catalog service. The user pastes an API key (keys at https://console.cheapaimodel.ai/keys).

验证

  • zcode-builtin.json and model-provider-logo-sources.json parse as JSON.
  • Checked that deepseek-v4-1-flash matches the .*deepseek-v4[.-]1-flash rule and glm-5.3 the .*glm-5\.3(?:-flash)? rule, and that their context and max output equal the catalog values above.
  • GET https://api.cheapaimodel.ai/v1/models without a key returns 401 (endpoint is up and requires auth).
  • Both SVG logos are square.
  • Not run: pnpm verify:pre-push, Vitest, oxfmt and oxlint; I did not install the repo toolchain.
  • Live check against https://api.cheapaimodel.ai/v1 with a real key, using the same OpenAI-compatible Chat Completions requests the existing path sends: GET /v1/models lists 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 except glm-5.3, which is text only. The two built-in models, deepseek-v4-1-flash (text and image) and glm-5.3 (text only), match the context and modality limits of the existing rules they fall under. I did not run ZCodium itself.

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.

feat(provider): add cheapaimodel as a built-in API-key preset

1 participant