Skip to content

Examples and guides for using the OpenAI API

Fix Codex CLI and deep research cookbook examples (#2913)

Konstantine Kahadze0cc994f27512
diff --git a/examples/codex/jira-github.ipynb b/examples/codex/jira-github.ipynb
index e2b7a976..38c6ae0a 100644
--- a/examples/codex/jira-github.ipynb
+++ b/examples/codex/jira-github.ipynb
@@ -152,11 +152,10 @@
" # 5 – Let Codex implement & commit (no push yet)\n",
" - name: Codex implement & commit\n",
" env:\n",
- " OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n",
- " CODEX_QUIET_MODE: \"1\" # suppress chatty logs\n",
+ " CODEX_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n",
" run: |\n",
" set -e\n",
- " codex --approval-mode full-auto --no-terminal --quiet \\\n",
+ " codex exec --sandbox workspace-write \\\n",
" \"Implement JIRA ticket $ISSUE_KEY: $TITLE. $DESC\"\n",
"\n",
" git add -A\n",
@@ -213,7 +212,7 @@
"\n",
"1. **Codex Implementation & Commit** (Step 5)\n",
" - Uses OpenAI API to implement the JIRA ticket requirements\n",
- " - Runs codex CLI in full-auto mode without terminal interaction\n",
+ " - Runs the Codex CLI non-interactively with workspace write access\n",
" - Commits all changes with standardized commit message\n",
"\n",
"2. **Create Pull Request** (Step 6) \n",
diff --git a/examples/deep_research_api/introduction_to_deep_research_api_agents.ipynb b/examples/deep_research_api/introduction_to_deep_research_api_agents.ipynb
index 7e465a7b..7b1d9fac 100644
--- a/examples/deep_research_api/introduction_to_deep_research_api_agents.ipynb
+++ b/examples/deep_research_api/introduction_to_deep_research_api_agents.ipynb
@@ -72,7 +72,7 @@
"from openai import AsyncOpenAI\n",
"\n",
"# Use env var for API key and set a long timeout\n",
- "client = AsyncOpenAI(api_key=\"\", timeout=600.0)\n",
+ "client = AsyncOpenAI(timeout=600.0)\n",
"set_default_openai_client(client)\n",
"os.environ[\"OPENAI_AGENTS_DISABLE_TRACING\"] = \"1\" # Disable tracing for Zero Data Retention (ZDR) Organizations"
]
@@ -85,7 +85,7 @@
"source": [
"### Basic Deep Research Agent\n",
"\n",
- "The Basic Research Agent performs Deep Research using the o4-mini-deep-research-alpha model. It has native WebSearch access to the public internet and streams its findings directly back into the notebook. In this case we are using the `o4-mini-deep-research-alpha` model, because it is faster than the full o3 deep research model, with acceptable intelligence.\n",
+ "The Basic Research Agent performs deep research using the `gpt-5.6-terra` model, which balances intelligence and cost. It uses `WebSearchTool` to access the public internet and streams its findings directly back into the notebook.\n",
"\n",
"**Learning objective:**\n",
"\n",
@@ -107,7 +107,7 @@
"# Define the research agent\n",
"research_agent = Agent(\n",
" name=\"Research Agent\",\n",
- " model=\"o4-mini-deep-research-2025-06-26\",\n",
+ " model=\"gpt-5.6-terra\",\n",
" tools=[WebSearchTool()],\n",
" instructions=\"You perform deep empirical research based on the user's question.\"\n",
")\n",
@@ -254,7 +254,7 @@
"3. **Instruction Builder Agent** \n",
" - Converts the enriched input into a precise research brief \n",
"\n",
- "4. **Research Agent** (`o3-deep-research`) \n",
+ "4. **Research Agent** (`gpt-5.6-sol`) \n",
" - Performs web-scale empirical research with `WebSearchTool`\n",
" - Performs a search against internal knowledge store using MCP, if there are relevant documents, the agent incorporates those relevant snippets in its reference material. \n",
" - Streams intermediate events for transparency\n",
@@ -284,7 +284,7 @@
"# ─────────────────────────────────────────────────────────────\n",
"research_agent = Agent(\n",
" name=\"Research Agent\",\n",
- " model=\"o3-deep-research-2025-06-26\",\n",
+ " model=\"gpt-5.6-sol\",\n",
" instructions=\"Perform deep empirical research based on the user's instructions.\",\n",
" tools=[WebSearchTool(),\n",
" HostedMCPTool(\n",