Open
test(llm): 基于 0930 打印出站完整报文 #10
test(llm): 基于 0930 打印出站完整报文 #10
Open
jaxAdd on Sep 11
jax
jaxCollaborators
Sep 11

【MR类型】
test: print full outbound LLM and semantic-service requests on 0930

【问题背景】
Field debugging of LLM outbound calls needs the complete request body. The console defaults to WARNING, so DEBUG-only payload keys are invisible on site.

【具体方案】

  • Call _log_outbound_request before invoke / ainvoke / astream
  • Log WARNING with method, URL, stream flag, headers, and JSON body
  • Mask Authorization as Bearer ***; EMPTY key still omits the header
  • Do not change _resolve_core_endpoint or api_key validation (0930 already uses EMPTY)
  • Also log full semantic-service outbound request from SemanticServiceClient._request as semantic.request WARNING (method, URL, headers, body; Authorization masked)

【主要文件】

File Change
dataagent/core/managers/llm_manager/llm_client.py WARNING outbound dump with Authorization masking
tests/ut/llm_manager/test_from_llm_config.py Cover masking and EMPTY-key header omission
dataagent/actions/tools/semantic_tool/semantic_client.py WARNING semantic outbound dump with Authorization masking
tests/ut/tools/test_semantic_service_client.py Cover WARNING, body, and Authorization masking
likedislike
Merge blocked
jaxjaxCollaborators
Sep 11 Pushed 1 commits:b7e97fa7-test(semantic): 出站请求打印完整报文
jaxjaxCollaborators
Sep 11 Modify description of pull request