feat: upgrade to GPT-5.4 models, add default teams with per-user isolation, and ACR image build scripts#1082
Merged
Merged
Conversation
Coverage Report •
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the backend’s CosmosDB access pattern to use a shared connection with per-request user scoping, adds “default” team visibility semantics, refreshes the template’s default model/deployment names, and introduces post-provision scripts to build/push container images to ACR and update the deployed services.
Changes:
- Refactor
DatabaseFactoryto cache a shared CosmosDB connection while returning user-scoped client instances per request. - Add
is_defaultto team configurations and update Cosmos queries to return default + user-owned teams; prevent deletion of default teams. - Update infra/docs/scripts to provision an ACR, parameterize deployment aliases, use placeholder images at deploy-time, and provide post-provision build/push scripts; update default model names to GPT-5.4 variants.
Reviewed changes
Copilot reviewed 27 out of 29 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tests/backend/common/database/test_database_factory.py | Updates tests for shared-connection + per-request DB factory behavior. |
| src/tests/backend/common/database/test_cosmosdb.py | Updates tests to reflect default-team visibility filtering and delete semantics. |
| src/tests/agents/test_foundry_integration.py | Updates test deployment name defaults. |
| src/tests/agents/interactive_test_harness/foundry_agent_interactive.py | Updates interactive harness model deployment name. |
| src/backend/v4/common/services/team_service.py | Parses is_default into TeamConfiguration during upload validation. |
| src/backend/Dockerfile | Removes BuildKit-only mounts; improves compatibility with classic builders. |
| src/backend/common/models/messages_af.py | Adds is_default field to the persisted TeamConfiguration model. |
| src/backend/common/database/database_factory.py | Implements shared Cosmos connection caching + per-request user-scoped instances. |
| src/backend/common/database/cosmosdb.py | Adds default-team visibility predicates; blocks deletion of default teams. |
| src/backend/common/config/app_config.py | Updates default OpenAI deployment/model names and reasoning model default. |
| src/backend/.env.sample | Updates sample env defaults for new model/deployment names. |
| src/App/Dockerfile | Removes BuildKit-only mounts for broader build compatibility. |
| infra/scripts/Build-And-Push-Images.ps1 | Adds PowerShell post-provision build/push + service update automation. |
| infra/scripts/build_and_push_images.sh | Adds Bash post-provision build/push + service update automation. |
| infra/main.waf.parameters.json | Adds parameters for deployment alias names. |
| infra/main.parameters.json | Adds parameters for deployment alias names. |
| infra/main.bicep | Adds ACR + managed-identity pulls; uses placeholder images; wires deployment aliases and outputs for scripts. |
| infra/main_custom.bicep | Mirrors deployment-alias parameterization and wiring for the custom template variant. |
| docs/quota_check.md | Updates default quota model/capacity guidance. |
| docs/DeploymentGuide.md | Documents the new required post-provision image build/push step and updated model defaults. |
| docs/CustomizingAzdParameters.md | Documents new deployment-alias parameters and updated model defaults. |
| data/agent_teams/rfp_analysis_team.json | Updates deployment names; marks as default-visible. |
| data/agent_teams/retail.json | Updates deployment names; marks as default-visible; updates reasoning agent deployment alias. |
| data/agent_teams/marketing.json | Updates deployment names; marks as default-visible. |
| data/agent_teams/hr.json | Updates deployment names; marks as default-visible. |
| data/agent_teams/contract_compliance_team.json | Updates deployment names; marks as default-visible. |
| azure.yaml | Updates postdeploy messaging to include the image build/push scripts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…e data after image build and push
… JSON templates. - Updated deployment capacity defaults for GPT models. - Added private endpoint configurations for Azure Container Registry based on networking settings. - Adjusted scripts for building and pushing images to temporarily relax ACR restrictions during WAF deployments. - Enhanced WebSocket handling in the frontend to coalesce streaming messages for improved UI performance. - Updated backend configuration to reflect changes in reasoning model naming and supported models. - Improved agent handling logic in the orchestration layer to prevent infinite loops during approval processes.
…emove premature satisfaction guard logging in human_approval_manager.py
Avijit-Microsoft
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR bundles three related deployment/runtime improvements:
1. GPT-5.4 model upgrade
Migrates all model references from gpt-4.1 / gpt-4.1-mini / o4-mini / o3 to gpt-5.4 / gpt-5.4-mini (reasoning). Updates app config defaults,
.env.sample, agent team configs, bicep model name/version params (2026-03-05 / 2026-03-17), allowed-region quota usage names, docs, and tests.2. Default teams & per-user data isolation
is_defaultflag toTeamConfiguration; seed teams are marked default.user_id=@user_id OR is_default=true).DatabaseFactorynow caches the expensive Cosmos connection (client/database/container) once and returns lightweight per-request clients bound to the caller''suser_id, ensuring ownership filters stay correct under concurrent async execution.3. Container image build scripts
infra/scripts/Build-And-Push-Images.ps1andbuild_and_push_images.shto build and push backend/frontend/mcp_server images to ACR and point the apps at them, wired intoazure.yamlpost-deploy hooks.--mountso they build withaz acr build(classic builder). Adds bicep*DeploymentNamealias params.Does this introduce a breaking change?
What to Check
az acr buildbuilds succeed and post-deploy hooks run the image scripts.