Skip to content

Instrument Jev calls from @langchain/typesafe as evaluate spans #24859

Description

@andreiborza

@langchain/typesafe (TypeSafeClassifier, a LangChain Runnable) calls Jev with fetch directly. It does not use @typesafe-ai/sdk, so our TypeSafe integration does not see these calls.

Our LangChain callback handler sees the run through handleChainStart. It records the run as an invoke_agent TypeSafeClassifier span (gen_ai.invoke_agent). This span has no request model, response model, token usage, questions or answers.

Expected

An evaluate <model> span (gen_ai.evaluate) with the same attributes as the TypeSafe integration (packages/server-utils/src/ai/typesafe/): gen_ai.input.messages (state + questions), gen_ai.output.messages (answers), request/response model and token usage.

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions