A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
increase timeout to 120s for reasoning models (#6839)
Shahmir Varqhabcf0ac1af69b
diff --git a/marimo/_server/ai/providers.py b/marimo/_server/ai/providers.pyindex 57c716be8a..4e7d13fe2b 100644--- a/marimo/_server/ai/providers.py+++ b/marimo/_server/ai/providers.py@@ -39,6 +39,8 @@ from marimo._server.ai.tools.types import ToolDefinitionfrom marimo._server.api.status import HTTPStatusTIMEOUT = 30+# Long-thinking models can take a long time to complete, so we set a longer timeout+LONG_THINKING_TIMEOUT = 120if TYPE_CHECKING:from anthropic import ( # type: ignore[import-not-found]@@ -437,7 +439,6 @@ class OpenAIProvider(DEFAULT_REASONING_EFFORT = "medium"def _is_reasoning_model(self, model: str) -> bool:- # only o-series models support reasoningreturn model.startswith("o") or model.startswith("gpt-5")def get_client(self, config: AnyProviderConfig) -> AsyncOpenAI:@@ -537,7 +538,9 @@ class OpenAIProvider(),),"stream": True,- "timeout": TIMEOUT,+ "timeout": LONG_THINKING_TIMEOUT+ if self._is_reasoning_model(self.model)+ else TIMEOUT,}if tools:all_tools = tools + additional_tools