You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeSafe's official SDK (@typesafe-ai/sdk, latest 0.6.0) calls the Jev evaluation model with TypeSafeClient.systemOne({ state, questions, model? }). Users who call Jev directly (not through Vercel AI experimental_evaluate, see #24692) get no span today, only a plain http.client span from fetch.
Scope
Add a new AI integration in packages/server-utils/: logic in src/ai/typesafe/, integration in src/integrations/typesafe.ts, registered in getTracingIntegrations(). Re-export it from the runtime packages.
Instrument TypeSafeClient.prototype.systemOne. Make one span for each call, not one span for each retry.
models.list() is out of scope.
Target span
Use the same shape as the Vercel AI evaluate span in #24692, so that both paths look the same in the product.
Name: evaluate <model>, op gen_ai.evaluate, origin auto.ai.typesafe
One edge case worth pinning in the node integration test: systemOne answers are intentionally heterogeneous—Choice/Score expose confidence and probabilities, while Noul has no separate confidence. Please assert that the wrapper records answers losslessly rather than normalizing every question into one shape.
I would also cover recordInputs: false and recordOutputs: false on both success and TypeSafeError, so state/questions/answers cannot reappear through exception or fallback attributes. We use the same boundary in Jev Social because state can contain captured social evidence.
Activity
linear-code commentedon Sep 24, 2026
JS-3783
IRONICBo commentedon Sep 24, 2026
One edge case worth pinning in the node integration test:
systemOneanswers are intentionally heterogeneous—Choice/Score expose confidence and probabilities, while Noul has no separate confidence. Please assert that the wrapper recordsanswerslosslessly rather than normalizing every question into one shape.I would also cover
recordInputs: falseandrecordOutputs: falseon both success andTypeSafeError, so state/questions/answers cannot reappear through exception or fallback attributes. We use the same boundary in Jev Social because state can contain captured social evidence.andreiborza commentedon Sep 25, 2026
@IRONICBo thank you for the suggestions, I'll incorporate them.
feat(server-utils): Add TypeSafe integration (#24703)
github-actions commentedon Sep 28, 2026
A PR closing this issue has just been released 🚀
This issue was referenced by PR #24703, which was included in the 11.1.0 release.