Document agent access token envs in templates

This commit is contained in:
elipitc
2026-06-05 00:18:21 +08:00
parent 8e9032e74a
commit 3dd7da0b15
2 changed files with 18 additions and 1 deletions
+10
View File
@@ -106,3 +106,13 @@ def test_dedicated_template_agent_contract_doc_exists():
assert "POST /agents/{agent_name}/stop" in doc_source
assert "DELETE /agents/{agent_name}" in doc_source
assert "X-Agent-Access-Token" in doc_source
def test_template_manager_exposes_agent_access_token_envs():
"""Template definitions should advertise the HM access-token envs explicitly."""
template_source = _read("template_manager.py")
assert '"a2a_litellm_agent": {' in template_source
assert '"coding_a2a_agent": {' in template_source
assert '"AGENT_ACCESS_TOKEN": "客户端访问令牌;若设置,A2A 请求必须携带 X-Agent-Access-Token"' in template_source
assert '"HEICODE_AGENT_ID": "上层系统分配的 agent_id,用于 health / agent card 暴露与联调排查"' in template_source