Files
ragflow/conf/models/groq.json
ghost f9ce07ced1 feat(go-models): add Groq provider driver (#15097)
### 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>
2026-05-22 15:24:52 +08:00

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"
]
}
]
}