fix: unwrap double-nested opencode.ai responses in proxy

opencode.ai returns the real OpenAI-compatible response as a JSON string
inside choices[0].message.content instead of an object. Added an
adaptResponse handler that detects and unwraps this double-nesting,
merging inner usage/token counts and reasoning_content into the
standard envelope.

Also added build/ to .gitignore.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
MythEclipse
2026-06-24 22:19:12 +07:00
co-authored by Claude Sonnet 4.6
parent b69f252f37
commit db281c5175
2 changed files with 43 additions and 0 deletions
+1
View File
@@ -4,6 +4,7 @@ node_modules
# output
out
dist
build
*.tgz
.next/
# code coverage