You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 54a587c
Browse filesBrowse the repository at this point in the historyBrowse files
A model call that raises was untested. The loopback fake model now answers
HTTP 400 to a request carrying LLM_FAIL_TRIGGER (OpenAI raises
BadRequestError, no retry), and failing_llm_chat runs a chat whose only
model call is rejected.
- test_setup.py: the LLM span keeps status ERROR, carries
error.type=BadRequestError and gen_ai.span.kind=LLM, has no usage or cost,
and no content leaks on the error path.
- Contract test: the same through register()'s exporting processor (which
turns only UNSET into OK) and the shared Receiver; the token-sum check
counts successful LLM spans only.
Upstream sets error.type and re-raises (llm_wrapper.py:97-101) and the SDK
sets ERROR, so these pass on the pre-fix code by design; README Errors row
documents the behaviour.
approved: Nikhil 2026-10-03 blanket
Refs: TH-8237
Copy file name to clipboardExpand all lines: python/frameworks/ag2-classic/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,7 @@ covered by mapping unit tests only.
114
114
| Session |`session.id` from upstream `gen_ai.conversation.id` (`ChatResult.chat_id`) on the outermost `conversation` span. Inside `using_session(...)` or `using_attributes(session_id=...)` (from `fi_instrumentation`), that id is set on every AG2 span instead and wins over the chat id; `gen_ai.conversation.id` keeps the chat id. | Nested chats (for example the internal chat behind group-chat speaker selection, or an inner chat a tool starts) keep `gen_ai.conversation.id` but get no `session.id`. Child spans end before the chat id exists, so only the conversation span carries it. A `GroupChatManager` run emits no own conversation span at 0.14.x. `initiate_chats` gives one session per chat: each chat is its own outermost conversation, and the parent `initiate_chats` span (`multi_conversation`) has no `session.id`, so one trace holds several sessions. For one session over the whole call, wrap it in `with using_session("..."):`. |
115
115
| User |`user.id` (and `metadata`, `tag.tags`) from `using_user(...)` / `using_attributes(...)`, set on every AG2 span started inside it. | Not emitted upstream; absent without that context. |
116
116
| Tools |`gen_ai.tool.name`, `gen_ai.tool.type` (`function`), `gen_ai.tool.call.id`. | Arguments and result (`gen_ai.tool.call.arguments` / `.result`) only with `capture_content=True`. |
117
-
| Errors | Exceptions keep OTel's ERROR status. A failing tool is caught inside `ConversableAgent.execute_function`, so upstream only sets `error.type=ExecutionError`; this package sets status ERROR from `error.type`. A non-zero code exit (`error.type=CodeExecutionError`) also becomes ERROR. ||
117
+
| Errors | Exceptions keep OTel's ERROR status. A model call that raises keeps ERROR, and upstream sets `error.type` to the exception class (for example `BadRequestError`, `llm_wrapper.py:97-101`); the span has no usage or cost. A failing tool is caught inside `ConversableAgent.execute_function`, so upstream only sets `error.type=ExecutionError`; this package sets status ERROR from `error.type`. A non-zero code exit (`error.type=CodeExecutionError`) also becomes ERROR. ||
0 commit comments