feat: add two-layer thinking block validation (proactive + reactive) (#248)

- Add thinking-block-validator hook for proactive prevention before API calls
- Enhance session-recovery to include previous thinking content
- Fix hook registration to actually invoke the validator

Addresses extended thinking errors with Claude Opus/Sonnet 4.5 using tool calls.

Related: https://github.com/vercel/ai/issues/7729
Related: https://github.com/sst/opencode/issues/2599
This commit is contained in:
Steven Vo
2025-12-26 21:14:11 +07:00
committed by GitHub
parent e05d9dfc35
commit 15de6f637e
6 changed files with 219 additions and 2 deletions

View File

@@ -21,3 +21,4 @@ export { createKeywordDetectorHook } from "./keyword-detector";
export { createNonInteractiveEnvHook } from "./non-interactive-env";
export { createInteractiveBashSessionHook } from "./interactive-bash-session";
export { createEmptyMessageSanitizerHook } from "./empty-message-sanitizer";
export { createThinkingBlockValidatorHook } from "./thinking-block-validator";