"""C1 类型契约不变量（`LlmRequest` 字段集）单测。"""

from __future__ import annotations

from ww_llm_gateway.adapters.base import Capabilities
from ww_llm_gateway.types import LlmRequest


def test_llm_request_has_no_thinking_field() -> None:
    # CR-H5：删除从未被任何适配器/网关读取的死字段 `LlmRequest.thinking`（YAGNI）。
    assert "thinking" not in LlmRequest.model_fields
    assert set(LlmRequest.model_fields) == {
        "tier",
        "input",
        "system",
        "stream",
        "output_schema",
        "max_tokens",
        "scope",
        "request_id",  # CR-H4：可选端到端追踪字段（additive/optional）。
    }
    # 同名但另一处 live 字段 `Capabilities.thinking`（适配器能力矩阵）不受影响。
    assert "thinking" in Capabilities.model_fields
