Skip to content

Commit 4044e0b

Browse files
committed
refactor: use PROVIDERS_WITHOUT_RESPONSE_FORMAT constant from base_llm
Addresses CodeRabbit review: import the centralized provider blocklist instead of duplicating a hardcoded set literal.
1 parent 70a778d commit 4044e0b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/crewai/src/crewai/llms/providers/openai/completion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
from crewai.events.types.llm_events import LLMCallType
3232
from crewai.llms._finish_reason_utils import extract_choices_finish_reason_and_id
33-
from crewai.llms.base_llm import BaseLLM, JsonResponseFormat, llm_call_context
33+
from crewai.llms.base_llm import PROVIDERS_WITHOUT_RESPONSE_FORMAT, BaseLLM, JsonResponseFormat, llm_call_context
3434
from crewai.llms.hooks.base import BaseInterceptor
3535
from crewai.llms.hooks.transport import AsyncHTTPTransport, HTTPTransport
3636
from crewai.llms.providers.utils.common import safe_tool_conversion
@@ -1599,7 +1599,7 @@ def _prepare_completion_params(
15991599
if (
16001600
self.response_format is not None
16011601
and self._extract_provider(self.model)
1602-
not in {"deepseek"}
1602+
not in PROVIDERS_WITHOUT_RESPONSE_FORMAT
16031603
):
16041604
if isinstance(self.response_format, type) and issubclass(
16051605
self.response_format, BaseModel

0 commit comments

Comments
 (0)