Skip to content

Conversation

@paulbatum
Copy link
Member

@paulbatum paulbatum commented Dec 4, 2025

Description

Small changes that enable the foundry projects agents tests to use other models. I have validated this change through a devops pipeline that runs the agents tests in an e2e manner against multiple models.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.


test_agents_params = {
"model_deployment_name": "gpt-4o",
"model_deployment_name": os.environ.get("AZURE_AI_PROJECTS_TESTS_AGENTS_MODEL_DEPLOYMENT_NAME") or "gpt-4o",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dargilco I am wondering whether there is some extra work with the service preparer that I will need to do in this area once we have working recordings for these tests? Since we dont have working recordings today it was hard for me to be sure.

Copilot finished reviewing on behalf of paulbatum December 4, 2025 19:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables the Azure AI Projects agents tests to use configurable model deployments through environment variables, allowing tests to run against different models in end-to-end scenarios. The changes maintain backward compatibility by providing default values when environment variables are not set.

Key Changes

  • Added environment variable support for overriding the default agent model deployment name ("gpt-4o")
  • Updated the image generation tool to explicitly use the image model deployment parameter
  • Added new environment variable template entry for the agent model deployment name configuration

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
sdk/ai/azure-ai-projects/tests/test_base.py Added os import and modified test_agents_params to read model deployment name from environment variable with fallback to "gpt-4o"
sdk/ai/azure-ai-projects/tests/agents/tools/test_agent_image_generation.py Added model parameter to ImageGenTool instantiation to explicitly pass the image model deployment
sdk/ai/azure-ai-projects/.env.template Added AZURE_AI_PROJECTS_TESTS_AGENTS_MODEL_DEPLOYMENT_NAME environment variable template entry

The implementation follows existing patterns in the codebase (e.g., AZURE_AI_PROJECTS_TESTS_IMAGE_MODEL_DEPLOYMENT_NAME) and maintains backward compatibility. All agent tests that reference test_agents_params["model_deployment_name"] will automatically benefit from this change without requiring modifications.

@paulbatum paulbatum force-pushed the developer/pbatum/agents-model-selection branch from c64df44 to 777cadb Compare December 5, 2025 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants