Summary
The Ollama JavaScript SDK (ollama on npm, v0.6.3, ~607K weekly downloads) provides execution APIs for running LLM inference locally via an Ollama server. It has a distinct, non-OpenAI-compatible TypeScript API covering chat completions, text generation, and embeddings. This repository has zero instrumentation for any Ollama SDK surface — no wrapper, no channels, no plugin, no auto-instrumentation config. Users who call the ollama JS SDK directly get no Braintrust spans.
What instrumentation is missing
The ollama npm package exposes these execution surfaces, none of which are instrumented:
| SDK Method |
Description |
ollama.chat({ model, messages }) |
Chat completions with conversation history and tool use |
ollama.generate({ model, prompt }) |
Raw prompt-based text generation |
ollama.embed({ model, input }) |
Generate text embeddings |
Streaming variants (stream: true on any of the above) |
Returns AsyncGenerator yielding incremental chunks |
These methods use Ollama-specific request/response schemas and differ from the OpenAI SDK API shape. Users cannot use wrapOpenAI() or any existing wrapper with the ollama npm SDK.
No coverage in any instrumentation layer:
- No wrapper function (e.g.
wrapOllama())
- No diagnostics channels for Ollama methods
- No plugin handler in
js/src/instrumentation/plugins/
- No auto-instrumentation config in
js/src/auto-instrumentations/configs/
- No e2e test scenarios
A search for ollama across js/src/ returns zero matches.
Indirect coverage exists but is limited:
Users can access Ollama models through the Vercel AI SDK (@ai-sdk/ollama provider), which is instrumented. However, users who call the ollama npm SDK directly — which is the primary SDK documented by Ollama — get no tracing. While Ollama also exposes an OpenAI-compatible REST endpoint, the ollama SDK's own type-safe API does not route through the openai package and is not patched by the OpenAI plugin.
Context
Ollama is the dominant platform for local LLM inference in development environments, and the ollama npm SDK is its TypeScript-first client with ~607K weekly downloads. The SDK supports streaming, multimodal inputs, and tool calling via its own distinct API surface.
Braintrust docs status
not_found — Braintrust does not have a dedicated Ollama SDK instrumentation page. The Ollama SDK is not listed on https://www.braintrust.dev/docs/guides/tracing or the integrations index.
Upstream references
Local files inspected
js/src/auto-instrumentations/configs/ — no Ollama config entry
js/src/instrumentation/plugins/ — no Ollama channels or plugin
e2e/scenarios/ — no Ollama test scenarios
- Full repo grep for
ollama in js/src/ — zero matches
Summary
The Ollama JavaScript SDK (
ollamaon npm, v0.6.3, ~607K weekly downloads) provides execution APIs for running LLM inference locally via an Ollama server. It has a distinct, non-OpenAI-compatible TypeScript API covering chat completions, text generation, and embeddings. This repository has zero instrumentation for any Ollama SDK surface — no wrapper, no channels, no plugin, no auto-instrumentation config. Users who call theollamaJS SDK directly get no Braintrust spans.What instrumentation is missing
The
ollamanpm package exposes these execution surfaces, none of which are instrumented:ollama.chat({ model, messages })ollama.generate({ model, prompt })ollama.embed({ model, input })stream: trueon any of the above)AsyncGeneratoryielding incremental chunksThese methods use Ollama-specific request/response schemas and differ from the OpenAI SDK API shape. Users cannot use
wrapOpenAI()or any existing wrapper with theollamanpm SDK.No coverage in any instrumentation layer:
wrapOllama())js/src/instrumentation/plugins/js/src/auto-instrumentations/configs/A search for
ollamaacrossjs/src/returns zero matches.Indirect coverage exists but is limited:
Users can access Ollama models through the Vercel AI SDK (
@ai-sdk/ollamaprovider), which is instrumented. However, users who call theollamanpm SDK directly — which is the primary SDK documented by Ollama — get no tracing. While Ollama also exposes an OpenAI-compatible REST endpoint, theollamaSDK's own type-safe API does not route through theopenaipackage and is not patched by the OpenAI plugin.Context
Ollama is the dominant platform for local LLM inference in development environments, and the
ollamanpm SDK is its TypeScript-first client with ~607K weekly downloads. The SDK supports streaming, multimodal inputs, and tool calling via its own distinct API surface.Braintrust docs status
not_found— Braintrust does not have a dedicated Ollama SDK instrumentation page. The Ollama SDK is not listed on https://www.braintrust.dev/docs/guides/tracing or the integrations index.Upstream references
ollamanpm package: https://www.npmjs.com/package/ollamaLocal files inspected
js/src/auto-instrumentations/configs/— no Ollama config entryjs/src/instrumentation/plugins/— no Ollama channels or plugine2e/scenarios/— no Ollama test scenariosollamainjs/src/— zero matches