Restore reasoning tokens beside effort
This commit is contained in:
@@ -483,6 +483,10 @@ def request_retry_note(row: dict[str, Any]) -> str:
|
||||
return str(row.get("error") or "").strip()
|
||||
|
||||
|
||||
def request_reasoning_tokens_text(row: dict[str, Any]) -> str:
|
||||
return format_count(row["reasoning_tokens"]) if row["reasoning_tokens"] is not None else "-"
|
||||
|
||||
|
||||
def request_row_cells(row: dict[str, Any], text_limits: dict[str, int] | None = None) -> tuple[Any, ...]:
|
||||
limits = text_limits or {}
|
||||
note_width = max(4, limits.get("note", 22))
|
||||
@@ -497,6 +501,7 @@ def request_row_cells(row: dict[str, Any], text_limits: dict[str, int] | None =
|
||||
short_text(row["path"], limits.get("path", 22)),
|
||||
short_text(row["model"] or row["requested_model"] or row["forwarded_model"], limits.get("model", 16)),
|
||||
short_text(request_effort_text(row), limits.get("effort", 10)),
|
||||
request_reasoning_tokens_text(row),
|
||||
short_text(request_usage_summary(row), limits.get("usage", 24)),
|
||||
format_bytes(row.get("request_body_bytes")),
|
||||
format_bytes(row.get("response_bytes_received")),
|
||||
@@ -1244,6 +1249,7 @@ def run_textual(
|
||||
"path": 22,
|
||||
"model": 16,
|
||||
"effort": 8,
|
||||
"reasoning": 8,
|
||||
"usage": 36,
|
||||
"req": 10,
|
||||
"resp": 10,
|
||||
@@ -1263,6 +1269,7 @@ def run_textual(
|
||||
"path": 40,
|
||||
"model": 24,
|
||||
"effort": 8,
|
||||
"reasoning": 8,
|
||||
"usage": 72,
|
||||
"req": 12,
|
||||
"resp": 12,
|
||||
@@ -1304,6 +1311,7 @@ def run_textual(
|
||||
"path": requests.add_column("Path", width=width_profile["path"], key="path"),
|
||||
"model": requests.add_column("Model", width=width_profile["model"], key="model"),
|
||||
"effort": requests.add_column("Effort", width=width_profile["effort"], key="effort"),
|
||||
"reasoning": requests.add_column("R.Tok", width=width_profile["reasoning"], key="reasoning"),
|
||||
"usage": requests.add_column("Usage", width=self.request_usage_width, key="usage"),
|
||||
"req_bytes": requests.add_column("Req Size", width=width_profile["req"], key="req_bytes"),
|
||||
"resp_bytes": requests.add_column("Resp Size", width=width_profile["resp"], key="resp_bytes"),
|
||||
@@ -1819,7 +1827,7 @@ def print_once(snapshot: dict[str, Any], filter_text: str = "") -> None:
|
||||
try:
|
||||
print(
|
||||
f"{row['seq']:>6} {short_text(request_id_text(row), 16):<16} {short_text(response_id_text(row), 16):<16} {short_text(row.get('thread_id'), 14):<14} {short_time(row.get('started_at')):<19} {status_symbol(row)} {row.get('status_code') or '-':<4} "
|
||||
f"{short_text(row['path'], 20):<20} {short_text(row['model'] or row['requested_model'] or row['forwarded_model'], 16):<16} {short_text(request_effort_text(row), 6):<6} "
|
||||
f"{short_text(row['path'], 20):<20} {short_text(row['model'] or row['requested_model'] or row['forwarded_model'], 16):<16} {short_text(request_effort_text(row), 6):<6} {request_reasoning_tokens_text(row):<6} "
|
||||
f"{short_text(request_usage_summary(row), 26):<26} {format_bytes(row.get('request_body_bytes')):<8} {request_chunk_progress(row):<14} {format_duration_ms_as_seconds(row['duration_ms']):<8} {request_updated_elapsed(row):<8} "
|
||||
f"{short_text(request_retry_note(row), 30)}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user