Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug]: LangChain drops OpenAI Responses text blocks from session recording

Open Beginner friendly
#5,806 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@ktz03 is already working on this.

Since Oct 9, 2026.

  • #5808 by @ktz03 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
ai

Research direction

Start with the shared text extractor in the LangChain adapter, which currently matches only type="text" blocks. Reproduce with the minimal example: OpenVikingSessionRecorder.record with input_text and output_text blocks, then inspect client.sessions on InMemoryOpenVikingClient and check get_latest_user_text. Done means both block types yield their text, and the existing string, text, and image-only tests still pass.

Written by the indexing model from the issue text.

Description

Issue Origin

Observed or reproduced in a real environment

Bug Description

The LangChain adapter drops OpenAI Responses text blocks from recall queries and recorded session messages. ChatOpenAI(use_responses_api=True) accepts user input_text and assistant output_text blocks, but the adapter's shared text extractor only recognizes type="text". A user message that the model receives with text is persisted as an empty text part; an assistant containing only output_text is skipped.

Steps to Reproduce
  1. Use the current LangChain adapter and HumanMessage(content=[{"type": "input_text", "text": "remember the deployment region is west"}]).
  2. Pass this message through ChatOpenAI(use_responses_api=True) and an OpenVikingSessionRecorder.
  3. Inspect the OpenAI request and recorded session. The model request contains the text; the session contains an empty user text part, and get_latest_user_text returns an empty recall query.
Expected Behavior

Recognize the supported input_text and output_text blocks as text while retaining the current handling of ordinary strings, standard text blocks, and non-text blocks. This does not require storing image data or changing the persisted message schema.

Actual Behavior

The input text is replaced by "". An AIMessage with output_text records no message. Standard text and string controls retain their text; image-only behavior is unchanged.

Minimal Reproducible Example
from langchain_core.messages import HumanMessage, AIMessage
from langchain_openviking import OpenVikingSessionRecorder
from langchain_openviking.testing import InMemoryOpenVikingClient

client = InMemoryOpenVikingClient()
client.create_session("responses-text")
recorder = OpenVikingSessionRecorder(client=client)
recorder.record("responses-text", [
    HumanMessage(content=[{"type": "input_text", "text": "deployment region is west"}]),
    AIMessage(content=[{"type": "output_text", "text": "remembered"}]),
])
print(client.sessions["responses-text"])
# Current main: one user message with parts=[{"type":"text","text":""}].
Error Logs

No exception is raised. On current main, public recording and recall preparation silently omit the supported text.

OpenViking Version

main 49f778011ef4f0b556d6064d4ec90343643668cf

Python Version

Python 3.12.14

Operating System

Windows

Model Backend

OpenAI

Additional Context

Validated with langchain-openai 1.7.0 and OpenAI SDK 3.26.1: public ChatOpenAI.invoke serializes these blocks through the actual SDK. An httpx.MockTransport supplies deterministic Responses replies, so no external request, online model, or deployed OpenViking server was used. The recorder backend is the official deterministic integration fixture. The proposed fix stays in the existing text extractor; it does not change tools, image handling, persistence format, or session lifecycle.

Dominant language
Python
Stars
39.2k
Forks
3.1k
Avg merge
22h 2m
Merged PRs (30d)
440

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from volcengine/OpenViking

All issues in volcengine/OpenViking

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.