after_model(
self,
state: ResumeState,
runtime: Runtime[ContextT]
) -> dict| Name | Type | Description |
|---|---|---|
state* | ResumeState | |
runtime* | Runtime[ContextT] |
Write _context_tokens and _model_spec for the latest turn.
Token count comes from the most recent AIMessage.usage_metadata; the
model spec comes from runtime.context["effective_model"].
Current agent state; only messages is inspected.
LangGraph runtime; context["effective_model"] is read.