Skip to main content
Some converse calls may take longer to complete, especially when processing large files, complex prompts, or when the agent performs extensive tool use. By default, SDK requests timeout after 30 minutes. For long-running operations, you can increase the timeout to accommodate these scenarios.

Configuring Timeouts

Both the Python and TypeScript/JavaScript SDKs allow you to configure request timeouts at the client level or per-request.

Client-Level Configuration

Set a default timeout for all requests when initializing the client:
from datagrid_ai import Datagrid

# Configure the default timeout for all requests (1 hour)
client = Datagrid(
    timeout=60.0 * 60,  # 1 hour in seconds
)

response = client.converse(prompt="Analyze this large dataset")

Per-Request Configuration

Override the timeout for individual requests:
from datagrid_ai import Datagrid

client = Datagrid()

# Override timeout for a specific request (1 hour)
response = client.with_options(timeout=60.0 * 60).converse(
    prompt="Process this complex task",
)