Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

Pre-release

This release is a pre-release and may not be stable for production use.

ocai-anthropic

The Anthropic plugin distribution for ocai. Distribution name: ocai-anthropic; pip install ocai[anthropic] resolves to the same wheel. Requires Python 3.13+ and ocai>=0.1,<0.2.

It ships only ocai/anthropic/ into the shared ocai PEP 420 namespace, organized one subpackage per wire interface. Today that is one:

  • ocai.anthropic.messages — the /v1/messages interface: typed wire structs, the codec, contract-censused conversion edges, the capability profile, and the chat component. Unary and streaming calls are implemented and certified against recorded fixtures.

What installing it does

Exactly one structural thing: the frozen ocai.anthropic.FRAGMENT (a CatalogFragment) becomes discoverable through the ocai.fragments entry-point group, so ocai.chat.model("anthropic/<model>", ...) can resolve the provider and the conversion graph gains Anthropic's nodes and edges. Importing ocai.anthropic is inert; there is no import-time registration. Applications that want an explicit catalog compose it themselves with Catalog.of(ocai.anthropic.FRAGMENT).

from ocai.anthropic import chat_model
from ocai.core import ApiKey

model = chat_model(
    "claude-sonnet-4-5",
    credentials=ApiKey.from_env("ANTHROPIC_API_KEY", header="x-api-key", scheme=""),
)
result = model.chat(...)   # needs ocai[http] and a real key

Anthropic authenticates with the x-api-key header, hence the explicit header=/scheme=; the required anthropic-version header is injected by the interface's declared traits. chat_model is sugar over ocai.chat.model("anthropic/<model>", ...) on a catalog built from this fragment, never a separate code path.

Boundaries

  • No anthropic SDK: ocai owns the wire through ocai.wire. This plugin depends on ocai.core + ocai.convert + ocai.chat only, never on ocai.wire or httpx, so archived traffic can be re-converted by tooling with no ability to make network calls.
  • msgspec is used only at the wire-decode boundary.
  • Every conversion edge declares an EdgeContract and ships golden fixtures in the repository's spec/.

License

Source-available under FSL-1.1-ALv2 (converting to Apache-2.0 two years after each release). ocai is not open source.

Metadata

Release files for ocai-anthropic 0.1.2a5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for ocai-anthropic 0.1.2a5
File Size Uploaded Provenance Actions
ocai_anthropic-0.1.2a5.tar.gz 52.7 kB With provenance Details for ocai_anthropic-0.1.2a5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ocai-anthropic 0.1.2a5
File Interpreter ABI Platform Actions
ocai_anthropic-0.1.2a5-py3-none-any.whl Python 3 none any Details for ocai_anthropic-0.1.2a5-py3-none-any.whl

Total release size: 100.9 kB

Release files / ocai_anthropic-0.1.2a5.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL ocai_anthropic-0.1.2a5.tar.gz
Size 52.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dcab6610fa4431752e7c661ac69429df4ae13849eafee9b326e1591a9914a0ad
BLAKE2b-256 checksum
How to use checksums
88379f510c16a33c84a466b50bfcd513e25aa7bf41247b4fd5934b18f2834128
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / ocai_anthropic-0.1.2a5-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL ocai_anthropic-0.1.2a5-py3-none-any.whl
Size 48.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf65f0cd631df86295e91aa749b30bf1a21d6f9ec32364b526564df755fb71f7
BLAKE2b-256 checksum
How to use checksums
23fb60b837b298fa763ea9b67c89354671a3ee39c27afb29a35ed74de03fc992
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for ocai-anthropic 0.1.2a5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Change of provenance

The configuration that created this release differs from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 2 files

Attestation for ocai_anthropic-0.1.2a5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page