#3902·WeKnora

[Feature]: add iFlytek Astron MaaS (讯飞星辰) as a built-in model vendor

Author: FenjuFuCreated Sep 30, 2026Updated Sep 30, 2026

Affected Component

Model Service

Problem Description

WeKnora has no built-in vendor for iFlytek's Astron MaaS (讯飞星辰 MaaS). Users of the Astron Token Plan, which serves iFlytek's own Spark-X2.5 plus hosted GLM, DeepSeek, Kimi and Qwen models under one key, have to fall back to the generic vendor. That vendor sends max_completion_tokens and no thinking switch, and it has no catalog: there are no context windows, no image flags and no model list for the picker.

The API ids are also not the display names (xopglm52, xopdeepseekv4pro, xsparkx2flash, ...), so users have to look them up by hand.

Proposed Solution

Add an iflytek vendor on the protocol + vendor + catalog structure from #3470 / #3589:

  • Base URL https://maas-token-api.cn-huabei-1.xf-yun.com/v2, Bearer auth (Token Plan doc).
  • URL pattern cn-huabei-1.xf-yun.com, so pay-as-you-go maas-api rows are detected too. It does not match spark-api-open.xf-yun.com, the older Spark HTTP API, which needs a different request shape.
  • Compat from the inference reference: max_tokens, top-level enable_thinking, and tool_choice none/auto/required. GLM-5.2 and DeepSeek-V4 also get reasoning_effort graded high/max.
  • Catalog: the 16 model ids in the Token Plan table, plus the two retired ones marked deprecated.

The docs leave several things open or get them wrong: whether tools work (the reference says only DeepSeek V3.2 and GLM-4.7), whether images are accepted, and whether required is honoured. So I tested every model against the live endpoint with a Token Plan key and wrote the per-model flags from those results:

Result on the Token Plan endpoint (2026-09-30)
enable_thinking true / false toggles reasoning_content on every reasoning model (MiniMax-M2.5 aside). Spark-X2.5 and Spark-X2-Flash reason even when the field is omitted
tools, tool_choice: auto tool_calls from every model except MiniMax-M2.5, streaming and non-streaming, including a replayed assistant turn that carries reasoning_content + tool_calls
tool_choice: required honoured by DeepSeek-V4-Pro, the Qwen models and GLM-4.7-Flash; silently answered in text by Spark, GLM-5.x and Kimi
image input read correctly by Kimi-K2.6, Qwen3.5-397B-A17B, Qwen3.6-35B-A3B and Qwen3.5-35B-A3B. Kimi-K2.5 (listed as "多模输入") returns 400
cache counters prompt_tokens_details.cached_tokens on a repeated prefix
developer role 400 on Kimi, Qwen3.5/3.6 and Spark-X2-Flash

MiniMax-M2.5 answered every request with finish_reason: "abort" and no tokens. xopdeepseekv4flash and xopdeepseekv32 are refused for a standard seat (code 11221). Those three keep the documented values and are marked unverified in the vendor file.

Alternatives

Keep using generic. That works for plain chat, but it sends max_completion_tokens instead of the documented max_tokens, cannot switch thinking, and leaves the model picker empty.

Impact

Many users would benefit

Use Case

Knowledge-base QA and agent mode on Spark-X2.5 through an Astron Token Plan subscription. For self-hosting, the Spark-X2.5 weights are also published at https://huggingface.co/XHToken; those deployments stay on generic.

Additional Information

I have a PR ready that implements this and will link it here.