Skip to main content
Pre-release

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

ocai-bedrock

Bedrock hosting for ocai, separate from shared AWS authentication and semantic provider codecs. This package owns InvokeModel addressing, native host errors and response metadata/effects. It performs no discovery and imports no provider SDK.

import ocai.chat
from ocai.aws import SigV4Credential
from ocai.bedrock import Bedrock

model = ocai.chat.model(
    "anthropic/us.anthropic.claude-3-5-sonnet-20241022-v2:0",
    host=Bedrock(region="us-east-1"),
    credentials=SigV4Credential(
        access_key="synthetic-access-key", secret_key="synthetic-secret-key",
        region="us-east-1",
    ),
)

Install the Anthropic codec and AWS credential packages separately or use the anthropic and aws extras. The application supplies credentials explicitly; ocai-aws delegates signing to AWS-maintained code. Users do not import its SDK.

Qualified unary surface: text, function tools, trait-declared version/beta body placement, encoded identifiers, native errors and response metadata/guardrail accounting. Explicit profile aliases affect capability lookup only. No model-ID heuristic is used. Existing preflight profiles include dialect-wide wildcard declarations; those and coverage_complete are not hosted-model qualification (G-15). Verify deployment support independently of dialect declarations.

beta is an explicit tuple of body beta values; it does not silently enable any feature. Version/beta conflicts fail before I/O. Binding-level arbitrary headers are transmitted as explicit caller data, not qualified as feature relocations. Use the host's beta field or trait-declared feature mappings for that purpose.

Configure guardrail identifier/version together. Recognized trace assessments separate blocked output (ContentFilterError) from masking (reported semantic shift). An intervention without sufficient trace is reported as unclassified; it is never guessed to be blocked or unmodified. FidelityPolicy can reject those shifts. HostEvidence retains native headers/body and host metadata; traces can contain original content, so application exporters must redact them. Passive observers omit this evidence.

Streaming, Converse, media, managed prompts, regional discovery and compatibility endpoints are not qualified here. Streaming fails before I/O. Recorded tests prove wire behavior without live keys; they do not establish service/account access.

Surface Recorded qualification
Text and system instruction Exact body, canonical text/finish and input/output usage, both drivers
Function tools Custom tool schema, auto selection, returned call identity/arguments and finish
Routing and beta Encoded identifier, explicit version and beta placement; no beta feature availability claim
Errors Header-only throttle/access/model error and body native codes; unknown codes preserved
Guardrails Explicit blocking, output masking, uncertain intervention, caller fidelity rejection
Metadata Host body fields and latency/tier headers retained; future host/dialect fields separated
Excluded Streaming, Converse, media, managed prompts, regional/model discovery, live availability

The recordings are synthetic, hand-authored against the AWS research sources in docs/providers/amazon-bedrock.md section 16. They reuse the existing Anthropic conversion graph. There is no new semantic edge or canonical revision.

Metadata

Release files for ocai-bedrock 0.1.1a5

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

Source distribution (sdist)

Source distribution for ocai-bedrock 0.1.1a5
File Size Uploaded Provenance Actions
ocai_bedrock-0.1.1a5.tar.gz 14.0 kB With provenance Details for ocai_bedrock-0.1.1a5.tar.gz

Built distribution (wheel)

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

Total release size: 21.9 kB

Release files / ocai_bedrock-0.1.1a5.tar.gz

Download URL ocai_bedrock-0.1.1a5.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b81dc92d7df5278c6a5033b5da39119812190f07be4d415cdfb2d4e08d5c515f
BLAKE2b-256 checksum
How to use checksums
229133b8001612319e10be3ef3c6f72cdf3a962ac15cc240309ae1c3cab8978a
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_bedrock-0.1.1a5-py3-none-any.whl

Download URL ocai_bedrock-0.1.1a5-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e95c59eb8d28f80fd751144568aa7429263bbd6937f531910e48a0a0f5d89ced
BLAKE2b-256 checksum
How to use checksums
3adb2a0f865c224162781b78d57ff7aad9305a06c4c523ebcffeaa48d5cb1807
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-bedrock 0.1.1a5

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ocai_bedrock-0.1.1a5.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