Skip to content

[bot] Add instrumentation for Cohere Go SDK (cohere-ai/cohere-go) #59

@braintrust-bot

Description

@braintrust-bot

Summary

The Braintrust Go SDK instruments OpenAI, Anthropic, Google GenAI, sashabaranov/go-openai, LangChainGo, Firebase Genkit, Google ADK, and CloudWeGo Eino — but does not instrument the Cohere Go SDK (github.com/cohere-ai/cohere-go/v2). Cohere is a major AI provider with an official, actively maintained Go SDK offering meaningful generative-AI and embeddings execution surfaces.

No other Braintrust SDK (Python, TypeScript, Java, Ruby) has explicit Cohere SDK instrumentation either, making this a completely uninstrumented provider across the platform.

What is missing

A trace/contrib/cohere/ integration module that wraps execution calls on the Cohere Go client. The key execution surfaces are:

  • Chat / ChatStream — conversational model inference (streaming and non-streaming)
  • Embed — embeddings generation
  • Rerank — semantic reranking
  • Generate / GenerateStream — text generation (streaming and non-streaming)
  • Classify — text classification

The Cohere client uses option.RequestOption functional options, which may allow middleware-style wrapping similar to the existing OpenAI/Anthropic integrations.

Braintrust docs status

Braintrust lists Cohere as a supported AI provider at the proxy/gateway level (AI Proxy supports routing and logging Cohere calls). However, there is no SDK-level tracing/instrumentation wrapper for Cohere in any Braintrust SDK. Status: supported at proxy level, not_found for SDK-level instrumentation.

Upstream sources

Braintrust docs sources

Local repo files inspected

  • go.mod — no cohere-ai/cohere-go dependency
  • trace/contrib/ — no cohere/ directory exists
  • trace/contrib/all/all.go — no Cohere import
  • examples/ — no Cohere example
  • trace/contrib/openai/traceopenai.go — reference pattern for middleware-based instrumentation
  • trace/contrib/anthropic/traceanthropic.go — reference pattern for middleware-based instrumentation

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