Sends a research request to OpenAI using the deep research models
(o3-deep-research or o4-mini-deep-research) via the Responses API with
background: true. The model autonomously searches the web and synthesises
a long-form answer, which can take 5-30 minutes.
openai_deep_research(
.llm,
.model = "o4-mini-deep-research",
.background = FALSE,
.reasoning_effort = "medium",
.json_schema = NULL,
.max_output_tokens = NULL,
.timeout = 1800,
.max_tries = 3
)If .background = FALSE, an updated LLMMessage with the research reply.
If .background = TRUE, a tidyllm_research_job for use with check_job()/fetch_job().
An LLMMessage object containing the research question.
The deep research model to use (default: "o4-mini-deep-research").
Logical; if TRUE, returns a tidyllm_research_job immediately
without waiting for completion (default: FALSE).
Reasoning level for the model: "low", "medium" (default),
or "high".
A tidyllm schema for structured JSON output (optional).
Maximum tokens to generate (default: NULL for model default).
Seconds to wait in blocking mode before giving up (default: 1800).
Maximum retries per HTTP request (default: 3).