feat(spark): add iFLYTEK Spark model provider - #13167
Open
FenjuFu wants to merge 1 commit into
Open
Conversation
Spark exposes an OpenAI-compatible HTTP endpoint at https://spark-api-open.xf-yun.com/v1 that authenticates with a single Bearer API Password, so the provider is a thin OpenAI wrapper. Wires up the LLM class, openai-adapters api, llm-info metadata, config-types, autodetect, GUI add-model config and docs. Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com>
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
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.
Description
Adds iFLYTEK Spark (讯飞星火) as a model provider. Spark is one of the major
Chinese foundation models still missing from Continue (DeepSeek, MiniMax,
Moonshot, MiMo, zAI and others are already supported), so this fills that gap.
Spark exposes an OpenAI-compatible HTTP endpoint at
https://spark-api-open.xf-yun.com/v1authenticated with a single Bearer APIPassword, so the provider is a thin
OpenAIwrapper — the same shape as therecently merged MiniMax provider (#11367).
Wired up end to end, mirroring the MiniMax addition:
core/llm/llms/Spark.ts+ registration incore/llm/llms/index.tspackages/openai-adapters/src/apis/Spark.ts+index.tscase +types.tsconfig schemapackages/llm-info/src/providers/spark.ts+index.ts(model metadata for the 6 public models)packages/config-typesprovider enum +core/llm/autodetect.ts(templating / parallel lists)gui/src/pages/AddNewModel/configs/{models,providers}.ts)Default model is
4.0Ultra;generalv3.5(Max),max-32k,generalv3(Pro),pro-128kandliteare also selectable.Checklist
Tests
No unit tests were added — this follows the same pattern as the existing MiniMax
provider (which ships as a config-only OpenAI-compatible wrapper). Happy to add
coverage under
packages/openai-adaptersif you'd prefer. I wasn't able to runthe full monorepo build/lint locally; flagging so CI can validate formatting.
Notes
apiKeyis the API Password for the Spark HTTP service(
http服务接口认证信息→APIPasswordin the console), distinct from theAPPID/APIKey/APISecret triple used by Spark's legacy WebSocket API.