Azure / Azure/azure-dev

Remove legacy container deploy schema compat code after service-side migration

Open
#8,848 0 comments 0 reactions 1 assignee Claimed by @huimiu View on GitHub
engineering item ext-agents upstream deps
Dominant language
Go
Stars
569
Forks
364
Avg merge
2d 19h
Merged PRs (30d)
136

Description

## Summary

Once the Foundry Agent Service confirms that all stored agent definitions have been migrated server-side from the legacy schema to the new schema, the following backward-compatibility code can be removed from the `azure.ai.agents` extension:

### Code to remove

1. **`models.go` - `UnmarshalJSON` legacy field handling**
- Reading `container_protocol_versions` and migrating to `protocol_versions`
- Reading top-level `image` and migrating to `container_configuration.image`
- The deprecated `Image string` field on `HostedAgentDefinition`

2. **`optimize_deploy.go` - `normalizeContainerImage()`**
- Migrates legacy top-level `image` to `container_configuration.image` on raw maps

3. **`optimize_deploy.go` - legacy branch in `normalizeProtocolVersions()`**
- Migrates `container_protocol_versions` to `protocol_versions` on raw maps

### Prerequisite

Service team confirms all stored agent definitions have been migrated (no responses contain legacy `image` or `container_protocol_versions` fields).

### Context

Introduced in PR #8829 to maintain backward compatibility during the schema transition.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.