feat(core): 添加 LLMResponse frozen dataclass

含 content/thinking/ttft_ms/max_inter_token_ms/call_id 等 11 个字段。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-06 22:33:48 -04:00
parent 9340c5e0f8
commit 70320d7cfa
2 changed files with 74 additions and 0 deletions
+23
View File
@@ -1 +1,24 @@
"""跨模块共享类型。"""
from __future__ import annotations
from dataclasses import dataclass
@dataclass(frozen=True)
class LLMResponse:
"""LLM/VLM 调用的统一返回值。
由 adapters 层生成,core 层消费。frozen=True 确保响应不可变。
"""
content: str
thinking: str
model: str
provider: str
prompt_tokens: int
completion_tokens: int
latency_ms: int
ttft_ms: float | None
max_inter_token_ms: float | None
cache_hit: bool
call_id: str