mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-04 09:39:32 +08:00
### What problem does this PR solve? Closes #15088. Adds Groq support to the Go model-provider layer so Groq 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 Groq Go model driver. - Added the Groq provider catalog and default OpenAI-compatible API URL. - Registered Groq in the model factory. - Added focused provider tests. ## What changed - Implemented chat completions, SSE streaming, ListModels, and CheckConnection for Groq. - Covered request shape, stream termination, reasoning fallback, model listing, custom base URLs, safe transport setup, and unsupported methods. - Kept the provider catalog scoped to current Groq chat-capable model IDs. - Cleaned up pre-existing Go model package validation blockers so the package can be tested normally with vet enabled. ## Why The existing Python/provider catalog path includes Groq, but the Go model-provider layer did not have a Groq driver, so the Go API server could not instantiate or use Groq as requested in #15088. ## Notes The model package now validates without disabling vet. --------- Co-authored-by: Jin Hai <haijin.chn@gmail.com>
70 lines
1.2 KiB
JSON
70 lines
1.2 KiB
JSON
{
|
|
"name": "Groq",
|
|
"url": {
|
|
"default": "https://api.groq.com/openai/v1"
|
|
},
|
|
"url_suffix": {
|
|
"chat": "chat/completions",
|
|
"models": "models"
|
|
},
|
|
"class": "groq",
|
|
"models": [
|
|
{
|
|
"name": "llama-3.1-8b-instant",
|
|
"max_tokens": 131072,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "llama-3.3-70b-versatile",
|
|
"max_tokens": 131072,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "openai/gpt-oss-120b",
|
|
"max_tokens": 131072,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "openai/gpt-oss-20b",
|
|
"max_tokens": 131072,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "groq/compound",
|
|
"max_tokens": 131072,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "groq/compound-mini",
|
|
"max_tokens": 131072,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "meta-llama/llama-4-scout-17b-16e-instruct",
|
|
"max_tokens": 131072,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
},
|
|
{
|
|
"name": "qwen/qwen3-32b",
|
|
"max_tokens": 131072,
|
|
"model_types": [
|
|
"chat"
|
|
]
|
|
}
|
|
]
|
|
}
|