Skip to content

[bot] Instrument Writer AI Python SDK (197,670 weekly downloads) #644

Description

@braintrust-bot

Summary

The Writer AI Python SDK (writer-sdk, importable as writerai) is the official Stainless-generated Python client for Writer's Palmyra model family (e.g. palmyra-x5). Its Writer/AsyncWriter clients expose a chat completions execution surface with streaming support. This repository has zero instrumentation for any Writer SDK surface — no integration directory, no wrapper, no patcher, no auto_instrument() support.

Weekly downloads: 197,670 (as of 2026-08-03; https://pypistats.org/packages/writer-sdk)

What's missing

  • client.chat.chat(messages=[...], model="palmyra-x5", ...) — the primary chat completions execution surface. Response exposes choices[0].message.content.
  • Streamingstream=True returns chunks where content arrives via choices[0].delta.content instead of choices[0].message.content; the streaming span lifecycle (start on call, accumulate deltas, finalize on exhaustion) is unhandled.
  • Async clientAsyncWriter mirrors the sync client's chat.chat() surface and is equally uninstrumented.
  • Optional aiohttp backend (pip install writer-sdk[aiohttp]) — an alternate transport path for the async client, also uncovered.

None of these surfaces appear in py/src/braintrust/integrations/, py/src/braintrust/wrappers/, py/noxfile.py nox sessions, py/src/braintrust/integrations/versioning.py, or py/pyproject.toml's [tool.braintrust.matrix]. A case-insensitive grep for writer across py/src/braintrust/ returns only incidental matches (stream_writer, WAV file writer objects in the LiveKit integration) — no actual Writer AI SDK references.

Braintrust docs status

not_found — Writer / Palmyra is not mentioned on https://www.braintrust.dev/docs/guides/tracing/integrations (checked 2026-08-03), which lists model-provider and agent-framework integrations including OpenAI, Anthropic (Claude Agent SDK), LangChain, CrewAI, AutoGen, AgentScope, Google ADK, LiveKit Agents, Pydantic AI, Strands, and others, but no Writer/Palmyra entry.

Upstream sources

Braintrust docs sources checked

Local repo files inspected

  • py/src/braintrust/integrations/__init__.py — Writer not listed in the integration registry
  • py/src/braintrust/integrations/ — no writer/ directory
  • py/src/braintrust/wrappers/ — no Writer wrapper
  • py/src/braintrust/integrations/versioning.py — no Writer version entry
  • py/pyproject.toml — no writer/writer-sdk/writerai entry in [tool.braintrust.matrix]
  • py/noxfile.py — no test_writer session
  • Case-insensitive grep for writer across py/src/braintrust/ — only incidental matches (stream_writer, WAV writer objects), no real SDK coverage

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions