github Azure/azure-sdk-for-python azure-ai-projects_2.1.0

6 hours ago

2.1.0 (2026-04-20)

Features Added

  • get_openai_client() on AIProjectClient now takes an optional input argument agent_name. If provided, the returned OpenAI
    client will use a base URL of Agent endpoint instead of Foundry Project endpoint. As Agent endpoints are a preview feature, you
    need to set allow_preview=True on the AIProjectClient constructor.
  • New .beta.agents sub-client added, with Session operations (those only work with Hosted Agents)
    • create_session()
    • delete_session()
    • delete_session_file()
    • download_session_file()
    • get_session()
    • get_session_files()
    • list_sessions()
    • upload_session_file()
  • Also on .beta.agents sub-client, a new method patch_agent_details().
  • New beta.skills sub-client added, with Skills operations:
    • create()
    • create_from_package()
    • delete()
    • download()
    • get()
    • list()
    • update()
  • New beta.toolboxes sub-client added, with Toolboxes operations:
    • create_version()
    • delete()
    • delete_version()
    • get()
    • get_version()
    • list()
    • list_versions()
    • update()
  • Type hinting support for OpenAI client operations .evals.create() and .evals.runs.create(), when you
    get the OpenAI client using get_openai_client() method of AIProjectClient. This includes new TypedDicts
    classes to help you author the input to these methods. See new TypedDict classes ModelSamplingConfigParam,
    ToolDescriptionParam, AzureAIAgentTargetParam, AzureAIModelTargetParam,
    ResponseRetrievalItemGenerationParams, AzureAIResponsesEvalRunDataSource, AzureAIDataSourceConfig,
    TargetCompletionEvalRunDataSource, TestingCriterionAzureAIEvaluator, AzureAIBenchmarkPreviewEvalRunDataSource,
    EvalCsvFileIdSource, EvalCsvRunDataSource, RedTeamEvalRunDataSource, TracesPreviewEvalRunDataSource.

Breaking Changes

  • Tracing: trace context propagation is enabled by default when tracing is enabled.

Bugs Fixed

  • Fix missing type hinting on the returned OpenAI client from method 'get_openai_client()`.

Sample updates

  • Evaluation samples updated to use TypedDicts to specify inputs to .evals.create() and .evals.runs.create() methods.
  • Renamed environment variable AZURE_AI_PROJECT_ENDPOINT to FOUNDRY_PROJECT_ENDPOINT in all samples.
  • Renamed environment variable AZURE_AI_MODEL_DEPLOYMENT_NAME to FOUNDRY_MODEL_NAME in all samples.
  • Renamed environment variable AZURE_AI_MODEL_AGENT_NAME to FOUNDRY_AGENT_NAME in all samples.
  • Added Hosted Agents related samples: sample_agent_endpoint.py, sample_agent_endpoint_async.py, sample_sessions_crud.py, sample_sessions_crud_async.py, sample_sessions_files_upload_download.py, sample_sessions_files_upload_download_async.py, sample_skills_crud.py, sample_skills_crud_async.py, sample_skills_upload_and_download.py, sample_skills_upload_and_download_async.py, sample_toolboxes_crud.py, and sample_toolboxes_crud_async.py.
  • Added structured inputs + file upload sample (sample_agent_structured_inputs_file_upload.py) demonstrating passing an uploaded file ID to an agent at runtime.
  • Added structured inputs + File Search sample (sample_agent_file_search_structured_inputs.py) demonstrating configuring File Search tool resources via structured inputs.
  • Added structured inputs + Code Interpreter sample (sample_agent_code_interpreter_structured_inputs.py) demonstrating passing an uploaded file ID to Code Interpreter via structured inputs.
  • Added CSV evaluation sample (sample_evaluations_builtin_with_csv.py) demonstrating evaluation with an uploaded CSV dataset.
  • Added synthetic data evaluation samples (sample_synthetic_data_agent_evaluation.py) and (sample_synthetic_data_model_evaluation.py).
  • Added Chat Completions basic samples (sample_chat_completions_basic.py, sample_chat_completions_basic_async.py) demonstrating chat completions calls using AIProjectClient + the OpenAI-compatible client.
  • Added Toolboxes CRUD samples (sample_toolboxes_crud.py, sample_toolboxes_crud_async.py) demonstrating project_client.beta.toolboxes create/get/update/list/delete.
  • Simplified sample_memory_basic.py and sample_agent_memory_search.py (and their async equivalent) by removing
    options=MemoryStoreDefaultOptions(user_profile_enabled=True, chat_summary_enabled=True) when constructing MemoryStoreDefaultDefinition,
    since this is now redundant (it's the service default).

Don't miss a new azure-sdk-for-python release

NewReleases is sending notifications on new releases.