ReAct loop was terminating early when the model returned:
[Agent ran through N steps...]
{"thought": "...", "action": {...}}
The extract_json function only checked the string start or code fences.
Now scans for { or [ at non-word positions and uses depth-counting
to strip trailing text, allowing JSON buried anywhere in the response.
|
||
|---|---|---|
| .. | ||
| agent | ||
| agent-tool-derive | ||
| api | ||
| avatar | ||
| config | ||
| db | ||
| frontend | ||
| git | ||
| migrate | ||
| models | ||
| observability | ||
| queue | ||
| room | ||
| rpc | ||
| service | ||
| session | ||
| session_manager | ||
| transport | ||
| webhook | ||