B2BB2B LLM

Search client handling

Parse final answers and research events without assuming one transport shape.

No current prepared translation is available. The English source is shown without machine translation.

Research may involve several tool calls before the model composes its final answer. A client should display progress while preserving the distinction between a completed search action and a completed response.

Request configuration

{"model":"gpt-5.4","input":[{"role":"user","content":[{"type":"input_text","text":"Check the publisher's release notes and cite the source."}]}],"tools":[{"type":"web_search"}],"tool_choice":"required","include":["web_search_call.action.sources"],"stream":true}

Send that object to https://api.b2b-llm.com/v1/responses. Avoid copying optional sampling or background fields from an unrelated provider. Extra output controls should only be added when the selected model supports them.

Response decoding

For JSON, inspect the completed output array, collecting assistant output_text blocks and the web_search_call source inventory separately. For SSE, consume complete event frames and use the terminal response object when supplied. If a compatible upstream streams despite a non-streaming preference, a JSON-only parser may incorrectly reject usable output; account for the actual content type and event structure.

event: response.output_text.delta
data: {"type":"response.output_text.delta","delta":"Release notes"}

event: response.completed
data: {"type":"response.completed","response":{"status":"completed","output":[]}}

This shortened sequence shows framing, not a complete answer. Do not classify an error or incomplete final response as success solely because some text arrived earlier. Preserve the safe HTTP error body and request ID. A prolonged research call can be billable even when the requesting tab closes, so do not use blind transport retries as a recovery policy.

B2B LLM's interactive verification keeps evaluation in the open browser and does not persist raw output for a background evaluator. An ordinary SDK integration is responsible for its own transport lifecycle.