Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/ai/azure-ai-projects/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/ai/azure-ai-projects",
"Tag": "python/ai/azure-ai-projects_8ddbfaaa38"
"Tag": "python/ai/azure-ai-projects_368efce090"
}
4 changes: 4 additions & 0 deletions sdk/ai/azure-ai-projects/azure/ai/projects/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ def get_openai_client(self, **kwargs: Any) -> "OpenAI": # type: ignore[name-def
if "default_query" not in kwargs:
kwargs["default_query"] = {"api-version": "2025-11-15-preview"}

# Remove `proxies` argument if it exists in kwargs, since OpenAI client will fail it is sees it. We see this
# argument passed in when running tests from recordings on some platforms, in the Azure SDK build pipeline.
kwargs.pop("proxies", None)

logger.debug( # pylint: disable=specify-parameter-names-in-call
"[get_openai_client] Creating OpenAI client using Entra ID authentication, base_url = `%s`", # pylint: disable=line-too-long
base_url,
Expand Down
4 changes: 4 additions & 0 deletions sdk/ai/azure-ai-projects/azure/ai/projects/aio/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ def get_openai_client(self, **kwargs: Any) -> "AsyncOpenAI": # type: ignore[nam
if "default_query" not in kwargs:
kwargs["default_query"] = {"api-version": "2025-11-15-preview"}

# Remove `proxies` argument if it exists in kwargs, since OpenAI client will fail it is sees it. We see this
# argument passed in when running tests from recordings on some platforms, in the Azure SDK build pipeline.
kwargs.pop("proxies", None)

logger.debug( # pylint: disable=specify-parameter-names-in-call
"[get_openai_client] Creating OpenAI client using Entra ID authentication, base_url = `%s`", # pylint: disable=line-too-long
base_url,
Expand Down
4 changes: 0 additions & 4 deletions sdk/ai/azure-ai-projects/tests/responses/test_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
from devtools_testutils import is_live_and_not_recording


@pytest.mark.skipif(
condition=(not is_live_and_not_recording()),
reason="Skipped because we cannot record network calls with OpenAI client",
)
class TestResponses(TestBase):

# To run this test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
from test_base import TestBase, recorded_by_proxy_async_httpx, servicePreparer


@pytest.mark.skipif(
condition=(not is_live_and_not_recording()),
reason="Skipped because we cannot record network calls with OpenAI client",
)
class TestResponsesAsync(TestBase):

# To run this test:
Expand All @@ -24,7 +20,7 @@ async def test_responses_async(self, **kwargs):

model = self.test_agents_params["model_deployment_name"]

client = await self.create_async_client(operation_group="agents", **kwargs).get_openai_client()
client = self.create_async_client(operation_group="agents", **kwargs).get_openai_client()

async with client:

Expand Down
Loading