Skip to content

Commit 4989fc8

Browse files
committed
Enable GPT-5
1 parent 61cf5fb commit 4989fc8

File tree

4 files changed

+1780
-1803
lines changed

4 files changed

+1780
-1803
lines changed

py/core/providers/llm/openai.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,14 +399,13 @@ def _get_base_args(self, generation_config: GenerationConfig) -> dict:
399399

400400
model_str = generation_config.model or ""
401401

402-
if "o1" not in model_str and "o3" not in model_str:
402+
if any(model_prefix in model_str.lower() for model_prefix in ["o1", "o3", "gpt-5"]):
403+
args["max_completion_tokens"] = generation_config.max_tokens_to_sample
404+
405+
else:
403406
args["max_tokens"] = generation_config.max_tokens_to_sample
404407
args["temperature"] = generation_config.temperature
405408
args["top_p"] = generation_config.top_p
406-
else:
407-
args["max_completion_tokens"] = (
408-
generation_config.max_tokens_to_sample
409-
)
410409

411410
if generation_config.reasoning_effort is not None:
412411
args["reasoning_effort"] = generation_config.reasoning_effort

py/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "r2r"
7-
version = "3.6.5"
7+
version = "3.6.6"
88
description = "SciPhi R2R"
99
readme = "README.md"
1010
license = {text = "MIT"}
@@ -17,7 +17,7 @@ dependencies = [
1717
"alembic >=1.13.3,<2.0.0",
1818
"fastapi >=0.115.11,<0.116.0",
1919
"httpx >=0.27.0",
20-
"openai >=1.61.0",
20+
"openai >=1.99.0",
2121
"python-dotenv >=1.0.1,<2.0.0",
2222
"psycopg-binary >=3.2.3,<4.0.0",
2323
"requests >=2.31.0,<3.0.0",

py/r2r/r2r.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ default_max_collections_per_user = 5_000
99
default_max_upload_size = 214748364800
1010

1111
# LLM used for internal operations, like deriving conversation names
12-
fast_llm = "openai/gpt-4.1-mini"
12+
fast_llm = "openai/gpt-5-nano-2025-08-07"
1313

1414
# LLM used for user-facing output, like RAG replies
15-
quality_llm = "openai/gpt-4.1"
15+
quality_llm = "openai/gpt-5-2025-08-07"
1616

1717
# LLM used for ingesting visual inputs
18-
vlm = "openai/gpt-4.1"
18+
vlm = "openai/gpt-5-2025-08-07"
1919

2020
# LLM used for transcription
2121
audio_lm = "openai/whisper-1"

0 commit comments

Comments
 (0)