2026-05-12 18:03:05 +08:00
|
|
|
{
|
|
|
|
|
"name": "Jina",
|
|
|
|
|
"url": {
|
|
|
|
|
"default": "https://api.jina.ai/v1",
|
|
|
|
|
"deepsearch": "https://deepsearch.jina.ai/v1"
|
|
|
|
|
},
|
|
|
|
|
"url_suffix": {
|
|
|
|
|
"chat": "chat/completions",
|
|
|
|
|
"models": "models",
|
|
|
|
|
"embedding": "embeddings",
|
|
|
|
|
"rerank": "rerank"
|
|
|
|
|
},
|
|
|
|
|
"class": "jina",
|
|
|
|
|
"models": [
|
Go: add Jina chat completions support (#14935)
### What problem does this PR solve?
This PR adds non-streaming chat support for the Jina Go model provider.
The Jina provider was added with embedding, rerank, model listing, and
connection checking, but `ChatWithMessages` still returned a
not-implemented error even though Jina exposes an OpenAI-compatible
`/v1/chat/completions` endpoint.
Closes #14933
**The following functionalities are now supported:**
### **Jina:**
- [x] Chat
- [ ] Stream Chat
- [x] Embedding
- [x] Rerank
- [x] Model listing
- [x] Provider connection checking
- [ ] Balance
### **Implementation details:**
- Implements `JinaModel.ChatWithMessages`
- Sends `Authorization: Bearer <api-key>` and JSON chat completion
requests
- Validates API key, model name, messages, and configured region before
making requests
- Forwards supported chat config fields: `max_tokens`, `temperature`,
`top_p`, and `stop`
- Parses the first chat completion choice into `ChatResponse.Answer`
- Adds `jina-ai/jina-vlm` as a chat-capable model in
`conf/models/jina.json`
- Adds focused unit tests for request construction, auth, response
parsing, validation errors, provider errors, and region handling
**Verification:**
```plaintext
docker run --rm -v $PWD:/repo -w /repo golang:1.25 sh -c '/usr/local/go/bin/gofmt -w internal/entity/models/jina.go internal/entity/models/jina_test.go && /usr/local/go/bin/go test -vet=off ./internal/entity/models -run TestJina -count=1'
ok ragflow/internal/entity/models 0.037s
```
Note: `go test ./internal/entity/models -run TestJina -count=1`
currently hits unrelated existing vet findings in other provider files,
so the focused Jina tests were run with `-vet=off`.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Co-authored-by: Jin Hai <haijin.chn@gmail.com>
2026-05-17 18:03:12 -10:00
|
|
|
{
|
|
|
|
|
"name": "jina-vlm",
|
2026-08-05 15:22:57 +08:00
|
|
|
"content_length": 32768,
|
|
|
|
|
"max_output": 8192,
|
Go: add Jina chat completions support (#14935)
### What problem does this PR solve?
This PR adds non-streaming chat support for the Jina Go model provider.
The Jina provider was added with embedding, rerank, model listing, and
connection checking, but `ChatWithMessages` still returned a
not-implemented error even though Jina exposes an OpenAI-compatible
`/v1/chat/completions` endpoint.
Closes #14933
**The following functionalities are now supported:**
### **Jina:**
- [x] Chat
- [ ] Stream Chat
- [x] Embedding
- [x] Rerank
- [x] Model listing
- [x] Provider connection checking
- [ ] Balance
### **Implementation details:**
- Implements `JinaModel.ChatWithMessages`
- Sends `Authorization: Bearer <api-key>` and JSON chat completion
requests
- Validates API key, model name, messages, and configured region before
making requests
- Forwards supported chat config fields: `max_tokens`, `temperature`,
`top_p`, and `stop`
- Parses the first chat completion choice into `ChatResponse.Answer`
- Adds `jina-ai/jina-vlm` as a chat-capable model in
`conf/models/jina.json`
- Adds focused unit tests for request construction, auth, response
parsing, validation errors, provider errors, and region handling
**Verification:**
```plaintext
docker run --rm -v $PWD:/repo -w /repo golang:1.25 sh -c '/usr/local/go/bin/gofmt -w internal/entity/models/jina.go internal/entity/models/jina_test.go && /usr/local/go/bin/go test -vet=off ./internal/entity/models -run TestJina -count=1'
ok ragflow/internal/entity/models 0.037s
```
Note: `go test ./internal/entity/models -run TestJina -count=1`
currently hits unrelated existing vet findings in other provider files,
so the focused Jina tests were run with `-vet=off`.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Co-authored-by: Jin Hai <haijin.chn@gmail.com>
2026-05-17 18:03:12 -10:00
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-07-24 19:33:38 +08:00
|
|
|
],
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
|
|
|
|
}
|
Go: add Jina chat completions support (#14935)
### What problem does this PR solve?
This PR adds non-streaming chat support for the Jina Go model provider.
The Jina provider was added with embedding, rerank, model listing, and
connection checking, but `ChatWithMessages` still returned a
not-implemented error even though Jina exposes an OpenAI-compatible
`/v1/chat/completions` endpoint.
Closes #14933
**The following functionalities are now supported:**
### **Jina:**
- [x] Chat
- [ ] Stream Chat
- [x] Embedding
- [x] Rerank
- [x] Model listing
- [x] Provider connection checking
- [ ] Balance
### **Implementation details:**
- Implements `JinaModel.ChatWithMessages`
- Sends `Authorization: Bearer <api-key>` and JSON chat completion
requests
- Validates API key, model name, messages, and configured region before
making requests
- Forwards supported chat config fields: `max_tokens`, `temperature`,
`top_p`, and `stop`
- Parses the first chat completion choice into `ChatResponse.Answer`
- Adds `jina-ai/jina-vlm` as a chat-capable model in
`conf/models/jina.json`
- Adds focused unit tests for request construction, auth, response
parsing, validation errors, provider errors, and region handling
**Verification:**
```plaintext
docker run --rm -v $PWD:/repo -w /repo golang:1.25 sh -c '/usr/local/go/bin/gofmt -w internal/entity/models/jina.go internal/entity/models/jina_test.go && /usr/local/go/bin/go test -vet=off ./internal/entity/models -run TestJina -count=1'
ok ragflow/internal/entity/models 0.037s
```
Note: `go test ./internal/entity/models -run TestJina -count=1`
currently hits unrelated existing vet findings in other provider files,
so the focused Jina tests were run with `-vet=off`.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Co-authored-by: Jin Hai <haijin.chn@gmail.com>
2026-05-17 18:03:12 -10:00
|
|
|
},
|
2026-05-12 18:03:05 +08:00
|
|
|
{
|
|
|
|
|
"name": "jina-reranker-v3",
|
|
|
|
|
"max_tokens": 134144,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"rerank"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "jina-reranker-m0",
|
|
|
|
|
"max_tokens": 134144,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"rerank"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "jina-colbert-v2",
|
|
|
|
|
"max_tokens": 134144,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"rerank"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "jina-reranker-v2-base-multilingual",
|
|
|
|
|
"max_tokens": 134144,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"rerank"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "jina-embeddings-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
|
|
|
],
|
2026-08-06 14:45:10 +08:00
|
|
|
"max_batch_size": 16384
|
2026-05-12 18:03:05 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "jina-embeddings-v4",
|
|
|
|
|
"max_tokens": 32768,
|
|
|
|
|
"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
|
|
|
],
|
2026-08-06 14:45:10 +08:00
|
|
|
"max_batch_size": 16384
|
2026-05-12 18:03:05 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "jina-embeddings-v5-text-small",
|
|
|
|
|
"max_tokens": 32768,
|
|
|
|
|
"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
|
|
|
],
|
2026-08-06 14:45:10 +08:00
|
|
|
"max_batch_size": 16384
|
2026-05-12 18:03:05 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "jina-embeddings-v5-text-nano",
|
|
|
|
|
"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
|
|
|
],
|
2026-08-06 14:45:10 +08:00
|
|
|
"max_batch_size": 16384
|
2026-05-12 18:03:05 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "jina-embeddings-v5-omni-small",
|
|
|
|
|
"max_tokens": 32768,
|
|
|
|
|
"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
|
|
|
],
|
2026-08-06 14:45:10 +08:00
|
|
|
"max_batch_size": 16384
|
2026-05-12 18:03:05 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "jina-embeddings-v5-omni-nano",
|
|
|
|
|
"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
|
|
|
],
|
2026-08-06 14:45:10 +08:00
|
|
|
"max_batch_size": 16384
|
2026-05-12 18:03:05 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "jina-clip-v2",
|
|
|
|
|
"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
|
|
|
],
|
2026-08-06 14:45:10 +08:00
|
|
|
"max_batch_size": 16384
|
2026-05-12 18:03:05 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "jina-embeddings-v2-base-en",
|
|
|
|
|
"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
|
|
|
],
|
2026-08-06 14:45:10 +08:00
|
|
|
"max_batch_size": 16384
|
2026-05-12 18:03:05 +08:00
|
|
|
}
|
|
|
|
|
]
|
Go: add Jina chat completions support (#14935)
### What problem does this PR solve?
This PR adds non-streaming chat support for the Jina Go model provider.
The Jina provider was added with embedding, rerank, model listing, and
connection checking, but `ChatWithMessages` still returned a
not-implemented error even though Jina exposes an OpenAI-compatible
`/v1/chat/completions` endpoint.
Closes #14933
**The following functionalities are now supported:**
### **Jina:**
- [x] Chat
- [ ] Stream Chat
- [x] Embedding
- [x] Rerank
- [x] Model listing
- [x] Provider connection checking
- [ ] Balance
### **Implementation details:**
- Implements `JinaModel.ChatWithMessages`
- Sends `Authorization: Bearer <api-key>` and JSON chat completion
requests
- Validates API key, model name, messages, and configured region before
making requests
- Forwards supported chat config fields: `max_tokens`, `temperature`,
`top_p`, and `stop`
- Parses the first chat completion choice into `ChatResponse.Answer`
- Adds `jina-ai/jina-vlm` as a chat-capable model in
`conf/models/jina.json`
- Adds focused unit tests for request construction, auth, response
parsing, validation errors, provider errors, and region handling
**Verification:**
```plaintext
docker run --rm -v $PWD:/repo -w /repo golang:1.25 sh -c '/usr/local/go/bin/gofmt -w internal/entity/models/jina.go internal/entity/models/jina_test.go && /usr/local/go/bin/go test -vet=off ./internal/entity/models -run TestJina -count=1'
ok ragflow/internal/entity/models 0.037s
```
Note: `go test ./internal/entity/models -run TestJina -count=1`
currently hits unrelated existing vet findings in other provider files,
so the focused Jina tests were run with `-vet=off`.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Co-authored-by: Jin Hai <haijin.chn@gmail.com>
2026-05-17 18:03:12 -10:00
|
|
|
}
|