fix: bump API timeout to 180s, surface raw response in error logs (v0.4.8)

GLM 4.7 Flash was timing out at 120s on large analysis prompts.
Parse failure errors now log the raw LLM response at error level
(not debug) so the root cause is always visible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
peptiderepo
2026-04-19 23:17:13 +07:00
parent 36d45fd1ed
commit 10c812d191
4 changed files with 23 additions and 7 deletions

View File

@@ -155,8 +155,11 @@ class PRAutoBlogger_Chief_Editor {
$data = PRAutoBlogger_Json_Extractor::decode( $content );
if ( ! is_array( $data ) || ! isset( $data['verdict'] ) ) {
PRAutoBlogger_Logger::instance()->error( 'Chief editor response was not valid JSON. Defaulting to rejected.', 'editor' );
PRAutoBlogger_Logger::instance()->debug( 'Raw editor response: ' . mb_substr( $content, 0, 500 ), 'editor' );
PRAutoBlogger_Logger::instance()->error(
'Chief editor response was not valid JSON. Defaulting to rejected. Raw (first 500 chars): '
. mb_substr( $content, 0, 500 ),
'editor'
);
return new PRAutoBlogger_Editorial_Review( [
'verdict' => 'rejected',
'notes' => 'Editor response could not be parsed.',