From a03fc6efff04753074267a0d35ab623fd50b5547 Mon Sep 17 00:00:00 2001 From: Anatoli Beliaev Date: Tue, 23 Sep 2025 15:34:46 -0700 Subject: [PATCH 1/7] Update extension bundle version to 4.34.0 in host.json and add setup instructions for preview version in getting-started.md --- docs/openai_agents/getting-started.md | 12 ++++++++++++ samples-v2/openai_agents/host.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/openai_agents/getting-started.md b/docs/openai_agents/getting-started.md index 77a6e4c2..54cac865 100644 --- a/docs/openai_agents/getting-started.md +++ b/docs/openai_agents/getting-started.md @@ -62,6 +62,18 @@ pip install -r requirements.txt **Durable Task Scheduler is the preferred backend** for this integration as it provides enhanced performance, better observability, and simplified local development. While not a hard requirement, it's strongly recommended for production workloads. +> IMPORTANT: Ensure your function app is using the *preview* extension bundle version 4.34.0 or higher by specifying it in `host.json`: +> +> ```json +> { +> "version": "2.0", +> "extensionBundle": { +> "id": "Microsoft.Azure.Functions.ExtensionBundle.Preview", +> "version": "[4.34.0, 5.0.0)" +> } +> } +> ``` + There are two ways to configure the backend locally: #### Using the Emulator (Recommended) diff --git a/samples-v2/openai_agents/host.json b/samples-v2/openai_agents/host.json index 069e8f88..6ee8e9ce 100644 --- a/samples-v2/openai_agents/host.json +++ b/samples-v2/openai_agents/host.json @@ -19,6 +19,6 @@ }, "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle.Preview", - "version": "[4.29.0, 5.0.0)" + "version": "[4.34.0, 5.0.0)" } } \ No newline at end of file From d428949c3b835da2a968f4faf1deda1e10d0714a Mon Sep 17 00:00:00 2001 From: Anatoli Beliaev Date: Tue, 23 Sep 2025 15:46:34 -0700 Subject: [PATCH 2/7] Add DTS settings to local.settings.json.template --- samples-v2/openai_agents/local.settings.json.template | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samples-v2/openai_agents/local.settings.json.template b/samples-v2/openai_agents/local.settings.json.template index 71126517..66ba0318 100644 --- a/samples-v2/openai_agents/local.settings.json.template +++ b/samples-v2/openai_agents/local.settings.json.template @@ -5,6 +5,8 @@ "FUNCTIONS_WORKER_RUNTIME": "python", "AZURE_OPENAI_ENDPOINT": "https://your-openai-service.openai.azure.com/", "AZURE_OPENAI_DEPLOYMENT": "your-gpt-deployment-name", - "AZURE_OPENAI_API_VERSION": "2025-03-01-preview" + "AZURE_OPENAI_API_VERSION": "2025-03-01-preview", + "DURABLE_TASK_SCHEDULER_CONNECTION_STRING": "http://localhost:8080;Authentication=None;", + "TASKHUB": "default" } } \ No newline at end of file From 9715f56c9d0b0c6dac3abb93a0ce25c58912cdb7 Mon Sep 17 00:00:00 2001 From: Anatoli Beliaev Date: Tue, 23 Sep 2025 15:47:30 -0700 Subject: [PATCH 3/7] Remove unnecessary semicolon in hello_world.py --- samples-v2/openai_agents/basic/hello_world.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples-v2/openai_agents/basic/hello_world.py b/samples-v2/openai_agents/basic/hello_world.py index 57c4ca98..e90da566 100644 --- a/samples-v2/openai_agents/basic/hello_world.py +++ b/samples-v2/openai_agents/basic/hello_world.py @@ -10,7 +10,7 @@ def main(): ) result = Runner.run_sync(agent, "Tell me about recursion in programming.") - return result.final_output; + return result.final_output # Function calls itself, # Looping in smaller pieces, # Endless by design. From a22c626b22235c6e7ad30acb6d2407a6ae5a8f08 Mon Sep 17 00:00:00 2001 From: Anatoli Beliaev Date: Tue, 23 Sep 2025 15:49:22 -0700 Subject: [PATCH 4/7] Uncomment a line in setup instructions --- docs/openai_agents/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/openai_agents/getting-started.md b/docs/openai_agents/getting-started.md index 54cac865..4d53e0d7 100644 --- a/docs/openai_agents/getting-started.md +++ b/docs/openai_agents/getting-started.md @@ -35,7 +35,7 @@ python -m venv venv # On macOS/Linux: source venv/bin/activate # On Windows: -# venv\Scripts\activate +venv\Scripts\activate ``` ### Install Dependencies From 44207dffc1b1189bd918577ee62108e5801cb8b6 Mon Sep 17 00:00:00 2001 From: Anatoli Beliaev Date: Tue, 23 Sep 2025 15:54:35 -0700 Subject: [PATCH 5/7] Improve formatting --- docs/openai_agents/getting-started.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/openai_agents/getting-started.md b/docs/openai_agents/getting-started.md index 4d53e0d7..53469117 100644 --- a/docs/openai_agents/getting-started.md +++ b/docs/openai_agents/getting-started.md @@ -62,17 +62,17 @@ pip install -r requirements.txt **Durable Task Scheduler is the preferred backend** for this integration as it provides enhanced performance, better observability, and simplified local development. While not a hard requirement, it's strongly recommended for production workloads. -> IMPORTANT: Ensure your function app is using the *preview* extension bundle version 4.34.0 or higher by specifying it in `host.json`: -> -> ```json -> { -> "version": "2.0", -> "extensionBundle": { -> "id": "Microsoft.Azure.Functions.ExtensionBundle.Preview", -> "version": "[4.34.0, 5.0.0)" -> } -> } -> ``` +IMPORTANT: Ensure your function app is using the *preview* extension bundle version 4.34.0 or higher by specifying it in `host.json`: + +```json +{ + "version": "2.0", + "extensionBundle": { + "id": "Microsoft.Azure.Functions.ExtensionBundle.Preview", + "version": "[4.34.0, 5.0.0)" + } +} +``` There are two ways to configure the backend locally: From 96a64954a45adb013acdf0a2eb4fe1f2f290b6ab Mon Sep 17 00:00:00 2001 From: Anatoli Beliaev Date: Wed, 24 Sep 2025 14:59:14 -0700 Subject: [PATCH 6/7] Fix DTS sample connection string --- docs/openai_agents/getting-started.md | 2 +- samples-v2/openai_agents/local.settings.json.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/openai_agents/getting-started.md b/docs/openai_agents/getting-started.md index 810ad2ab..638492c2 100644 --- a/docs/openai_agents/getting-started.md +++ b/docs/openai_agents/getting-started.md @@ -139,7 +139,7 @@ Update `local.settings.json` with your service configuration: "AZURE_OPENAI_ENDPOINT": "https://.openai.azure.com/", "AZURE_OPENAI_DEPLOYMENT": "", "AZURE_OPENAI_API_VERSION": "2024-10-01-preview", - "DURABLE_TASK_SCHEDULER_CONNECTION_STRING": "http://localhost:8080;Authentication=None;", + "DURABLE_TASK_SCHEDULER_CONNECTION_STRING": "Endpoint=http://localhost:8080;Authentication=None;", "TASKHUB": "default" } } diff --git a/samples-v2/openai_agents/local.settings.json.template b/samples-v2/openai_agents/local.settings.json.template index 66ba0318..02a004bf 100644 --- a/samples-v2/openai_agents/local.settings.json.template +++ b/samples-v2/openai_agents/local.settings.json.template @@ -6,7 +6,7 @@ "AZURE_OPENAI_ENDPOINT": "https://your-openai-service.openai.azure.com/", "AZURE_OPENAI_DEPLOYMENT": "your-gpt-deployment-name", "AZURE_OPENAI_API_VERSION": "2025-03-01-preview", - "DURABLE_TASK_SCHEDULER_CONNECTION_STRING": "http://localhost:8080;Authentication=None;", + "DURABLE_TASK_SCHEDULER_CONNECTION_STRING": "Endpoint=http://localhost:8080;Authentication=None;", "TASKHUB": "default" } } \ No newline at end of file From d0e7e749708f6099574609cd700db58654cbbb88 Mon Sep 17 00:00:00 2001 From: Anatoli Beliaev Date: Wed, 24 Sep 2025 16:43:10 -0700 Subject: [PATCH 7/7] Document OPENAI_DEFAULT_MODEL requirement --- docs/openai_agents/getting-started.md | 1 + samples-v2/openai_agents/local.settings.json.template | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/openai_agents/getting-started.md b/docs/openai_agents/getting-started.md index 638492c2..61572182 100644 --- a/docs/openai_agents/getting-started.md +++ b/docs/openai_agents/getting-started.md @@ -138,6 +138,7 @@ Update `local.settings.json` with your service configuration: "FUNCTIONS_WORKER_RUNTIME": "python", "AZURE_OPENAI_ENDPOINT": "https://.openai.azure.com/", "AZURE_OPENAI_DEPLOYMENT": "", + "OPENAI_DEFAULT_MODEL": "", "AZURE_OPENAI_API_VERSION": "2024-10-01-preview", "DURABLE_TASK_SCHEDULER_CONNECTION_STRING": "Endpoint=http://localhost:8080;Authentication=None;", "TASKHUB": "default" diff --git a/samples-v2/openai_agents/local.settings.json.template b/samples-v2/openai_agents/local.settings.json.template index 02a004bf..e51523da 100644 --- a/samples-v2/openai_agents/local.settings.json.template +++ b/samples-v2/openai_agents/local.settings.json.template @@ -5,6 +5,7 @@ "FUNCTIONS_WORKER_RUNTIME": "python", "AZURE_OPENAI_ENDPOINT": "https://your-openai-service.openai.azure.com/", "AZURE_OPENAI_DEPLOYMENT": "your-gpt-deployment-name", + "OPENAI_DEFAULT_MODEL": "deployment-name", "AZURE_OPENAI_API_VERSION": "2025-03-01-preview", "DURABLE_TASK_SCHEDULER_CONNECTION_STRING": "Endpoint=http://localhost:8080;Authentication=None;", "TASKHUB": "default"