Skip to content

Known issue: type object 'SpanAttributes' has no attribute 'LLM_REQUEST_MODEL' #377

@huimiu

Description

@huimiu

For the hosted agent samples provided by the Foundry extension, if you run into errors

$ python main.py 
Traceback (most recent call last):
  File "/main.py", line 2, in <module>
    from agent_framework import MCPStreamableHTTPTool
  File "/.venv/lib/python3.12/site-packages/agent_framework/__init__.py", line 12, in <module>
    from ._agents import *  # noqa: F403
    ^^^^^^^^^^^^^^^^^^^^^^
  File "/.venv/lib/python3.12/site-packages/agent_framework/_agents.py", line 18, in <module>
    from ._clients import BaseChatClient, ChatClientProtocol
  File "/.venv/lib/python3.12/site-packages/agent_framework/_clients.py", line 11, in <module>
    from ._memory import AggregateContextProvider, ContextProvider
  File "/.venv/lib/python3.12/site-packages/agent_framework/_memory.py", line 11, in <module>
    from ._types import ChatMessage
  File "/.venv/lib/python3.12/site-packages/agent_framework/_types.py", line 22, in <module>
    from ._tools import ToolProtocol, ai_function
  File "/.venv/lib/python3.12/site-packages/agent_framework/_tools.py", line 32, in <module>
    from .observability import (
  File "/.venv/lib/python3.12/site-packages/agent_framework/observability.py", line 1780, in <module>
    SpanAttributes.LLM_REQUEST_MODEL,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'SpanAttributes' has no attribute 'LLM_REQUEST_MODEL'. Did you mean: 'LLM_REQUEST_TYPE'?

Please update the requirements.txt file in your project to this:

azure-ai-agentserver-agentframework==1.0.0b14
debugpy
agent-dev-cli

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions