Files
ragflow/conf/models/openai.json
0xτensor 127aeac4aa fix: expose gpt-5.5 and gpt-5.4 in OpenAI model list (#14828)
### What problem does this PR solve?

OpenAI model catalogs used in provider selection flows were missing the
latest GPT models (`gpt-5.5` and `gpt-5.4`).
Because model availability is driven by seeded catalog data
(`conf/llm_factories.json` → DB seed → API response), these models were
not selectable in the UI or `/llm/list` responses.

This PR updates and synchronizes the OpenAI catalog definitions across
configuration sources and ensures the new models are correctly exposed
through the API layer and validated in tests.

---

### Type of change

* [x] New Feature (non-breaking change which adds functionality)

---

### Changes Made

* Added `gpt-5.5` and `gpt-5.4` to OpenAI catalog definitions in:

  * `conf/llm_factories.json`
  * `conf/models/openai.json` (chat + vision support)
* Ensured consistency between DB-seeded factory config and provider
model configuration
* Updated test coverage in:

  * `test_llm_list_unit.py`

    * seeded OpenAI catalog entries
* added response-level assertion validating `/llm/list` includes both
new model IDs under OpenAI grouping

---

### Root Cause

OpenAI model listings in selection flows are generated from catalog data
seeded via `conf/llm_factories.json`.
The catalog had not been updated to include the latest GPT models,
resulting in missing availability in UI and API responses.

---

### Testing

* Created isolated test environment:

  * `python -m venv .venv-review`
  * installed `pytest`
* Ran targeted and full test suite:

  * `test_list_app_grouping_availability_and_merge`:  passed
  * Full `test_llm_list_unit.py`:  10 passed

---

### Risks / Limitations

* Adding models to the catalog does not guarantee upstream provider
availability or account entitlement.
* Environments with pre-seeded DB catalogs may require reseed or refresh
to reflect updated configuration.

---

### Notes

* Changes are minimal and scoped strictly to catalog configuration and
related test coverage.
* Ensures `/llm/list` API remains aligned with expected latest OpenAI
model availability.
* Closes #14827
2026-05-12 18:03:47 +08:00

211 lines
3.4 KiB
JSON

{
"name": "OpenAI",
"url": {
"default": "https://api.openai.com/v1"
},
"url_suffix": {
"chat": "chat/completions",
"models": "models",
"embedding": "embeddings"
},
"class": "gpt",
"models": [
{
"name": "gpt-5.5",
"max_tokens": 400000,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-5.4",
"max_tokens": 400000,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-5.2-pro",
"max_tokens": 400000,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-5.2",
"max_tokens": 400000,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-5.1",
"max_tokens": 400000,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-5.1-chat-latest",
"max_tokens": 400000,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-5",
"max_tokens": 400000,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-5-mini",
"max_tokens": 400000,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-5-nano",
"max_tokens": 400000,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-5-chat-latest",
"max_tokens": 400000,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-4.1",
"max_tokens": 1047576,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-4.1-mini",
"max_tokens": 1047576,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-4.1-nano",
"max_tokens": 1047576,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-4.5-preview",
"max_tokens": 128000,
"model_types": [
"chat"
]
},
{
"name": "gpt-4o-mini",
"max_tokens": 128000,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-4o",
"max_tokens": 128000,
"model_types": [
"chat",
"vision"
]
},
{
"name": "gpt-3.5-turbo",
"max_tokens": 4096,
"model_types": [
"chat"
]
},
{
"name": "gpt-3.5-turbo-16k-0613",
"max_tokens": 16385,
"model_types": [
"chat"
]
},
{
"name": "text-embedding-ada-002",
"max_tokens": 8191,
"model_types": [
"embedding"
]
},
{
"name": "text-embedding-3-small",
"max_tokens": 8191,
"model_types": [
"embedding"
]
},
{
"name": "text-embedding-3-large",
"max_tokens": 8191,
"model_types": [
"embedding"
]
},
{
"name": "whisper-1",
"max_tokens": 26214400,
"model_types": [
"asr"
]
},
{
"name": "gpt-4",
"max_tokens": 8191,
"model_types": [
"chat"
]
},
{
"name": "gpt-4-turbo",
"max_tokens": 8191,
"model_types": [
"chat"
]
},
{
"name": "gpt-4-32k",
"max_tokens": 32768,
"model_types": [
"chat"
]
},
{
"name": "tts-1",
"max_tokens": 2048,
"model_types": [
"tts"
]
}
]
}