Repository navigation
langsmith: take LangSmith agent addresses as AgentAddress dicts - #453
Merged
Merged
Conversation
LangSmith 0.14.10 replaced string addresses (lrn:agents/...) and langsmith.address.parse with AgentAddress dicts built by langsmith.agent_address(). The plugin's address option still parsed strings, so it failed on every LangSmith release the nightly installs. - LangSmithPlugin and LangSmithInterceptor take an AgentAddress and check it with langsmith.address.ensure_agent. - Replica addresses written into Temporal headers use LangSmith's lrn: wire form, which is the only form LangSmith reads back. They were dropped on the other side before. - Lock langsmith 0.14.12 and build test addresses with agent_address. Fixes #413.
xumaple
reviewed
Nov 9, 2026
patbeqo
approved these changes
Nov 13, 2026
…ddress-413 # Conflicts: # python/langsmith/uv.lock
Drop support for LangSmith before 0.14. 0.14.0 and 0.14.1 were already excluded, so the floor is now 0.14.2. Every release from 0.14.2 on has run_helpers._resolve_traceable_addressing, run_helpers._addressing_tiers and RunTree.address. The plugin now uses them directly, so the _setup_run and _get_project_name fallback for older releases is gone, along with the tests that faked those releases.
xumaple
approved these changes
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
LangSmithPluginandLangSmithInterceptortake anAgentAddressand check it withlangsmith.address.ensure_agent. On LangSmith older than 0.14.10,address=raises a clear error. Project-based tracing still works there.langsmith>=0.14.2, since 0.14.0 and 0.14.1 were already excluded. Every release from 0.14.2 on has_resolve_traceable_addressing,_addressing_tiersandRunTree.address, so the plugin uses them directly. That drops the_setup_runand_get_project_namefallback for older releases, and the tests that faked them. CI doesn't run any release before 0.14, so only those fakes checked that code.to_headers(), so the plugin writes them itself, but it wrote each address as a JSON dict. LangSmith only reads a replica address back in itslrn:form (lrn:agents/<id>/environments/<env>, the same form it writes for a run's own address), so it logged "Ignoring an unusable address in abaggageheader" and dropped it. The plugin now writes thatlrn:form itself, without importing anything fromlangsmith._internal. Two existing tests read it back with the publicRunTree.from_headers, so if LangSmith ever changes the format, CI tells us.uv.lockmoves LangSmith from 0.14.4 to 0.14.12. Tests and the README build addresses withagent_address.address=came in with #115 and hasn't been released yet (the last release, 0.1.1, came out on 10-28), so nobody depends on the string form.Why?
The langsmith nightly has been red since #115 merged. Why? LangSmith changed what an agent address is, and the plugin still speaks the old format.
In LangSmith 0.14.4, the version we lock, an address is a string like
"lrn:agents/support/environments/staging", andlangsmith.address.parsereads it. From 0.14.10 on, the string andparseare gone. An address is now anAgentAddressdict that you build withlangsmith.agent_address("support", "staging"), and LangSmith rejects strings. The nightly installs 0.14.12, soaddress=fails with 7 pyright errors and 22 failing tests.The other two nightly failures already have fixes: google_adk in #446 and openai_agents in #447.
Checklist
Fixes nightly: python/langsmith failing (latest) #413.
How was this tested:
I ran
make lintandmake testwith four sets of dependencies:On 0.14.2, I skipped the 3 test files that build addresses with
agent_address, since it only came in 0.14.9. Everything else passes there.0.14.17 comes out of the 2-week cooldown in 3 days, and it doesn't break this again.
python/langsmithREADME builds addresses withagent_address.Let me know what you think!