Python: [BREAKING] Remove deprecated Python OpenAI/Azure AI surfaces (#4990)

* [BREAKING] Remove deprecated Python OpenAI/Azure AI surfaces

Also clean up follow-on docs, environment guidance, package metadata, and lab test stability.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix deleted semantic-kernel sample links

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR review feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* improve foundry language

* Fix A2A Foundry sample regression

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Eduard van Valkenburg
2026-03-31 22:36:21 +02:00
committed by GitHub
Unverified
parent a5eacbbe65
commit 3a49b1d6dd
144 changed files with 669 additions and 18739 deletions
@@ -4,7 +4,7 @@ import asyncio
from typing import Annotated
from agent_framework import Agent, tool
from agent_framework.openai import OpenAIResponsesClient
from agent_framework.openai import OpenAIChatClient
from dotenv import load_dotenv
# Load environment variables from .env file
@@ -28,7 +28,7 @@ def add(
async def main():
client = OpenAIResponsesClient()
client = OpenAIChatClient()
client.function_invocation_configuration["include_detailed_errors"] = True
client.function_invocation_configuration["max_iterations"] = 40
print(f"Function invocation configured as: \n{client.function_invocation_configuration}")
@@ -3,7 +3,7 @@
import asyncio
from agent_framework import Agent, FunctionTool
from agent_framework.openai import OpenAIResponsesClient
from agent_framework.openai import OpenAIChatClient
from dotenv import load_dotenv
# Load environment variables from .env file
@@ -26,7 +26,7 @@ async def main():
)
agent = Agent(
client=OpenAIResponsesClient(),
client=OpenAIChatClient(),
name="DeclarationOnlyToolAgent",
instructions="You are a helpful agent that uses tools.",
tools=function_declaration,
@@ -22,7 +22,7 @@ Usage:
import asyncio
from agent_framework import Agent, FunctionTool
from agent_framework.openai import OpenAIResponsesClient
from agent_framework.openai import OpenAIChatClient
from dotenv import load_dotenv
# Load environment variables from .env file
@@ -62,7 +62,7 @@ async def main() -> None:
tool = FunctionTool.from_dict(definition, dependencies={"function_tool": {"name:add_numbers": {"func": func}}})
agent = Agent(
client=OpenAIResponsesClient(),
client=OpenAIChatClient(),
name="FunctionToolAgent",
instructions="You are a helpful assistant.",
tools=tool,
@@ -18,7 +18,7 @@ import asyncio
from typing import Annotated
from agent_framework import Agent, tool
from agent_framework.openai import OpenAIResponsesClient
from agent_framework.openai import OpenAIChatClient
from dotenv import load_dotenv
from pydantic import BaseModel, Field
@@ -70,7 +70,7 @@ def get_current_time(timezone: str = "UTC") -> str:
async def main():
agent = Agent(
client=OpenAIResponsesClient(),
client=OpenAIChatClient(),
name="AssistantAgent",
instructions="You are a helpful assistant. Use the available tools to answer questions.",
tools=[get_weather, get_current_time],
@@ -4,7 +4,7 @@ import asyncio
from typing import Annotated
from agent_framework import Agent, FunctionInvocationContext, tool
from agent_framework.openai import OpenAIResponsesClient
from agent_framework.openai import OpenAIChatClient
from dotenv import load_dotenv
from pydantic import Field
@@ -44,7 +44,7 @@ def get_weather(
async def main() -> None:
agent = Agent(
client=OpenAIResponsesClient(),
client=OpenAIChatClient(),
name="WeatherAgent",
instructions="You are a helpful weather assistant.",
tools=[get_weather],
@@ -4,7 +4,7 @@ import asyncio
from typing import Annotated
from agent_framework import Agent, tool
from agent_framework.openai import OpenAIResponsesClient
from agent_framework.openai import OpenAIChatClient
from dotenv import load_dotenv
# Load environment variables from .env file
@@ -36,7 +36,7 @@ def safe_divide(
async def main():
# tools = Tools()
agent = Agent(
client=OpenAIResponsesClient(),
client=OpenAIChatClient(),
name="ToolAgent",
instructions="Use the provided tools.",
tools=[safe_divide],
@@ -4,7 +4,7 @@ import asyncio
from typing import Annotated
from agent_framework import Agent, tool
from agent_framework.openai import OpenAIResponsesClient
from agent_framework.openai import OpenAIChatClient
from dotenv import load_dotenv
# Load environment variables from .env file
@@ -25,7 +25,7 @@ def unicorn_function(times: Annotated[int, "The number of unicorns to return."])
async def main():
# tools = Tools()
agent = Agent(
client=OpenAIResponsesClient(),
client=OpenAIChatClient(),
name="ToolAgent",
instructions="Use the provided tools.",
tools=[unicorn_function],
@@ -4,7 +4,7 @@ import asyncio
from typing import Annotated
from agent_framework import Agent, AgentSession, FunctionInvocationContext, tool
from agent_framework.openai import OpenAIResponsesClient
from agent_framework.openai import OpenAIChatClient
from dotenv import load_dotenv
from pydantic import Field
@@ -37,7 +37,7 @@ async def get_weather(
async def main() -> None:
agent = Agent(
client=OpenAIResponsesClient(),
client=OpenAIChatClient(),
name="WeatherAgent",
instructions="You are a helpful weather assistant.",
tools=[get_weather],
@@ -4,7 +4,7 @@ import asyncio
from typing import Annotated
from agent_framework import Agent, tool
from agent_framework.openai import OpenAIResponsesClient
from agent_framework.openai import OpenAIChatClient
from dotenv import load_dotenv
# Load environment variables from .env file
@@ -50,7 +50,7 @@ async def main():
add_function = tool(description="Add two numbers.")(tools.add)
agent = Agent(
client=OpenAIResponsesClient(),
client=OpenAIChatClient(),
name="ToolAgent",
instructions="Use the provided tools.",
)