Skip to content

fix: cover langchain 0.1.87, llama-index 4.7.7 and anthropic 3.3.6 in the newest-instrumentor checks - #294

Merged
PabloPardoGarcia merged 1 commit into
mainfrom
pablo/stopgaps-langchain-0-1-87
Nov 17, 2026
Merged

PabloPardoGarcia merged 1 commit into
mainfrom
pablo/stopgaps-langchain-0-1-87

Conversation

@PabloPardoGarcia

Copy link
Copy Markdown
Member

The scheduled newest-instrumentors run went red on 2026-11-17 (run 44021844284). The push run at 23:10Z on 2026-11-16 passed. OpenInference then released three instrumentors at 23:47Z: langchain 0.1.87, llama-index 4.7.7 and anthropic 3.3.6. The same job fails on #292.

The failing run stopped at the stopgap step, with 16 failures: 9 in LangChain ("the provider span has no parent", install() returned False) and 7 in LlamaIndex (install() returned False). The anthropic step never ran. Run locally, it fails too, on the tool-definition check.

What changed upstream (compared from the wheels)

  • openinference-instrumentation-langchain 0.1.86 → 0.1.87: _tracer.py adds a retriever document's id as document.id. Same dependency floors. The stopgap uses none of it: _tracer.get_span() and the hooked langchain-core methods are unchanged. Widened to 0.1.87.
  • openinference-instrumentation-llama-index 4.7.6 → 4.7.7: ships the upstream streaming fix (fix(llama_index): make the span current while each step of an LLM stream runs Arize-ai/openinference#4115). A new _llm_stream.py wraps stream_chat, stream_complete, astream_chat and astream_complete on every BaseLLM and MultiModalLLM subclass, including ones defined later. Each step of the stream runs with the LLM span current. The span handler now hands that span over through pop_llm_stream_span. This is the stopgap's job, done upstream. So, like the LiteLLM stopgap from 0.1.51, the LlamaIndex stopgap stays out from 4.7.7 and its range still ends at 4.7.6. In the failing run, every end-to-end nesting and counts-once test already passed on 4.7.7 with the stopgap not installed.
  • openinference-instrumentation-anthropic 3.3.5 → 3.3.6: _get_llm_tools now writes llm.tools.N.tool.name and llm.tools.N.tool.description next to llm.tools.N.tool.json_schema. They are copies of fields in the schema. We reassembled the schemas into gen_ai.tool.definitions but left the copies on the span. They are content by prefix, so capture_content=False still strips them and nothing escaped. They were duplicates, though.

Changes

  • langchain_span_context.VERIFIED_VERSIONS now ends at 0.1.87.
  • llama_index_span_context: the range is unchanged, with a comment explaining why it stops at 4.7.6. In the tests, the six that need the stopgap installed (subclass hook, re-init, install twice, handler order, uninstall, busy handler) are marked @installs. That skips them past the verified range, the same way the LiteLLM re-init test does. test_an_unverified_version_installs_nothing now takes its baseline after instrument(), because 4.7.7 wraps the stream methods itself.
  • normalize_tool_definitions drops llm.tools.N.tool.name and .description for each index whose schema it reassembled. A name at an index with no schema is left alone. When any schema fails to parse, the whole family is still left untouched. There are three new tests in tests/test_normalization_tools.py.

Verification

  • Locked versions: ruff check, ruff format --check and mypy are clean. pytest: 3129 passed, 22 skipped, 1 xfailed.
  • After the same uv lock --upgrade-package … step as newest-instrumentors (OI langchain 0.1.87, OI llama-index 4.7.7, OI litellm 0.1.58, OI anthropic 3.3.6, anthropic 2.9.0, langchain-core 1.8.1, langchain-openai 1.8.0, litellm 1.109.1, llama-index-core 0.14.26, llama-index-llms-openai 0.9.0):
    • stopgap step: 90 passed, 7 skipped (the 6 @installs tests and the LiteLLM re-init test)
    • anthropic step: 74 passed, 14 skipped. It was 1 failed before the normalization change.
    • full suite: 3122 passed, 29 skipped, 1 xfailed

uv.lock is unchanged, as in #257, #268 and #282. Dependabot handles the bumps.

… the newest-instrumentor checks

OpenInference released langchain 0.1.87, llama-index 4.7.7 and anthropic 3.3.6 on 2026-11-16 at 23:47Z, and the scheduled newest-instrumentors run went red.

langchain 0.1.87 only adds a retriever document id. Widened the LangChain stopgap to it.

llama-index 4.7.7 runs each step of a streamed LLM call with its span current by itself, so the LlamaIndex stopgap stays out from there and its range keeps ending at 4.7.6. The tests of how it installs skip on releases past it.

anthropic 3.3.6 writes each tool's name and description as llm.tools.N.tool.name and .description beside the schema. They are copies of the schema, so they now leave with it when the definitions are reassembled.
@PabloPardoGarcia
PabloPardoGarcia merged commit db59afc into main Nov 17, 2026
12 checks passed
@PabloPardoGarcia
PabloPardoGarcia deleted the pablo/stopgaps-langchain-0-1-87 branch November 17, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant