Skip to content

ai_assistant_provider_request_max_chars

github-actions[bot] edited this page Nov 14, 2026 · 6 revisions

Filters the approximate serialized request budget used before an LLM provider call.

If compacted messages still exceed this local budget, older history may be trimmed from the outgoing request while the saved conversation remains intact.

Auto-generated Example

add_filter(
   'ai_assistant_provider_request_max_chars',
    function( int $chars ) {
        // Your code here.
        return $chars;
    }
);

Parameters

  • int $chars Maximum provider request size in characters. Default 163840.

Files

apply_filters('ai_assistant_provider_request_max_chars', 160 * 1024)

← All Hooks

Clone this wiki locally