mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-05-26 10:47:21 +08:00
### What problem does this PR solve? Closes #15089. Adds PPIO support to the Go model-provider layer so PPIO instances can be routed through the Go API server with the same OpenAI-compatible chat, streaming, model listing, and connection-check flow used by other SaaS providers. ### Type of change - [x] New Feature (non-breaking change which adds functionality) ## Summary - Added a PPIO Go model driver. - Added the PPIO provider catalog and default OpenAI-compatible API URL. - Registered PPIO in the model factory. - Added focused provider and provider-manager tests. ## What changed - Implemented chat completions, SSE streaming, ListModels, and CheckConnection for PPIO. - Covered request shape, stream termination, reasoning fallback, model listing, custom base URLs, safe transport setup, unsupported methods, and provider config loading. - Kept the provider catalog aligned with the existing RAGFlow PPIO factory model set. - Cleaned up pre-existing Go model package validation blockers so the scoped provider tests can run normally with vet enabled. ## Why The existing Python/provider catalog path includes PPIO, but the Go model-provider layer did not have a PPIO driver, so the Go API server could not instantiate or use PPIO as requested in #15089.
162 lines
2.9 KiB
JSON
162 lines
2.9 KiB
JSON
{
|
|
"name": "PPIO",
|
|
"url": {
|
|
"default": "https://api.ppio.com/openai/v1",
|
|
"us": "https://api.ppinfra.com/v3/openai"
|
|
},
|
|
"url_suffix": {
|
|
"chat": "chat/completions",
|
|
"models": "models"
|
|
},
|
|
"class": "ppio",
|
|
"models": [
|
|
{
|
|
"name": "deepseek/deepseek-v4-flash",
|
|
"max_tokens": 1048576,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "deepseek/deepseek-v4-pro",
|
|
"max_tokens": 1048576,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "deepseek/deepseek-r1/community",
|
|
"max_tokens": 64000,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "deepseek/deepseek-v3/community",
|
|
"max_tokens": 64000,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "deepseek/deepseek-r1",
|
|
"max_tokens": 64000,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "deepseek/deepseek-v3",
|
|
"max_tokens": 64000,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "deepseek/deepseek-r1-distill-llama-70b",
|
|
"max_tokens": 32000,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "deepseek/deepseek-r1-distill-qwen-32b",
|
|
"max_tokens": 64000,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "deepseek/deepseek-r1-distill-qwen-14b",
|
|
"max_tokens": 64000,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "deepseek/deepseek-r1-distill-llama-8b",
|
|
"max_tokens": 32000,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "qwen/qwen-2.5-72b-instruct",
|
|
"max_tokens": 32768,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "qwen/qwen-2-vl-72b-instruct",
|
|
"max_tokens": 32768,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "meta-llama/llama-3.2-3b-instruct",
|
|
"max_tokens": 32768,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "qwen/qwen2.5-32b-instruct",
|
|
"max_tokens": 32000,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "baichuan/baichuan2-13b-chat",
|
|
"max_tokens": 14336,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "meta-llama/llama-3.1-70b-instruct",
|
|
"max_tokens": 32768,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "meta-llama/llama-3.1-8b-instruct",
|
|
"max_tokens": 32768,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "01-ai/yi-1.5-34b-chat",
|
|
"max_tokens": 16384,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "01-ai/yi-1.5-9b-chat",
|
|
"max_tokens": 16384,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "thudm/glm-4-9b-chat",
|
|
"max_tokens": 32768,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "qwen/qwen-2-7b-instruct",
|
|
"max_tokens": 32768,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
}
|
|
]
|
|
}
|