fix(background): pass full response to parse handler, not just body#2955
Open
ImmanuelHaffner wants to merge 1 commit intoolimorris:mainfrom
Open
fix(background): pass full response to parse handler, not just body#2955ImmanuelHaffner wants to merge 1 commit intoolimorris:mainfrom
ImmanuelHaffner wants to merge 1 commit intoolimorris:mainfrom
Conversation
Both ask_sync and ask_async were passing `response.body` (a raw JSON
string) to the adapter's parse handler (e.g. `chat_output`). In
non-streaming mode the handler expects the full response table
`{body, status, headers, …}` and internally does `data = data.body`.
Passing the pre-extracted string caused `data.body` to resolve to nil,
silently breaking all background interactions (e.g. auto-title
generation never produced a title).
Pass the full `response` table so the handler can extract `.body`
itself, consistent with how the main chat HTTP path works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Both ask_sync and ask_async were passing
response.body(a raw JSON string) to the adapter's parse handler (e.g.chat_output). In non-streaming mode the handler expects the full response table{body, status, headers, …}and internally doesdata = data.body. Passing the pre-extracted string causeddata.bodyto resolve to nil, silently breaking all background interactions (e.g. auto-title generation never produced a title).Pass the full
responsetable so the handler can extract.bodyitself, consistent with how the main chat HTTP path works.AI Usage
Yes, Claude Opus 4.6 through CC ;)
Related Issue(s)
Screenshots
N/A
Checklist
make allto ensure docs are generated, tests pass and StyLua has formatted the code