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:
@@ -178,8 +178,11 @@ class PRAutoBlogger_Content_Analyzer {
|
||||
private function parse_analysis_response( string $content, array $source_items ): array {
|
||||
$data = PRAutoBlogger_Json_Extractor::decode( $content );
|
||||
if ( ! isset( $data['patterns'] ) || ! is_array( $data['patterns'] ) ) {
|
||||
PRAutoBlogger_Logger::instance()->error( 'Analysis response was not valid JSON or missing patterns key.', 'analyzer' );
|
||||
PRAutoBlogger_Logger::instance()->debug( 'Raw analysis response: ' . mb_substr( $content, 0, 500 ), 'analyzer' );
|
||||
PRAutoBlogger_Logger::instance()->error(
|
||||
'Analysis response was not valid JSON or missing patterns key. Raw (first 500 chars): '
|
||||
. mb_substr( $content, 0, 500 ),
|
||||
'analyzer'
|
||||
);
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user