feat(agent): add further_questions to ConversationResponse - #564
Merged
Conversation
The agent workflow_finished event's outputs carry a further_questions list (suggested follow-ups, "you might also ask") that the SDK dropped: WorkflowOutputs only modeled answer and references, so the field was lost on both the streamed WorkflowFinished outcome and the folded ConversationResponse. Add further_questions: Option<Vec<String>> to the core WorkflowOutputs and ConversationResponse, thread it through from_stream_parts, and expose it across every binding (Python, Node.js, Java, C) mirroring how the existing string-list fields are surfaced. The C header is regenerated by cbindgen.
hogan-yuan
added a commit
to vingel/longbridge-terminal
that referenced
this pull request
Aug 11, 2026
Replace the hand-rolled reqwest/SSE agent client with the SDK's AgentContext (longbridge >= 4.4.2), pinned for now to the feat/agent-further-questions branch that adds the one field the SDK was missing (ConversationResponse.further_questions). - openapi/context.rs: add a global AGENT_CTX / agent(), and drop the SSE-only host-resolution scaffolding this feature had added (resolve_endpoints, effective_http_url, captured_http_url_override, the using_api_key global accessor, and the main() .env capture). - auth.rs: drop access_token(); the plaintext OAuth token no longer leaves the SDK now that the SSE transport goes through HttpClient. - client.rs: LbAgentApi lists via agent().workspaces()/.agents(); stream_conversation drives conversation_streamed / continue_conversation_streamed and maps ConversationStreamEvent onto the existing AgentEvent. Shared rate limiter + pre-stream 429 retry are preserved. - events.rs: the raw SSE parser (parse_data_line / SseLineBuffer) is now test-only; the SDK owns wire parsing, and the golden fixture still cross-checks the event shapes the mapping depends on. - chat.rs: call sites use a typed ConversationRequest instead of (path, body). Depends on longbridge/openapi#564; once merged, drop the branch pin in Cargo.toml and cargo update back to main.
hogan-yuan
added a commit
to longbridge/openapi-go
that referenced
this pull request
Aug 11, 2026
## What The agent `workflow_finished` event's `outputs` carry a `further_questions` list — the "you might also ask" follow-up suggestions — that the Go SDK dropped. `ConversationResponse` and the internal `workflowOutputs` only modeled `answer`/`references`, so the field was lost on both the blocking response and the streamed `WorkflowFinishedEvent`. ## Change - Add `FurtherQuestions []string` (`json:"further_questions"`) to `ConversationResponse` and its `UnmarshalJSON` raw struct. - Add it to the internal `workflowOutputs` and thread it through the `workflow_finished` fold in `stream.go`. ## Tests Extended the blocking `TestUnmarshalSucceededConversationResponse` and the streamed `workflow_finished` assertion to cover `FurtherQuestions`. `go test ./agent/`, `go vet`, and `gofmt` all clean. Companion to longbridge/openapi#564 (same field across the other language SDKs).
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.
What
The agent
workflow_finishedevent'soutputscarry afurther_questionslist — the "you might also ask" follow-up suggestions — that the SDK silently dropped.WorkflowOutputsonly modeledanswerandreferences, so the field never reached callers on either the streamedWorkflowFinishedoutcome or the foldedConversationResponse.Change
rust): addfurther_questions: Option<Vec<String>>toWorkflowOutputsandConversationResponse, and thread it throughConversationResponse::from_stream_parts.#[pyclass] ConversationResponse+Fromimpl +openapi.pyistubConversationResponse+Fromimpl +index.d.tsConversationResponse(#[java(objarray)]) +ConversationResponse.java(String[]getter /toString)CConversationResponse(*const *const c_char+num_further_questions, mirroringreference_domains);longbridge.hregenerated by cbindgenTests
Extended the Rust
workflow_finisheddeserialize test to coverfurther_questionsthreading. Each binding crate builds clean.Why now
Downstream (
longbridge-terminal) is moving its hand-rolled agent SSE client ontoAgentContext; this is the one field the SDK was missing for that migration to be lossless.