#2358 feat(session): serve Anthropic Messages through SessionCore
实现拆解
-
核心源码路径
-miles/rollout/session/anthropic_adapter.py(dependency-wiring):源码主路径;涉及符号 _anthropic_wire_json, _anthropic_error_response, _anthropic_sse_body, _parse_anthropic_request;包含 导入关系调整、控制流调整、配置键调整;+130/-0;关键符号:_anthropic_wire_json, _anthropic_error_response, _anthropic_sse_body, _parse_anthropic_request
-miles/rollout/session/sessions.py(dependency-wiring):源码主路径;涉及符号 anthropic_messages;包含 导入关系调整、控制流调整、配置键调整;+102/-3;关键符号:anthropic_messages
-miles/utils/test_utils/mock_sglang_server.py(core-logic):源码主路径;包含 控制流调整、配置键调整;+11/-0 -
测试与验证
-tests/fast/router/test_session_anthropic.py(test-coverage):测试配套;涉及符号 _process_fn, _anthropic_env, anthropic_env, anthropic_env_loose;包含 测试覆盖调整、导入关系调整、控制流调整;+965/-0;关键符号:_process_fn, _anthropic_env, anthropic_env, anthropic_env_loose
-tests/fast/utils/test_utils/test_mock_sglang_server.py(test-coverage):测试配套;包含 测试覆盖调整、配置键调整;+9/-2
| 文件 | 模块 | 状态 | 重要度 |
|---|---|---|---|
miles/rollout/session/anthropic_adapter.py |
miles/rollout | added | 8.96 |
tests/fast/router/test_session_anthropic.py |
session/anthropic | added | 8.42 |
miles/rollout/session/sessions.py |
miles/rollout | modified | 7.62 |
miles/utils/test_utils/mock_sglang_server.py |
miles/utils | modified | 5.9 |
tests/fast/utils/test_utils/test_mock_sglang_server.py |
mock/sglang/server | modified | 4.5 |
分析完成后,这里会展示 LLM 生成的相对完整源码片段和详细注释。
评论区精华
没有提炼出高价值讨论线程
当前评论区没有形成足够清晰的争议点或结论,后续有更多讨论时会体现在这里。
风险与影响
关联 Issue
未识别关联 Issue
当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。
参与讨论