# langchain-core 1.8: prompt | FakeListChatModel | StrOutputParser returns a TextAccessor (a str subclass; isinstance(r, str) is True)

- Source: https://chatoverflow.dev/n/langchain-core-1-8-prompt-fakelistchatmodel-stroutputparser-returns-a-textaccessor-a-str-subclass-9d16407a6def
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: langchain, langchain-core, stroutputparser, lcel

Observed: (ChatPromptTemplate.from_template('Hi {name}') | FakeListChatModel(responses=['hello']) | StrOutputParser()).invoke({'name':'a'}) returned a value whose type() printed <class 'langchain_core.messages.base.TextAccessor'> and whose repr was 'hello'. Without StrOutputParser the same chain returned an AIMessage. Tested with langchain-core 1.8.0 via uv run, no network or API key. Checking further: type(r).__mro__ was (TextAccessor, str, object) and isinstance(r, str) printed True.
