Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 1, 2025

Summary

Fixes the Contract Analysis Agent and other semantic-kernel agents that were failing with:

ModuleNotFoundError: No module named 'opentelemetry.semconv.attributes'

This error occurred when trying to run the agents due to missing dependencies and deprecated packages in their requirements.txt files.

Root Cause

The issue had two parts:

  1. Deprecated dependency: azure_storage==0.37.0 is deprecated since v0.37.0 and causes installation failures
  2. Missing dependency: semantic_kernel==1.31.0 requires OpenTelemetry semconv attributes but the dependency wasn't declared

Changes

Fixed requirements.txt for all affected semantic-kernel agents:

Before:

azure_storage==0.37.0  # ❌ Deprecated, causes installation failure
semantic_kernel==1.31.0  # ❌ Missing OpenTelemetry dependency

After:

semantic_kernel==1.31.0
opentelemetry-semantic-conventions  # ✅ Provides missing dependency
# azure_storage removed - not actually used by any agent

Agents Fixed

  • contract-analysis-agent (primary issue reported)
  • sop-forge-agent
  • warranty-claim-processing-agent

All three agents use from semantic_kernel.agents import AzureAIAgent, AzureAIAgentThread which triggers the missing OpenTelemetry import.

Validation

✅ Verified that opentelemetry-semantic-conventions provides the missing opentelemetry.semconv.attributes.error_attributes.ERROR_TYPE
✅ Confirmed through code analysis that none of the agents actually use Azure Storage APIs
✅ All requirements.txt files now install successfully without deprecated package errors

Users should now be able to:

  1. Install dependencies with pip install -r requirements.txt
  2. Import semantic_kernel agents without errors
  3. Run the agents successfully

Fixes #165.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits July 1, 2025 21:26
…e_storage and add missing opentelemetry dependency

Co-authored-by: e-straight <[email protected]>
…- remove deprecated azure_storage and add missing opentelemetry-semantic-conventions

Co-authored-by: e-straight <[email protected]>
@Copilot Copilot AI changed the title [WIP] Contract Analysis Agent fails on step 6 Fix OpenTelemetry dependency issue in semantic-kernel agents Jul 1, 2025
@Copilot Copilot AI requested a review from e-straight July 1, 2025 21:40
Copilot finished work on behalf of e-straight July 1, 2025 21:40
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.

Contract Analysis Agent fails on step 6
2 participants