Python: Add missing system instruction attr to invoke_agent span (#4012)

* Add missing sysmte instruction attr to invoke_agent span

* Temp remove azure search gate

* fix pipeline error
This commit is contained in:
Tao Chen
2026-02-17 20:49:12 +00:00
committed by GitHub
parent 794f84c190
commit 9a369c69c0
5 changed files with 444 additions and 251 deletions
@@ -43,9 +43,11 @@ from anthropic.types.beta import (
from anthropic.types.beta.beta_bash_code_execution_tool_result_error import (
BetaBashCodeExecutionToolResultError,
)
from anthropic.types.beta.beta_code_execution_result_block import BetaCodeExecutionResultBlock
from anthropic.types.beta.beta_code_execution_tool_result_error import (
BetaCodeExecutionToolResultError,
)
from anthropic.types.beta.beta_encrypted_code_execution_result_block import BetaEncryptedCodeExecutionResultBlock
from pydantic import BaseModel
if sys.version_info >= (3, 11):
@@ -938,13 +940,26 @@ class AnthropicClient(
)
)
else:
if content_block.content.stdout:
if (
isinstance(content_block.content, BetaCodeExecutionResultBlock)
and content_block.content.stdout
):
code_outputs.append(
Content.from_text(
text=content_block.content.stdout,
raw_representation=content_block.content,
)
)
if (
isinstance(content_block.content, BetaEncryptedCodeExecutionResultBlock)
and content_block.content.encrypted_stdout
):
code_outputs.append(
Content.from_text(
text=content_block.content.encrypted_stdout,
raw_representation=content_block.content,
)
)
if content_block.content.stderr:
code_outputs.append(
Content.from_error(