Private
Public Access
0
0
Files
manual_slop/src
ed 1b62659c8c feat(openai_schemas): add from_dict to ChatMessage, ToolCall, UsageStats
Infrastructure change required by Phase 5/6/7 of the
type_alias_unfuck_20260626 track. The plan's migration pattern
(var = Aggregate.from_dict(var)) requires from_dict on the
target dataclasses. None existed for the openai_schemas
classes, so this commit adds them.

from_dict semantics:
- Filter dict keys to only the dataclass fields (ignore extra keys
  like _est_tokens)
- For ChatMessage: convert nested tool_calls list to tuple of ToolCall
- For ToolCall: convert nested function dict to ToolCallFunction
- For UsageStats: direct field mapping

Field definitions unchanged. Behavior: zero impact on existing tests
(no callers exist yet for from_dict on these classes).

Tests: syntax check OK; manual instantiation confirms from_dict works.
2026-06-25 20:14:02 -04:00
..
2026-06-06 10:24:22 -04:00
2026-06-07 01:08:31 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 11:08:07 -04:00
2026-06-06 11:08:07 -04:00