Files
ragflow/conf/models/aliyun.json

91 lines
1.7 KiB
JSON
Raw Normal View History

{
2026-07-09 10:19:10 +08:00
"name": "Tongyi-Qianwen",
"rank": 983,
"url": {
"default": "https://dashscope.aliyuncs.com",
"singapore": "https://dashscope-intl.aliyuncs.com",
"us": "https://dashscope-us.aliyuncs.com"
},
"url_suffix": {
"chat": "compatible-mode/v1/chat/completions",
"embedding": "compatible-mode/v1/embeddings",
"rerank": "compatible-api/v1/reranks",
"models": "compatible-mode/v1/models",
"tts": "compatible-mode/v1/audio/speech"
},
"models": [
{
"name": "qwen-flash",
"content_length": 1048576,
"max_output": 8192,
"model_types": [
"chat"
],
"tools": {
"support": true
}
Go: implement Encode (embeddings) in Aliyun driver (#14647) ### What problem does this PR solve? The Aliyun Go driver shipped with a stub \`Encode\` method that returned \`no such method\`, even though \`conf/models/aliyun.json\` already wires the OpenAI-compatible embeddings URL suffix at \`compatible-mode/v1/embeddings\`. The same config also did not list any embedding models, so the picker had nothing to select. So an Aliyun tenant who wanted to use Tongyi text-embedding-v3 or v4 in the Go layer could not, even though the upstream endpoint is public and uses the standard \`POST /v1/embeddings\` shape that the SiliconFlow and ZhipuAI drivers already support. This PR fills the gap. ### What this PR includes - \`conf/models/aliyun.json\`: add \`text-embedding-v4\` and \`text-embedding-v3\` to the \`models\` array. - \`internal/entity/models/aliyun.go\`: replace the \`Encode\` stub with a real implementation. Adds a small local response type that matches the OpenAI-compatible shape. No factory change. No interface change. ### How the driver works - Validate \`apiConfig\` and the API key, validate the model name, resolve the region with a default fallback, build the URL from \`BaseURL[region] + URLSuffix.Embedding\`. - Send all input texts in one request as the \`input\` array, the same OpenAI-compatible shape the SiliconFlow \`Encode\` uses. - Parse \`data[*].embedding\` and copy each slice into a \`[][]float64\` indexed by \`data[*].index\` so the output order matches the input order even if the API returns items in a different order. - Handle both \`float64\` and \`float32\` element types. - Empty input returns \`[][]float64{}\` with no HTTP call. - Non-200 responses propagate the upstream status line and body. - A final pass checks every input slot got a vector and returns a clear error if any slot is still nil. ### Type of change - [x] New Feature (non-breaking change which adds functionality) ### How was this tested? - \`go build ./internal/entity/models/...\` in a clean go 1.25 image returns exit 0. - The full method set on \`AliyunModel\` still matches the \`ModelDriver\` interface. - Pattern parity with the existing SiliconFlow Encode implementation. Closes #14646 --------- Co-authored-by: Jin Hai <haijin.chn@gmail.com>
2026-05-08 07:58:25 +02:00
},
{
"name": "text-embedding-v4",
"max_tokens": 8192,
"model_types": [
"embedding"
feat: add batch_size to all embedding model configs (#17877) ## Summary Add a `batch_size` field to every embedding model entry in `conf/models/*.json`. The field represents the maximum number of text inputs that can be submitted to the embedding API in a single request. **75 embedding models across 30 config files** now carry a `batch_size`. Values were verified against each provider's official documentation (see the verification table at `Desktop/embedding_models_verified.md`). ## Distribution | batch_size | # models | Provider / Model | |---|---|---| | 1 | 2 | AWS Bedrock `amazon.titan-embed-text-v1/v2:0` — Bedrock `invoke` accepts a single input per call | | 10 | 3 | Aliyun `text-embedding-v3/v4`, Volcengine `doubao-embedding-vision-251215` | | 16 | 5 | BaiChuan `Baichuan-Text-Embedding`, Baidu Qianfan `embedding-v1`, Mistral `mistral-embed`, Replicate (x2) | | 32 | 10 | NVIDIA NIM (x3), SILICONFLOW (x2), PPIO (x3), GiteeAI `bge-m3`, HuaweiCloud `bge-m3` | | 50 | 4 | Tencent Hunyuan `kinfra` embeddings (x4) — `InputList.N` max 50 | | 96 | 8 | Cohere embed-v3/v4 (x5), Bedrock Cohere (x3) | | 100 | 3 | Google Gemini `text-embedding-004`, Upstage (x2) | | 512 | 5 | Zhipu GLM `embedding-2/3` (x2), Perplexity `pplx-embed` (x2), Astraflow `text-embedding-3-large` | | 1000 | 9 | Voyage AI (x9) — API reference max | | 1024 | 1 | DeepInfra `Qwen/Qwen3-Embedding-4B` | | 2048 | 15 | OpenAI (x3) + OpenAI-API-compatible proxies (CometAPI, n1n, Jiekou.AI, GreenPT, TogetherAI, NovitaAI) — OpenAI contract limit | | 16384 | 10 | Jina (x8), 302.AI, GiteeAI `jina-clip-v2` — no documented Jina batch limit, safe high cap | --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-06 10:47:38 +08:00
],
"max_batch_size": 10
Go: implement Encode (embeddings) in Aliyun driver (#14647) ### What problem does this PR solve? The Aliyun Go driver shipped with a stub \`Encode\` method that returned \`no such method\`, even though \`conf/models/aliyun.json\` already wires the OpenAI-compatible embeddings URL suffix at \`compatible-mode/v1/embeddings\`. The same config also did not list any embedding models, so the picker had nothing to select. So an Aliyun tenant who wanted to use Tongyi text-embedding-v3 or v4 in the Go layer could not, even though the upstream endpoint is public and uses the standard \`POST /v1/embeddings\` shape that the SiliconFlow and ZhipuAI drivers already support. This PR fills the gap. ### What this PR includes - \`conf/models/aliyun.json\`: add \`text-embedding-v4\` and \`text-embedding-v3\` to the \`models\` array. - \`internal/entity/models/aliyun.go\`: replace the \`Encode\` stub with a real implementation. Adds a small local response type that matches the OpenAI-compatible shape. No factory change. No interface change. ### How the driver works - Validate \`apiConfig\` and the API key, validate the model name, resolve the region with a default fallback, build the URL from \`BaseURL[region] + URLSuffix.Embedding\`. - Send all input texts in one request as the \`input\` array, the same OpenAI-compatible shape the SiliconFlow \`Encode\` uses. - Parse \`data[*].embedding\` and copy each slice into a \`[][]float64\` indexed by \`data[*].index\` so the output order matches the input order even if the API returns items in a different order. - Handle both \`float64\` and \`float32\` element types. - Empty input returns \`[][]float64{}\` with no HTTP call. - Non-200 responses propagate the upstream status line and body. - A final pass checks every input slot got a vector and returns a clear error if any slot is still nil. ### Type of change - [x] New Feature (non-breaking change which adds functionality) ### How was this tested? - \`go build ./internal/entity/models/...\` in a clean go 1.25 image returns exit 0. - The full method set on \`AliyunModel\` still matches the \`ModelDriver\` interface. - Pattern parity with the existing SiliconFlow Encode implementation. Closes #14646 --------- Co-authored-by: Jin Hai <haijin.chn@gmail.com>
2026-05-08 07:58:25 +02:00
},
{
"name": "qwen3-vl-plus",
"content_length": 262144,
"max_output": 8192,
"model_types": [
"vision",
"chat"
],
"tools": {
"support": true
}
},
{
"name": "qwen-tts-flash",
"model_types": [
"tts"
]
},
{
"name": "qwen-asr-flash",
"model_types": [
"asr"
]
},
{
"name": "fun-asr",
"model_types": [
"asr"
]
},
Go: implement Encode (embeddings) in Aliyun driver (#14647) ### What problem does this PR solve? The Aliyun Go driver shipped with a stub \`Encode\` method that returned \`no such method\`, even though \`conf/models/aliyun.json\` already wires the OpenAI-compatible embeddings URL suffix at \`compatible-mode/v1/embeddings\`. The same config also did not list any embedding models, so the picker had nothing to select. So an Aliyun tenant who wanted to use Tongyi text-embedding-v3 or v4 in the Go layer could not, even though the upstream endpoint is public and uses the standard \`POST /v1/embeddings\` shape that the SiliconFlow and ZhipuAI drivers already support. This PR fills the gap. ### What this PR includes - \`conf/models/aliyun.json\`: add \`text-embedding-v4\` and \`text-embedding-v3\` to the \`models\` array. - \`internal/entity/models/aliyun.go\`: replace the \`Encode\` stub with a real implementation. Adds a small local response type that matches the OpenAI-compatible shape. No factory change. No interface change. ### How the driver works - Validate \`apiConfig\` and the API key, validate the model name, resolve the region with a default fallback, build the URL from \`BaseURL[region] + URLSuffix.Embedding\`. - Send all input texts in one request as the \`input\` array, the same OpenAI-compatible shape the SiliconFlow \`Encode\` uses. - Parse \`data[*].embedding\` and copy each slice into a \`[][]float64\` indexed by \`data[*].index\` so the output order matches the input order even if the API returns items in a different order. - Handle both \`float64\` and \`float32\` element types. - Empty input returns \`[][]float64{}\` with no HTTP call. - Non-200 responses propagate the upstream status line and body. - A final pass checks every input slot got a vector and returns a clear error if any slot is still nil. ### Type of change - [x] New Feature (non-breaking change which adds functionality) ### How was this tested? - \`go build ./internal/entity/models/...\` in a clean go 1.25 image returns exit 0. - The full method set on \`AliyunModel\` still matches the \`ModelDriver\` interface. - Pattern parity with the existing SiliconFlow Encode implementation. Closes #14646 --------- Co-authored-by: Jin Hai <haijin.chn@gmail.com>
2026-05-08 07:58:25 +02:00
{
"name": "text-embedding-v3",
"max_tokens": 8192,
"model_types": [
"embedding"
feat: add batch_size to all embedding model configs (#17877) ## Summary Add a `batch_size` field to every embedding model entry in `conf/models/*.json`. The field represents the maximum number of text inputs that can be submitted to the embedding API in a single request. **75 embedding models across 30 config files** now carry a `batch_size`. Values were verified against each provider's official documentation (see the verification table at `Desktop/embedding_models_verified.md`). ## Distribution | batch_size | # models | Provider / Model | |---|---|---| | 1 | 2 | AWS Bedrock `amazon.titan-embed-text-v1/v2:0` — Bedrock `invoke` accepts a single input per call | | 10 | 3 | Aliyun `text-embedding-v3/v4`, Volcengine `doubao-embedding-vision-251215` | | 16 | 5 | BaiChuan `Baichuan-Text-Embedding`, Baidu Qianfan `embedding-v1`, Mistral `mistral-embed`, Replicate (x2) | | 32 | 10 | NVIDIA NIM (x3), SILICONFLOW (x2), PPIO (x3), GiteeAI `bge-m3`, HuaweiCloud `bge-m3` | | 50 | 4 | Tencent Hunyuan `kinfra` embeddings (x4) — `InputList.N` max 50 | | 96 | 8 | Cohere embed-v3/v4 (x5), Bedrock Cohere (x3) | | 100 | 3 | Google Gemini `text-embedding-004`, Upstage (x2) | | 512 | 5 | Zhipu GLM `embedding-2/3` (x2), Perplexity `pplx-embed` (x2), Astraflow `text-embedding-3-large` | | 1000 | 9 | Voyage AI (x9) — API reference max | | 1024 | 1 | DeepInfra `Qwen/Qwen3-Embedding-4B` | | 2048 | 15 | OpenAI (x3) + OpenAI-API-compatible proxies (CometAPI, n1n, Jiekou.AI, GreenPT, TogetherAI, NovitaAI) — OpenAI contract limit | | 16384 | 10 | Jina (x8), 302.AI, GiteeAI `jina-clip-v2` — no documented Jina batch limit, safe high cap | --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-06 10:47:38 +08:00
],
"max_batch_size": 10
},
{
"name": "qwen3-rerank",
"max_tokens": 8192,
"model_types": [
"rerank"
]
}
],
"features": {
"thinking": {
"default_value": true,
"supported_models": [
"qwen-flash"
]
}
}
2026-07-09 10:19:10 +08:00
}