-
Notifications
You must be signed in to change notification settings - Fork 6k
feat: add iFlytek Spark and Astron MaaS providers #9837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5d3f494
d03354d
8b0b02e
9399167
c80f20f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "name": "iflytek", | ||
| "engine": "openai", | ||
| "display_name": "iFlytek Spark", | ||
| "description": "iFlytek Spark (讯飞星火) models via the OpenAI-compatible HTTP API. Authenticate with your Spark HTTP API password (APIPassword). Lists the 4.0Ultra and Max families, which per the Spark HTTP docs accept system messages (always sent by goose). Best used for chat: Spark only returns OpenAI-style tool_calls when the request body sets tool_calls_switch=true, which this declarative config cannot inject, so tool-using extensions may not work as-is.", | ||
| "api_key_env": "SPARK_API_PASSWORD", | ||
| "base_url": "https://spark-api-open.xf-yun.com/v1", | ||
| "dynamic_models": false, | ||
| "skip_canonical_filtering": true, | ||
| "models": [ | ||
| {"name": "4.0Ultra", "context_limit": 8192}, | ||
| {"name": "generalv3.5", "context_limit": 8192}, | ||
| {"name": "max-32k", "context_limit": 32768} | ||
| ], | ||
| "supports_streaming": true, | ||
| "model_doc_link": "https://www.xfyun.cn/doc/spark/HTTP%E8%B0%83%E7%94%A8%E6%96%87%E6%A1%A3.html", | ||
| "setup_steps": [ | ||
| "Sign in to https://xinghuo.xfyun.cn/sparkapi and create or select a Spark model plan", | ||
| "Open the model's 'HTTP 服务接口认证信息' page and copy the APIPassword (each model version has its own password)", | ||
| "Paste the APIPassword above as SPARK_API_PASSWORD" | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| { | ||
| "name": "iflytek_astron", | ||
| "engine": "openai", | ||
| "display_name": "iFlytek Astron MaaS", | ||
| "description": "iFlytek Astron MaaS (讯飞星辰) models via the OpenAI-compatible API. Defaults to the Token Plan endpoint; set ASTRON_BASE_URL to https://maas-coding-api.cn-huabei-1.xf-yun.com/v2 to use the Coding Plan (e.g. astron-code-latest). Each plan has its own API key.", | ||
| "api_key_env": "ASTRON_API_KEY", | ||
| "base_url": "${ASTRON_BASE_URL}", | ||
| "env_vars": [ | ||
| { | ||
| "name": "ASTRON_BASE_URL", | ||
| "required": false, | ||
| "secret": false, | ||
| "default": "https://maas-token-api.cn-huabei-1.xf-yun.com/v2", | ||
| "description": "Astron MaaS API base URL. Use https://maas-coding-api.cn-huabei-1.xf-yun.com/v2 for Coding Plan models like astron-code-latest." | ||
| } | ||
| ], | ||
| "dynamic_models": false, | ||
| "skip_canonical_filtering": true, | ||
| "models": [ | ||
| {"name": "xsparkx2", "context_limit": 131072}, | ||
| {"name": "xsparkx2flash", "context_limit": 131072}, | ||
| {"name": "xopglm51", "context_limit": 204800}, | ||
| {"name": "xopglm5", "context_limit": 204800}, | ||
| {"name": "xopdeepseekv4pro", "context_limit": 131072}, | ||
| {"name": "xopdeepseekv4flash", "context_limit": 131072}, | ||
|
Comment on lines
+24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Astron Token Plan model table documents DeepSeek-V4-Pro and DeepSeek-V4-Flash with 1M context windows (https://www.xfyun.cn/doc/spark/TokenPlan.html), but both entries here are capped at 131072. Because these static limits are copied into the session model config before compaction decisions, users of either V4 model will unnecessarily lose most of the usable context instead of running near the provider's advertised 1M window. Useful? React with 👍 / 👎. |
||
| {"name": "xopdeepseekv32", "context_limit": 131072}, | ||
| {"name": "xopkimik26", "context_limit": 262144}, | ||
| {"name": "xminimaxm25", "context_limit": 131072}, | ||
| {"name": "xopqwen35397b", "context_limit": 262144}, | ||
| {"name": "astron-code-latest", "context_limit": 131072} | ||
| ], | ||
| "supports_streaming": true, | ||
| "preserves_thinking": true, | ||
| "model_doc_link": "https://www.xfyun.cn/doc/spark/TokenPlan.html", | ||
| "setup_steps": [ | ||
| "Sign in to https://maas.xfyun.cn and subscribe to a Token Plan (general models) or Coding Plan (astron-code-latest)", | ||
| "Copy the dedicated API Key for your plan from the subscription page", | ||
| "Paste the API Key above as ASTRON_API_KEY", | ||
| "For Coding Plan, set ASTRON_BASE_URL to https://maas-coding-api.cn-huabei-1.xf-yun.com/v2" | ||
| ] | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For
4.0Ultra, the Spark HTTP docs list Ultra's maximum input length as 32K (https://www.xfyun.cn/doc/spark/HTTP%E8%B0%83%E7%94%A8%E6%96%87%E6%A1%A3.html), but this config advertises only 8192.ProviderEntry::normalize_model_configbackfillsModelConfig.context_limitfrom these JSONModelInfoentries, so 4.0Ultra sessions will compact and drop context around 8K even though the provider accepts much more; please set this entry to the documented window.Useful? React with 👍 / 👎.