Skip to content

feat(providers): add iFlytek MaaS (China) provider - #7057

Open
dongjiang1989 wants to merge 1 commit into
anomalyco:devfrom
dongjiang1989:add-iflytek-provider
Open

dongjiang1989 wants to merge 1 commit into
anomalyco:devfrom
dongjiang1989:add-iflytek-provider

Conversation

@dongjiang1989

Copy link
Copy Markdown

Adds the iFlytek MaaS Inference API provider (讯飞星辰MaaS推理服务, https://maas.xfyun.cn) with 18 models — 4 first-party Spark and 14 third-party (DeepSeek, GLM, Kimi, MiniMax, Qwen).

  • providers/iflytek/provider.toml — OpenAI-compatible endpoint https://maas-api.cn-huabei-1.xf-yun.com/v2, env IFLYTEK_API_KEY
  • providers/iflytek/logo.svg — square currentColor glyph
  • models/iflytek/spark-x2.5 — 293B-A30B MoE flagship, 256K context, 200+ languages, code/agentic focus. Released 2026-09-07 (full inline definition; first-party lab)
  • models/iflytek/spark-x2-flash — lightweight fast model, 256K context
  • models/iflytek/spark-x2.5-4b — 4B edge Dense, native 1M context, open-weight. Hybrid attention (1 full + 3 sliding window layers). Released 2026-09-01
  • models/iflytek/spark-x2.5-1.7b — 1.7B ultra-light edge, native 1M context, open-weight. Released 2026-09-01
  • deepseek-v4-pro / deepseek-v4-flash / deepseek-v3.2base_model = "deepseek/..."
  • glm-5.2 / glm-5.1 / glm-5 / glm-4-7-flashbase_model = "zhipuai/..."
  • kimi-k2.6 / kimi-k2.5base_model = "moonshotai/..."
  • minimax-m2.5base_model = "minimax/MiniMax-M2.5"
  • qwen3.5-397b-a17b / qwen3.6-35b-a3b / qwen3.5-35b-a3b / qwen3-coder-nextbase_model = "alibaba/..."

Data sources (accessed 2026-09-14):

  • https://www.xfyun.cn/doc/spark/%E6%8E%A8%E7%90%86%E6%9C%8D%E5%8A%A1-http.html — Inference API HTTP protocol; OpenAI-compatible chat completions at /v2/chat/completions
  • https://www.xfyun.cn/doc/spark/TokenPlan.html — model IDs and Token Plan point pricing
  • https://maas.xfyun.cn/modelSquare — per-model pay-as-you-go listing
  • Reasoning: all models return message.reasoning_content (interleaved). Spark-X2.5 / Spark-X2-Flash use enable_thinking (bool) + effort high/max; DeepSeek V3.2/V4 use effort none|low|medium|high; GLM-5.x uses effort high|max
  • Tool calling: per host docs, only DeepSeek V3.2 and GLM-4.7 series support tools on this host
  • Pricing: USD per million tokens, converted from CNY at 7.25 CNY/USD. Spark-X2.5 at CNY 3.2/0.48/12 (limited-time 50% off: 1.6/0.24/6); Spark-X2.5-4B/1.7B currently limited-time free (cost = 0); others derived from Token Plan points at ~0.01 CNY/point

Schema: added "spark" to the ModelFamily enum in packages/core/src/family.ts.

Excluded: Token Plan API (maas-token-api.../v2) and Coding Plan API (maas-coding-api.../v2) — separate subscription billing surfaces with distinct API keys and base URLs, could be added as iflytek-token-plan / iflytek-coding-plan later. Spark-X2 and Spark-X2-Agent are decommissioned per Token Plan docs (已下线).

bun validate passes locally (validated against current dev).

@dongjiang1989 dongjiang1989 changed the title feat: add iFlytek (讯飞星辰 MaaS) provider feat: add iFlytek MaaS provider Sep 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/iflytek/models/deepseek-v4-pro.toml:14 - Check: Relay reasoning_options must follow the lab/same-surface baseline for that model (DeepSeek V4: toggle + high/max, not invented L/M/H). Why: First-party providers/deepseek/models/deepseek-v4-pro.toml and established relays (e.g. alibaba-cn, scnet-token-plan, SenseNova) use toggle + high/max. This file authors effort = none|low|medium|high, which invents graded L/M/H the lab maps away and drops the native on/off control. The same shape is repeated on deepseek-v4-flash.toml. Action: Re-author both V4 entries to the host-real intersection with the lab baseline (typically toggle + high/max, or none+high+max only if this host’s sole off switch is reasoning_effort=none); document the exact wire path in a leading comment; do not list low/medium if they collapse to high.
  • [high] [violation] providers/iflytek/models/kimi-k2.6.toml:8 - Check: Kimi reasoning controls must match lab/peer baseline (toggle), not a generic GPT-style effort enum. Why: Lab Moonshot and peers (OpenRouter, Cortecs, Alibaba CN) expose a thinking toggle only. These files invent none|low|medium|high on both kimi-k2.6 and kimi-k2.5, contradicting AGENTS.md baseline rules for relays. Action: Replace with host-verified Kimi controls (almost certainly { type = "toggle" } plus a leading # Toggle: … wire comment), or prove this API uniquely grades Kimi effort.
  • [high] [violation] providers/iflytek/models/minimax-m2.5.toml:8 - Check: Do not invent caller reasoning controls when the lab/peers document none. Why: providers/minimax/models/MiniMax-M2.5.toml and peer relays use reasoning_options = [] (always-on / no control). iFlytek invents none|low|medium|high. Action: Use [] unless this host’s docs/API show a real MiniMax reasoning knob; if they do, cite the wire field and match only real values.
  • [high] [violation] providers/iflytek/models/qwen3.5-397b-a17b.toml:8 - Check: Qwen reasoning_options must follow lab/same-surface controls (toggle + often budget_tokens), not invented L/M/H. Why: First-party Alibaba entries for qwen3.5-397b-a17b, qwen3.6-35b-a3b, and qwen3.5-35b-a3b use toggle + budget_tokens. These three iFlytek files invent none|low|medium|high and omit toggle/budget. Action: Align each Qwen entry to what this host actually forwards (lab-like enable_thinking / thinking_budget, or a documented host-only surface); stop publishing an unsupported L/M/H enum.
  • [high] [violation] providers/iflytek/models/deepseek-v4-pro.toml:13 - Check: Provider capabilities must reflect this host, including tool_call overrides when the host disables tools. Why: PR body, design note, and model comments state tools work only for DeepSeek V3.2 and GLM-4.7 series, but every other third-party entry inherits tool_call = true from lab metadata (DeepSeek V4, GLM-5.x, Kimi, MiniMax, Qwen). Catalog consumers would wrongly assume tool use works. Action: Set tool_call = false on every iFlytek model the host does not support tools for; keep true only where host docs confirm it.
  • [medium] [possible mistake] providers/iflytek/models/glm-5.1.toml:8 - Check: GLM-5.1 / GLM-5 effort set vs lab baseline. Why: First-party Zhipu entries use toggle only for GLM-5.1 and GLM-5; only GLM-5.2 is high/max. iFlytek copies high/max onto 5.1 and 5 without a clear host-vs-lab delta. Action: Verify iFlytek’s wire controls per model ID; use toggle (with leading wire comment) if that is what the API exposes, or keep high/max only with host evidence that those models accept graded effort here.
  • [medium] [possible mistake] providers/iflytek/models/glm-4-7-flash.toml:9 - Check: GLM-4.7-Flash reasoning_options baseline. Why: Lab marks reasoning = true; solid peers use [] (no caller control). This file invents none|low|medium|high while the design note says “none.” Action: Confirm host behavior and set [], toggle-only, or a proven effort list—do not ship an unverified L/M/H enum.
  • [medium] [possible mistake] providers/iflytek/models/deepseek-v3.2.toml:10 - Check: DeepSeek V3.2 options should match this host and peers, not a default L/M/H dump. Why: File comments say reasoning_effort = low|medium|high, but values also include none; common peers use toggle only or L/M/H without none. Action: Author the exact host surface (toggle vs effort, and whether none is valid) and drop values the API does not honor.
  • [medium] [possible mistake] providers/iflytek/models/kimi-k2.5.toml:3 - Check: Host context limits must override inherited lab limits when they differ. Why: Leading comments claim smaller contexts than lab metadata (e.g. Kimi K2.5 128K vs lab 262K; MiniMax 128K vs 204.8K; Qwen 35B variants 128K vs 262K; GLM-4.7-Flash 128K vs 200K) but no [limit] overrides are written, so merge keeps the larger lab contexts. Action: Either add accurate host [limit] overrides or correct the comments if the lab limits apply on this API.
  • [low] [possible mistake] providers/iflytek/models/deepseek-v3.2.toml:6 - Check: Material costs should be tied to direct pay-as-you-go evidence, not only Token Plan point estimates. Why: Several third-party prices are labeled “estimated” / Token Plan ratio conversions; Spark-X2-Flash is also estimated. That weakens review of USD/MTok figures even with the 7.25 CNY rate noted. Action: Prefer model-square or published CNY/MTok list prices per model in the PR body/TOML header (what each URL supports), and mark remaining estimates explicitly if no list price exists.

dongjiang1989 added a commit to dongjiang1989/models.dev that referenced this pull request Sep 15, 2026
Address review feedback on PR anomalyco#7057:

Reasoning options aligned to lab/peer baselines per AGENTS.md relay rules:
- DeepSeek V4 Pro: toggle + high/max (was: invented L/M/H)
- DeepSeek V4 Flash: toggle + low/high/max (was: invented L/M/H)
- DeepSeek V3.2: effort low/medium/high, drop unsupported 'none'
- GLM-5.1 / GLM-5: toggle only (was: invented high/max)
- GLM-5.2: keep high/max (iFlytek host docs confirm; only GLM model with graded effort)
- GLM-4.7-Flash: [] always-on, no caller control (was: invented L/M/H)
- Kimi K2.6 / K2.5: toggle only (was: invented L/M/H)
- MiniMax M2.5: [] always-on, no caller control (was: invented L/M/H)
- Qwen 397B / 3.6-35B / 3.5-35B: toggle + budget_tokens (was: invented L/M/H)
- Spark-X2.5-4B / 1.7B: toggle + low/medium/high for OSS models

Tool calling set to false on all models except DeepSeek V3.2 and GLM-4.7-Flash
(the only two the host docs confirm support tools on this API).

Context limits added where host serves a smaller window than lab:
- GLM-4.7-Flash: 128K (was: inherited lab 200K)
- Kimi K2.5: 128K (was: inherited lab 262K)
- MiniMax M2.5: 128K (was: inherited lab 204.8K)
- Qwen3.6-35B-A3B / Qwen3.5-35B-A3B: 128K (was: inherited lab 262K)

All reasoning controls documented with wire-field references in leading comments.
bun validate passes locally.

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
@dongjiang1989

Copy link
Copy Markdown
Author

Fix github-actions review

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/iflytek/models/qwen3.5-397b-a17b.toml:626 - Check: budget_tokens only when this host exposes a real reasoning-budget field (AGENTS.md / audit skill). Why: providers/iflytek/provider.toml documents Qwen thinking variants on this API as reasoning_effort = low|medium|high (plus max mapping), with no thinking_budget. The Qwen files still author toggle + budget_tokens (and copy max = 81_920 from Alibaba), which invents a DashScope-style budget surface this host summary does not claim. Same pattern in qwen3.5-35b-a3b.toml and qwen3.6-35b-a3b.toml. Action: Align Qwen reasoning_options to the iFlytek wire surface (likely effort and/or a documented on/off field only); remove budget_tokens unless host docs name thinking_budget (or equivalent) and verified bounds.
  • [high] [possible mistake] providers/iflytek/models/kimi-k2.5.toml:481 - Check: Provider overrides must reflect this host’s real modalities/attachments after base_model merge. Why: moonshotai/kimi-k2.5 and kimi-k2.6 inherit attachment = true and input = ["text","image","video"]; alibaba/qwen3.5-* / qwen3.6-35b-a3b inherit image/video/audio. The PR describes a text chat-completions MaaS route and never claims vision/audio on this host, so unresolved multimodal inheritance likely misrepresents the API. Action: If this endpoint is text-only, set attachment = false and override [modalities] to text-only on Kimi/Qwen (and any other multimodal bases); if multimodal is supported, cite host docs that prove it.
  • [high] [possible mistake] providers/iflytek/provider.toml:809 - Check: Relay reasoning_options must be the intersection of lab/peer controls and this host’s request surface; provider docs and model files must agree. Why: Host summary and PR body conflict with authored options: provider.toml says DeepSeek/GLM/Kimi/MiniMax/Qwen use reasoning_effort L/M/H (+ max for some); PR body says DeepSeek is none|low|medium|high and GLM-5.x is high|max; model files use lab-shaped toggle+high/max (V4), L/M/H without none (V3.2), toggle-only (GLM-5/5.1, Kimi), [] (MiniMax, GLM-4.7-Flash), and Qwen budget. Callers will get wrong controls. Action: Reconcile one host truth from iFlytek docs (exact fields per model family), then rewrite each model’s reasoning_options and the provider/PR commentary to match; do not mix lab DashScope/DeepSeek-native shapes that this gateway does not forward.
  • [medium] [possible mistake] providers/iflytek/models/deepseek-v3.2.toml:271 - Check: Hybrid thinking/non-thinking models need an off control (toggle or effort none) when the host exposes one. Why: Comments describe thinking/non-thinking modes, and the PR body lists DeepSeek effort including none, but the file only has low|medium|high with no toggle/none. That encodes graded effort while omitting the documented off path. Action: Verify the V3.2 wire control on this host; add none and/or toggle (with a leading wire comment) if off is supported, or correct the PR/host comments if thinking is always on.
  • [medium] [violation] providers/iflytek/models/kimi-k2.5.toml:483 - Check: Every toggle needs a leading top-of-file comment with the exact wire path. Why: Kimi files only say “reasoning enabled/disabled per host docs” with no field path (enable_thinking, thinking.type, reasoning.enabled, etc.). Same on kimi-k2.6.toml. Action: Document the precise request field/values iFlytek accepts for Kimi on/off (or drop toggle if the host only has effort/always-on).
  • [medium] [possible mistake] providers/iflytek/models/glm-4-7-flash.toml:367 - Check: Context overrides must match the host and not misstate the lab baseline. Why: Comment says “128K context on this host (matches lab)” while models/zhipuai/glm-4.7-flash.toml has context = 200_000. Either the host limit or the comment is wrong. Action: Confirm iFlytek’s context for GLM-4.7-Flash; keep 128_000 only if the host is actually 128K, and fix the comment (or remove the override if the host matches the 200K lab value).
  • [low] [possible mistake] providers/iflytek/models/deepseek-v4-flash.toml:296 - Check: Provider cost must be this host’s USD/MTok price, not another lab’s list price. Why: Flash pricing is attributed to “DeepSeek official” rather than iFlytek Token Plan/modelSquare; several other models use rough “~0.01 CNY/point” estimates; Spark-X2.5 comments claim limited-time 50% off while costs look like full CNY 3.2/12. Action: Re-derive costs from iFlytek pay-as-you-go or Token Plan with an explicit CNY→USD rate/date, and make promo vs list price consistent in comment and numbers.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/iflytek/models/deepseek-v4-pro.toml:14 - Check: After base_model, provider files must be override-only (no restated identical lab fields). Why: These entries restate values already true on the lab base — attachment = false and text-only [modalities] on DeepSeek V4 Pro/Flash, all GLM models, and MiniMax M2.5 (bases are already text-only / attachment = false). That breaks the override-only merge convention and will keep drifting from lab metadata. Action: Remove redundant attachment and [modalities] from deepseek-v4-pro.toml, deepseek-v4-flash.toml, glm-5.2.toml, glm-5.1.toml, glm-5.toml, glm-4-7-flash.toml, and minimax-m2.5.toml. Keep only real deltas (tool_call, context/output limits, multimodal→text on Kimi/Qwen, cost, reasoning_options, interleaved).
  • [medium] [possible mistake] models/iflytek/spark-x2.5-4b.toml:9 - Check: Lab tool_call is provider-agnostic model capability, not host API support. Why: Description claims “agentic, tool-use” and the model is open-weight, but tool_call = false. Host tool limits belong on the provider file; lab false understates the model if weights/docs support tools. Action: Set lab tool_call = true if the model supports tools (and keep tool_call = false only on the iFlytek provider entry if that API lacks tools), or drop “tool-use” from the lab description if the model truly cannot call tools.
  • [medium] [possible mistake] providers/iflytek/models/spark-x2.5.toml:21 - Check: Published cost must match the price band the comment claims. Why: Comment says CNY 3.2 / 0.48 / 12 with “limited-time 50% off,” and USD values match full CNY÷7.25 (~0.44 / 0.07 / 1.65), not half. Unclear whether 3.2 is list or promo. Action: Clarify in the leading comment and set cost to the currently billed USD/MTok (promo if that is what customers pay now, otherwise list with promo noted separately).
  • [low] [possible mistake] providers/iflytek/models/qwen3.5-397b-a17b.toml:29 - Check: Relay reasoning_options must match this host’s wire surface and lab/same-surface peers, not an invented L/M/H enum. Why: Alibaba lab/peers use toggle + budget_tokens (or toggle-only on OpenRouter). These files add effort low|medium|high with no budget_tokens, citing host “OSS” docs. If the host only forwards enable_thinking, graded effort is incorrect. Action: Confirm iFlytek docs for these three Qwen IDs actually accept reasoning_effort=low|medium|high; if not, use toggle only (or the real host control). Keep the leading toggle wire comment either way.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/iflytek/models/spark-x2.5-4b.toml:11 - Check: Provider models must reflect this host’s real tool-calling support; lab tool_call must be overridden when the host differs. Why: Lab models/iflytek/spark-x2.5-4b.toml sets tool_call = true, and this provider file does not override it. The PR states tool calling on iFlytek is only for DeepSeek V3.2 and GLM-4.7-Flash, so the resolved Spark X2.5 4B entry would incorrectly advertise tools. Action: Set tool_call = false on this provider model (and any other Spark entry that would otherwise inherit true).
  • [high] [violation] providers/iflytek/models/qwen3.5-397b-a17b.toml:24 - Check: Relay reasoning_options must follow the lab/same-surface peer baseline for that model; do not invent low/medium/high when native/peers use a different control set. Why: Alibaba first-party Qwen 3.5/3.6 entries use toggle + budget_tokens. Same-surface OpenAI-compat peers without DashScope budget typically keep toggle only (e.g. TokenGo). These files add toggle + effort low|medium|high by reading host text “仅针对OpenAI开源的OSS模型生效” as applying to any open-weight model; that phrase targets OpenAI OSS (gpt-oss), not Qwen. That invents a GPT-style effort ladder the lab does not use. Same shape is repeated on qwen3.6-35b-a3b.toml and qwen3.5-35b-a3b.toml. Action: Drop the invented effort list unless host docs name these Qwen IDs with those exact reasoning_effort values. Default to lab/peer baseline: toggle only (no budget_tokens if the host truly lacks it). Keep a leading wire comment for enable_thinking.
  • [medium] [possible mistake] providers/iflytek/models/deepseek-v3.2.toml:12 - Check: DeepSeek V3.2 relay options should match hybrid on/off peers unless this host documents graded effort for this ID. Why: Established relays mostly expose a toggle only (OpenRouter, TokenGo, Novita, etc.). This entry uses effort none|low|medium|high justified as a generic “OSS models” surface—the same over-broad reading as the Qwen case—rather than a DeepSeek-V3.2-specific control list. Action: Verify iFlytek docs for model ID deepseek-v3.2. If only on/off exists, use [{ type = "toggle" }] with a thinking.type / equivalent wire comment. Keep none|low|medium|high only if the host documents those exact values for this model.
  • [medium] [possible mistake] providers/iflytek/models/spark-x2.5-1.7b.toml:16 - Check: First-party Spark reasoning controls should be consistent with this lab’s documented surface, not a generic OSS L/M/H ladder. Why: Spark X2.5 / X2 Flash on the same host use toggle + high/max, while the 1.7B and 4B entries use low/medium/high only via the “OSS models” reasoning_effort claim. That split needs model-specific host evidence. Action: Confirm iFlytek docs for spark-x2.5-1.7b and spark-x2.5-4b. Align effort values with the documented Spark control set (likely high/max like the flagship files, or another verified list)—do not keep L/M/H solely because the models are open-weight.
  • [medium] [possible mistake] providers/iflytek/models/qwen3.5-397b-a17b.toml:4 - Check: Provider limit.context must override the lab when the host context window differs. Why: The leading comment says this host serves 256K while the lab base is 262K (262_144), but the file has no [limit] override, so merge keeps 262_144. Other iFlytek models that shrink context (Kimi K2.5, MiniMax M2.5, Qwen 35B) do set context. Action: If Token Plan is truly 256000 (or another value ≠ 262_144), add [limit] context = …. If 256K means 262_144, fix the comment so it does not claim a host/lab delta.
  • [low] [possible mistake] providers/iflytek/models/deepseek-v3.2.toml:8 - Check: Non-USD costs must be converted with a clear rate/date and evidence tied to published prices. Why: Most third-party costs are derived from Token Plan points × “~0.01 CNY/point” × 7.25 CNY/USD. The tilde and missing first-party USD (or exact point→CNY) mapping make the USD/MTok figures hard to review. Action: In the PR body or leading comments, cite the Token Plan rule that defines CNY (or USD) per point and map point→USD for each model; replace ~0.01 with the documented factor.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/iflytek/models/spark-x2.5-1.7b.toml:15 - Check: Override-only base_model files must not restate identical lab values. Why: Lab models/iflytek/spark-x2.5-1.7b.toml already has tool_call = false, so the provider tool_call = false is a redundant copy, which is a merge blocker. Action: Remove the redundant tool_call line from the provider file (keep overrides only when they differ from the lab entry).
  • [medium] [possible mistake] providers/iflytek/models/glm-4-7-flash.toml:12 - Check: Relay reasoning_options must match this host’s controls, using first-party/same-surface peers as baseline; [] means affirmative no caller control. Why: First-party providers/zai/models/glm-4.7-flash.toml and peers such as OpenRouter use toggle, while this file sets reasoning_options = [] and only vaguely cites a mixed peer baseline. If iFlytek exposes on/off (e.g. enable_thinking), [] understates caller control. Action: Confirm against the cited iFlytek docs whether GLM-4.7-Flash reasoning is truly uncontrollable on this host; if a toggle exists, set reasoning_options = [{ type = "toggle" }] with a leading wire-path comment; if docs affirm no control, keep [] and state that host-doc evidence explicitly in the leading comment.
  • [medium] [possible mistake] models/iflytek/spark-x2.5.toml:9 - Check: Lab metadata is provider-agnostic model capability; host limits belong on the provider entry. Why: spark-x2.5 and spark-x2-flash set lab tool_call = false while described as agentic/code models, and sibling lab spark-x2.5-4b correctly uses tool_call = true with a provider-side false override for this text-only host. Embedding the host’s tool restriction into lab Spark metadata is inconsistent and may be wrong if the models support tools. Action: Verify whether Spark X2.5 / X2 Flash support tool calling as models; if yes, set lab tool_call = true and add tool_call = false only on the iFlytek provider files (as done for 4B and third-party models).

Adds the iFlytek MaaS Inference API provider (讯飞星辰MaaS推理服务, https://maas.xfyun.cn) with 18 models — 4 first-party Spark and 14 third-party (DeepSeek, GLM, Kimi, MiniMax, Qwen).

Provider: providers/iflytek/
- API: https://maas-api.cn-huabei-1.xf-yun.com/v2 (OpenAI-compatible, text-only)
- env: IFLYTEK_API_KEY
- npm: @ai-sdk/openai-compatible

Lab models (models/iflytek/):
- spark-x2.5: 293B-A30B MoE flagship, 256K context, tool_call=true
- spark-x2-flash: lightweight fast model, 256K context, tool_call=true
- spark-x2.5-4b: 4B edge Dense, 1M context, open-weight, tool_call=true
- spark-x2.5-1.7b: 1.7B ultra-light edge, 1M context, open-weight

Provider models (18 total) — override-only after base_model merge:
- Spark (first-party): spark-x2.5, spark-x2-flash, spark-x2.5-4b, spark-x2.5-1.7b
  (tool_call overridden to false on all 4 — host lacks tool support)
- DeepSeek: deepseek-v4-pro, deepseek-v4-flash, deepseek-v3.2
- GLM/Zhipu: glm-5.2, glm-5.1, glm-5, glm-4-7-flash
- Kimi/Moonshot: kimi-k2.6, kimi-k2.5
- MiniMax: minimax-m2.5
- Qwen/Alibaba: qwen3.5-397b-a17b, qwen3.6-35b-a3b, qwen3.5-35b-a3b, qwen3-coder-next

Reasoning controls (per iFlytek host docs, aligned with lab/peer baselines):
- DeepSeek V4 Pro: toggle (thinking.type) + effort high/max
- DeepSeek V4 Flash: toggle (thinking.type) + effort low/high/max
- DeepSeek V3.2: toggle (thinking.type) only (matches OpenRouter/TokenGo/Novita)
- GLM-5.2: effort high/max (only GLM with graded effort on this host)
- GLM-5.1/GLM-5: toggle (enable_thinking) only
- GLM-4.7-Flash: toggle (enable_thinking) (matches first-party zhipuai baseline)
- Kimi K2.6/K2.5: toggle (enable_thinking) only
- MiniMax M2.5: [] always-on, no caller control (matches minimax first-party,
  opencode, alibaba-token-plan-cn, cortecs, ollama-cloud peers)
- Qwen 397B/3.6-35B/3.5-35B: toggle (enable_thinking) only — host 'OSS'
  phrase targets OpenAI OSS gpt-oss, not Qwen; no budget_tokens (host lacks
  thinking_budget); no graded effort
- Qwen3-Coder-Next: non-reasoning
- Spark-X2.5/Flash/4B/1.7B: toggle (enable_thinking) + high/max (same surface)

All toggle models have leading '# Toggle: <field> = <values>' wire comments.
No redundant restated lab values (attachment, modalities, tool_call only
overridden when they differ from the lab entry).

Context limit overrides (host < lab):
- GLM-4.7-Flash: 128K (lab 200K)
- Kimi K2.5: 128K (lab 262K)
- MiniMax M2.5: 128K (lab 204.8K)
- Qwen3.5-397B-A17B: 256K (lab 262K)
- Qwen3.6-35B-A3B / Qwen3.5-35B-A3B: 128K (lab 262K)

Multimodal override: attachment=false + text-only [modalities] on Kimi and
Qwen (base labs are multimodal; iFlytek endpoint is text-only).

Pricing: USD per million tokens from Token Plan points at 0.01 CNY/point
(1 point ≈ 0.01 CNY per Token Plan doc: 200 CNY / 20000 points for standard
members), converted at 7.25 CNY/USD. Spark-X2.5 uses list price (CNY
3.2/0.48/12); 50% promo noted separately. Spark-X2.5-4B/1.7B currently
limited-time free (cost = 0).

Schema: added 'spark' to ModelFamily enum in packages/core/src/family.ts.

Data sources (accessed 2026-09-14):
- https://www.xfyun.cn/doc/spark/推理服务-http.html
- https://www.xfyun.cn/doc/spark/TokenPlan.html
- https://maas.xfyun.cn/modelSquare

Excluded: Token Plan API and Coding Plan API (separate billing surfaces),
Spark-X2/Spark-X2-Agent (decommissioned).

bun validate passes locally.

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Sep 15, 2026
@dongjiang1989 dongjiang1989 changed the title feat: add iFlytek MaaS provider feat: add iFlytek MaaS (China) provider Sep 15, 2026
@dongjiang1989

Copy link
Copy Markdown
Author

bun validate passes locally with the updated files.

@rekram1-node PTAL, when you have time

@dongjiang1989 dongjiang1989 changed the title feat: add iFlytek MaaS (China) provider feat(providers): add iFlytek MaaS (China) provider Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer: ready Automated review found no actionable items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant