fix: tolerate markdown-fenced JSON from LLM responses (v0.4.3)
Models like GPT 5.1 Nano ignore response_format: json_object and wrap
their JSON in ```json fences or add preamble text. New Json_Extractor
utility tries: (1) direct decode, (2) strip markdown fences, (3) find
outermost { ... } substring. Applied to analyzer and chief editor
parsers. Raw response logged on parse failure for debugging.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
10
CHANGELOG.md
10
CHANGELOG.md
@@ -5,6 +5,16 @@ All notable changes to PRAutoBlogger will be documented in this file.
|
||||
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project uses [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## [0.4.3] — 2026-04-19
|
||||
|
||||
### Fixed
|
||||
- **"Analysis response was not valid JSON" with some models.** Models like
|
||||
GPT 5.1 Nano ignore `response_format: json_object` and wrap JSON in markdown
|
||||
fences or preamble text. New `PRAutoBlogger_Json_Extractor` utility strips
|
||||
fences and extracts the outermost JSON object. Applied to both the content
|
||||
analyzer and chief editor parsers. Raw response now logged on failure for
|
||||
debugging.
|
||||
|
||||
## [0.4.2] — 2026-04-19
|
||||
|
||||
### Fixed
|
||||
|
||||
Reference in New Issue
Block a user