Remove legacy container deploy schema compat code after service-side migration
- 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
Assessment
This issue has not been assessed yet.