From f304fd3b9e300dd47f198e0fedef9293e8e1b718 Mon Sep 17 00:00:00 2001 From: aifanatic Date: Thu, 22 Oct 2026 07:42:15 -0500 Subject: [PATCH] Python: Restore Semantic Kernel model arguments in Magentic migration sample The model_id -> model rename (#4999) also rewrote two Semantic Kernel calls, so the SK half of the sample failed with TypeError before running: OpenAIChatCompletion takes ai_model_id and OpenAISettings exposes chat_model_id. Co-Authored-By: Claude Opus 5.5 --- .../semantic-kernel-migration/orchestrations/magentic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/samples/semantic-kernel-migration/orchestrations/magentic.py b/python/samples/semantic-kernel-migration/orchestrations/magentic.py index 5e03f0a3037..68ea8789914 100644 --- a/python/samples/semantic-kernel-migration/orchestrations/magentic.py +++ b/python/samples/semantic-kernel-migration/orchestrations/magentic.py @@ -57,13 +57,13 @@ async def build_semantic_kernel_agents() -> list[ChatCompletionAgent | OpenAIAss instructions=( "You are a Researcher. You find information without additional computation or quantitative analysis." ), - service=OpenAIChatCompletion(ai_model="gpt-4o-mini-search-preview"), + service=OpenAIChatCompletion(ai_model_id="gpt-4o-mini-search-preview"), ) client = OpenAIAssistantAgent.create_client() code_interpreter_tool, code_interpreter_tool_resources = OpenAIAssistantAgent.configure_code_interpreter_tool() openai_settings = OpenAISettings() - model = openai_settings.chat_model if openai_settings.chat_model else "gpt-5" + model = openai_settings.chat_model_id if openai_settings.chat_model_id else "gpt-5" definition = await client.beta.assistants.create( # pyright: ignore[reportDeprecated] model=model, name="CoderAgent",