nc://alibaba-token-plan

v0.1.0Pinned
Backnodecode-ai
pomterrecells: thirty-three cells, ported from oh-my-pi -- providers oh-my-pi carries (can1357/oh-my-pi at c9383c1, MIT, credited in each folder's NOTICE), each as a cell of its own: Alibaba's Coding and Token Plans, Amazon Bedrock, Anthropic's Pro/Max sign-in, Apple's on-device Foundation Models (macOS), Azure OpenAI, ClinePass, Cloudflare AI Gateway, Cursor, Devin, Factory Droid, GitHub Copilot, GitLab Duo and its agent, Antigravity, the Gemini CLI's Cloud Code Assist, Vertex AI, Kilo, Kimi Code, local ONNX and MLX workers, Muse Code, Ollama Cloud, ChatGPT's Codex sign-in and its device-code variant, OpenRouter, Snowflake Cortex, xAI's SuperGrok sign-in, Xiaomi MiMo and Z.AI's Coding Plan; and four that are not chat providers: language servers (nodecode-lsp), Perplexity search, keyless web search engines (nodecode-web-provider) and TypeSafe judgments. Each stands alone: it loads, starts, stops and tests by itself, depends only on nodecode, and shares no code with another; one whose wire none of the four lanes speaks registers a lane of its own. Written against the cell contract (src/CELLS.md) at nodecode fb4bdabc1. Their tests ran green against that tree with no network (~/nodecode-cells/tools/test-cell.sh, 663 tests over the 33, 0 failed).914a3fe· 8 Oct1 commit
test1 filecell.lisp4.4 KBprovider.lisp6.2 KB

nodecode-alibaba-token-plan

A Nodecode cell for the QwenCloud Token Plan, Alibaba's token subscription (Qwen3.8, Qwen3.7, GLM-5.2 and DeepSeek V4 Pro). With it, /connect offers QwenCloud Token Plan, /models lists the plan's models, and a turn on alibaba-token-plan/<model> goes to the plan's endpoint in your region over the OpenAI chat wire, asking a reasoning model to think in its own dialect.

Ported from oh-my-pi's alibaba-token-plan provider. See NOTICE.

What omp's login does, and how this cell carries it

omp's login for this provider is a custom one, but it signs nothing in. The Token Plan is sold as two regional products whose keys do not cross, so the login asks:

  1. Which region: 1 International, Singapore (the default, https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1), 2 China, Beijing (https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1), or 3 a custom base URL.
  2. The key (sk-sp-...), from that region's console. It checks the key with GET <base>/models.
  3. Optionally, the Cookie header of the console's usage request, copied from the browser's DevTools, for quota reporting.

It keeps a region other than the default inside the credential, so both inference and model discovery go there. Here:

  • Region. The section's "region": "international" (the default) or "china".
  • Custom base. "base_url", when set, wins over the region, as omp's option 3 does.
  • Key. Save it with /connect, or set ALIBABA_TOKEN_PLAN_API_KEY (or BAILIAN_TOKEN_PLAN_API_KEY). A saved key wins over the variables. /connect checks a key against the region's /models listing before it saves it, as omp's login does. OPENAI_API_KEY is never sent: omp refuses that fallback for this provider by name.

Where to subscribe and copy the key: <https://home.qwencloud.com/billing/subscription/token-plan-individual> for the international plan, <https://www.aliyun.com/benefit/scene/tokenplan> for the China one.

Models

The bundled rows are the provider rule's seed: the plan's documented Individual text models. They outrank a same-id row from models.dev, as omp's seed precedence has it. The core also lists the region's /models once a key is saved, which is omp's credentialed discovery.

Thinking

omp's rule for this provider is the Qwen dialect: for a reasoning model, an effort sends enable_thinking: true and no reasoning_effort, and off sends enable_thinking: false. Qwen3.8 Max and Qwen3.8 Flash take both while they think: enable_thinking: true and reasoning_effort for the depth (Max's rungs are low, medium, xhigh). Not thinking, they send enable_thinking: false like the rest. Qwen3.8 Max Preview stays on the switch alone. With no effort set, nothing is sent, so the plan's default applies, as the chat lane does for every provider.

Install

Copy this folder into ~/.nodecode/cells/nodecode-alibaba-token-plan/ and restart Nodecode, or run (restart-cells).

Configure

Optional. The section is on unless it says "enabled": false:

{
  "alibaba-token-plan": {
    // where the plan was bought: international (Singapore) or china (Beijing)
    "region": "international"
    // another regional endpoint, or a proxy; set, it wins over region
    // "base_url": "https://token-plan.<region>.maas.aliyuncs.com/compatible-mode/v1"
  }
}

Not ported

  • Quota reporting. omp reads the plan's usage from the console's private usage API, with a browser session cookie the operator copies out of DevTools at login. The cell neither asks for nor keeps that cookie.
  • omp's structured credential ({"token", "cookie", "baseUrl"} as one JSON string). The region lives in the section instead, so a plain key is all /connect needs.
  • The token grammar check (sk-...) omp applies before a request.
  • omp's discovery filter and per-model limits for listed models the seed does not carry.

Test

From this repository's root:

tools/test-cell.sh nodecode-alibaba-token-plan

MIT licensed.

Add nc://alibaba-token-plan

  1. 1

    Install Nodecode

    Once per machine.

    $ curl -fsSL https://nodecode.ai/install.sh | sh
  2. 2

    Add the cell

    Pinned at 914a3fe.

    $ nodecode add nc://alibaba-token-plan

    Or tell the agent add the alibaba token plan cell.

  3. 3

    Add your key

    Run /connect, pick QwenCloud Token Plan and paste your key.