From 38c72efd6a1f9fb42db769c1f6ac76d01cb7ce1c Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 21 May 2026 09:39:10 -0600 Subject: [PATCH] mypy --- frigate/genai/plugins/gemini.py | 5 ++++- frigate/genai/plugins/openai.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frigate/genai/plugins/gemini.py b/frigate/genai/plugins/gemini.py index c1211aa16f..6e4b9283fb 100644 --- a/frigate/genai/plugins/gemini.py +++ b/frigate/genai/plugins/gemini.py @@ -120,11 +120,14 @@ class GeminiClient(GenAIClient): messages: list[dict[str, Any]], tools: Optional[list[dict[str, Any]]] = None, tool_choice: Optional[str] = "auto", + enable_thinking: Optional[bool] = None, ) -> dict[str, Any]: """ Send chat messages to Gemini with optional tool definitions. - Implements function calling/tool usage for Gemini models. + Implements function calling/tool usage for Gemini models. Thinking is + configured at the model level for Gemini, so ``enable_thinking`` is + accepted for interface parity and ignored. """ try: # Convert messages to Gemini format diff --git a/frigate/genai/plugins/openai.py b/frigate/genai/plugins/openai.py index 9ab884b3d1..8d422bfb31 100644 --- a/frigate/genai/plugins/openai.py +++ b/frigate/genai/plugins/openai.py @@ -188,11 +188,14 @@ class OpenAIClient(GenAIClient): messages: list[dict[str, Any]], tools: Optional[list[dict[str, Any]]] = None, tool_choice: Optional[str] = "auto", + enable_thinking: Optional[bool] = None, ) -> dict[str, Any]: """ Send chat messages to OpenAI with optional tool definitions. - Implements function calling/tool usage for OpenAI models. + Implements function calling/tool usage for OpenAI models. The OpenAI + chat completions API does not expose a per-request thinking toggle, + so ``enable_thinking`` is accepted for interface parity and ignored. """ try: openai_tool_choice = None