Skip to content

v0.22.1

Choose a tag to compare

@basepointer basepointer released this 20 Oct 21:24

Fixed

  • A streamed Anthropic call is one call again, not two with doubled tokens (anthropic 1.14
    and later, under init(anthropic=True)). The SDK traces each request itself, without the
    messages, beside OpenInference's span of the same call. 0.22.0 merged the two when the SDK's
    span sits inside OpenInference's, as it does for messages.create(). For
    client.messages.stream() they are siblings instead: the request goes out after
    OpenInference's span stops being current. So a streamed call was counted twice inside a run,
    and outside one it was sent as two traces, one of them empty. Where DecimalAI turned
    OpenInference's Anthropic instrumentor on, the SDK's own call spans are now dropped, which is
    the record anthropic 1.13 gave. Elsewhere they are kept, since they may be the only record.
  • An async load_skill no longer cancels its run's routing decision. A load waits up to 2 s for
    its run's decision, which is recorded in the background. In an async run that wait was
    asyncio.wait_for() around the decision itself. When it timed out with the decision still
    queued (the pool busy with other runs), the decision was cancelled, and that run's trace never
    got it. Now the load stops waiting and leaves the decision running, and the wait holds no
    thread. This affected async runs of the OpenAI Agents, Pydantic AI and Google ADK
    agent_config() bindings.
  • Async runs work without an asyncio event loop. Under trio, the routing and the skill loads
    now go to anyio's worker thread, and a cancelled run returns at once rather than after its
    thread. Before, the routing failed quietly, and the run had no skills.
  • agent_config() no longer switches DecimalAI back on after init(enabled=False). The kill
    switch leaves no client, and decimalai.agent_config() and the OpenAI Agents, Pydantic AI and
    Google ADK ones took that to mean the SDK was never initialized. They then called
    decimalai.init() again from the environment, which turned DecimalAI back on for the whole
    process. They now initialize only a process that never called init(). Under the kill switch,
    agent_config() asks DecimalAI nothing: the agent runs on its fallback= text, and with no
    fallback agent_config() raises RuntimeError saying to pass one.