Update the system prompt, filter tools, and evict oversized HumanMessages.
In addition to the system-prompt and tool-filtering logic, this method handles large HumanMessage eviction:
lc_evicted_to in
additional_kwargs is replaced with a truncated preview for the
model request (content in state is unchanged).ExtendedModelResponse.wrap_model_call(
self,
request: ModelRequest[ContextT],
handler: Callable[[ModelRequest[ContextT]], ModelResponse[ResponseT]]
) -> ModelResponse[ResponseT] | ExtendedModelResponse| Name | Type | Description |
|---|---|---|
request* | ModelRequest[ContextT] | The model request being processed. |
handler* | Callable[[ModelRequest[ContextT]], ModelResponse[ResponseT]] | The handler function to call with the modified request. |