.agents/skills/llmobs-integration/references/category-detection.md
Detailed guide for classifying an instrumented surface by how it gets responses. These are working categories, not constants in the codebase. The operation itself determines its span kind and fields.
Definition: Direct wrappers around LLM provider APIs.
Examples:
@google/genai - Google GenAI client (recommended reference implementation)@anthropic-ai/sdk - Anthropic Claude client (recommended reference implementation)openai - OpenAI API clientObservable signs:
chat.completions.create, messages.create)fetchTest strategy: exercise the real client through VCR or a canned fetch
Definition: Unified interfaces that abstract multiple LLM providers.
Examples:
ai - Vercel AI SDKlangchain - LangChain frameworkObservable signs:
Test strategy: exercise the real provider path through VCR or an injected fetch
Definition: Workflow/graph managers that coordinate LLM calls but don't make them directly.
Examples:
@langchain/langgraph - LangGraph workflow engineObservable signs:
invoke, stream, run)Test strategy: Pure function tests, NO VCR, NO real API calls
Definition: Communication protocols, server frameworks, infrastructure layers.
Examples:
Observable signs:
Test strategy: the SDK's own server and client over its in-memory transport
The component that performs provider HTTP determines the response strategy. A configurable provider surface is multi-provider even when the caller supplies the provider from another package. Without provider traffic, graph or workflow execution means orchestration and a protocol implementation means infrastructure.
Inspect versions/<package>@<range>/node_modules/<package>/ and find the exported operation being instrumented.
Follow that operation through wrappers and adapters to the code that produces its result.
Use package.json and constructor options to confirm the source trace:
Names such as openai, langgraph, or mcp are useful search hints, not classifications. Hybrid packages and
provider adapters are classified per instrumented operation, regardless of package name.
| Package | Category | Deciding signal |
|---|---|---|
@anthropic-ai/sdk | LLM client | messages.create calls the Claude API directly, needs a key |
@google/genai | LLM client | calls the Gemini API directly, nested contents / parts format |
ai | multi-provider | accepts separately installed provider implementations behind one API |
@langchain/langgraph | orchestration | StateGraph.invoke / Pregel.stream manage state, no provider calls |
When signals conflict or are weak, classify each instrumented surface by its response source. Provider-backed calls
use VCR or an injected fetch; orchestration uses plain node responses; infrastructure uses the SDK's in-memory
transport.
Some packages don't fit cleanly: