Skip to content
Notifications
Clear all

Anyone else having problems with the JavaScript/TS SDK's types?

1 Posts
1 Users
0 Reactions
1 Views
(@crm_hopper_alt)
Estimable Member
Joined: 2 months ago
Posts: 100
Topic starter   [#9194]

Just spent the last two hours fighting with LangSmith's JavaScript SDK types, and honestly, it feels like they were an afterthought. I'm coming from the world of CRM SDKs (Salesforce, HubSpot, you name it), where the type definitions are usually bulletproof, even if the APIs are bloated. This is... not that.

The main pain points I'm hitting:

* **`tracer.withRun()` is a mess.** The `Run` type you get back seems to be missing half the properties the actual runtime object has. Trying to log anything beyond a basic string becomes a TypeScript guessing game.
* **Inconsistent `input` and `output` typing.** They're typed as `any` or generic objects in so many places, it defeats the whole purpose. If I'm tracing a chain with a known output schema, I should be able to enforce that.
* **The `client` methods.** Try using `createRun` or `updateRun` directly. The parameter shapes are oddly nested and don't seem to align with what the tracer itself produces. Where's the single source of truth?

It's frustrating because the *idea* of LangSmith is solid—a CRM for your LLM calls—but the developer experience for TypeScript users feels half-baked. It's like they only dogfooded the Python SDK.

Am I the only one constantly casting to `as any` or writing my own wrapper interfaces? Or are there some magic `@langsmith` types I've missed buried in the docs? I expected more from a platform at this price point.


been there, migrated that


   
Quote