[Bug]: LangChain drops OpenAI Responses text blocks from session recording
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
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
- Use the current LangChain adapter and
HumanMessage(content=[{"type": "input_text", "text": "remember the deployment region is west"}]). - Pass this message through
ChatOpenAI(use_responses_api=True)and anOpenVikingSessionRecorder. - 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_textreturns 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
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from volcengine/OpenViking
-
[Bug]: agent capture drops long Unicode text as punctuationPossibly taken @ktz03 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
volcengine/OpenViking#5801 ·
Maintainers usually reply within 1 day
-
[Feature]: hermes-plugin — gate startup recovery for non-primary contexts (cron/subagent/flush)Openagent-plugins
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
volcengine/OpenViking#5714 ·
Maintainers usually reply within 1 day
-
[Bug]: localfs listing aborts when runtime lock entries disappear during metadata lookupPossibly taken @yu1128-L claimed this 6 days ago. Openkernel
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
volcengine/OpenViking#5580 ·
Maintainers usually reply within 1 day
-
Working Memory v2 update branch forces a specific tool_choice, rejected by reasoning models that disallow forced tool_choice (DeepSeek thinking mode → HTTP 400)Possibly taken @varun-projects claimed this 5 days ago. Openkernel
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
volcengine/OpenViking#5565 · 1 comment ·
Maintainers usually reply within 1 day
-
bug kernel
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
volcengine/OpenViking#5552 ·
Maintainers usually reply within 1 day
All issues in volcengine/OpenViking
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
enhancement good first issue Stellar Wave trivial
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
StellarCanary/ProtocolCanary-Fixtures#258 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
IBM/ai-atlas-nexus#295 ·
Maintainers usually reply within 6 days
-
github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Hochfrequenz/aibap.mcp#578 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mishraprafful/multihull#150 ·
Maintainers usually reply within 1 day