upgrade litellm to support gpt5 reasoning (#3218)

This commit is contained in:
Shuchang Zheng
2025-08-17 16:39:37 -07:00
committed by GitHub
parent b342ed74e3
commit c1b676f85e
4 changed files with 22 additions and 12 deletions

View File

@@ -141,6 +141,7 @@ class Settings(BaseSettings):
ENABLE_OPENAI_COMPATIBLE: bool = False
# OPENAI
OPENAI_API_KEY: str | None = None
GPT5_REASONING_EFFORT: str | None = "minimal"
# ANTHROPIC
ANTHROPIC_API_KEY: str | None = None
ANTHROPIC_CUA_LLM_KEY: str = "ANTHROPIC_CLAUDE3.7_SONNET"

View File

@@ -81,6 +81,7 @@ if settings.ENABLE_OPENAI:
add_assistant_prefix=False,
max_completion_tokens=128000,
temperature=None,
reasoning_effort=settings.GPT5_REASONING_EFFORT,
),
)
LLMConfigRegistry.register_config(
@@ -92,6 +93,7 @@ if settings.ENABLE_OPENAI:
add_assistant_prefix=False,
max_completion_tokens=128000,
temperature=None,
reasoning_effort=settings.GPT5_REASONING_EFFORT,
),
)
LLMConfigRegistry.register_config(
@@ -103,6 +105,7 @@ if settings.ENABLE_OPENAI:
add_assistant_prefix=False,
max_completion_tokens=128000,
temperature=None,
reasoning_effort=settings.GPT5_REASONING_EFFORT,
),
)
LLMConfigRegistry.register_config(
@@ -591,6 +594,7 @@ if settings.ENABLE_AZURE_GPT5:
add_assistant_prefix=False,
max_completion_tokens=128000,
temperature=None,
reasoning_effort=settings.GPT5_REASONING_EFFORT,
),
)
@@ -615,6 +619,7 @@ if settings.ENABLE_AZURE_GPT5_MINI:
add_assistant_prefix=False,
max_completion_tokens=128000,
temperature=None,
reasoning_effort=settings.GPT5_REASONING_EFFORT,
),
)
@@ -639,6 +644,7 @@ if settings.ENABLE_AZURE_GPT5_NANO:
add_assistant_prefix=False,
max_completion_tokens=128000,
temperature=None,
reasoning_effort=settings.GPT5_REASONING_EFFORT,
),
)