Skip to content

fix(migration): remap index_connection_id to project_connection_id for Azure AI Search (#807) - #917

Open
Nithin (nithin42) wants to merge 1 commit into
microsoft-foundry:mainfrom
nithin42:fix/azure-ai-search-index-connection-remapping
Open

fix(migration): remap index_connection_id to project_connection_id for Azure AI Search (#807)#917
Nithin (nithin42) wants to merge 1 commit into
microsoft-foundry:mainfrom
nithin42:fix/azure-ai-search-index-connection-remapping

Conversation

@nithin42

Copy link
Copy Markdown

Summary

Fixes #807

In Azure AI Studio (v1), the azure_ai_search tool stores its connection metadata under the key name index_connection_id. When migrating agents to Microsoft Foundry (v2), the v2 API requires project_connection_id.

Previously, remap_connection_ids_in_tool only checked if key == 'connection_id':, leaving index_connection_id untouched and unresolved in the migrated payload, causing the v2 API to reject creation with a 400 Bad Request error.

Changes

  • Updated remap_connection_ids_in_tool() in migration/v1_to_v2_migration.py to match both connection_id and index_connection_id.
  • Added unit tests in migration/test_migration_remapping.py covering single tool remapping, search index remapping, and end-to-end v1_assistant_to_v2_agent conversion.

Validation

  • Ran Pytest: migration/test_migration_remapping.py (3 passed).
  • Ran Black formatter on modified files.
  • Validated end-to-end payload transformation against v1 search tool schemas.

@nithin42

Copy link
Copy Markdown
Author

Hi Brandon Miller (@brandom-msft), tagging you for review on this migration fix for #807. Unit tests are included in migration/test_migration_remapping.py. Thanks!

@nithin42
Nithin (nithin42) force-pushed the fix/azure-ai-search-index-connection-remapping branch from f95af84 to 8f01299 Compare August 15, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: azure_ai_search migration fails — index_connection_id not remapped to project_connection_id

1 participant