Skip to main content

Drop-in encrypted transport for AI SDKs

Project description

conseel

Drop-in encrypted transport for AI SDKs. Wraps cohere-tng to route requests through OHTTP encryption with TEE attestation verification, and automatically promotes the model field from JSON request bodies into an x-gateway-model-name header for backend routing.

Install

pip install conseel

Usage

Cohere

import cohere
import httpx
from conseel import Transport

co = cohere.ClientV2(
    api_key="...",
    httpx_client=httpx.Client(transport=Transport()),
)
co.chat(model="command-a-plus-05-2026", messages=[...])

OpenAI

from openai import OpenAI
import httpx
from conseel import Transport

client = OpenAI(
    http_client=httpx.Client(transport=Transport()),
)
client.chat.completions.create(model="gpt-4", messages=[...])

Async

import httpx
from conseel import AsyncTransport

async with httpx.AsyncClient(transport=AsyncTransport()) as client:
    resp = await client.post(url, json={"model": "command-a-plus-05-2026", ...})

What it does

  1. Encrypts all traffic via OHTTP so that even the network infrastructure cannot inspect request or response payloads.
  2. Verifies the remote TEE via Intel Trust Authority attestation before sending any data (configurable via the verify parameter).
  3. Extracts the model field from JSON request bodies and sets it as the x-gateway-model-name HTTP header for gateway routing. Non-JSON requests (e.g. multipart audio uploads) are streamed through without inspection.
  4. Forwards authorization and x-gateway-model-name headers through the OHTTP layer to the backend.

Configuration

Transport and AsyncTransport accept the same verify and ohttp keyword arguments as cohere_tng.Transport (see TNG configuration docs for the full schema). The only difference is that conseel provides sensible defaults:

  • verify — Defaults to Intel Trust Authority attestation. Pass None to disable verification (not recommended for production).
  • ohttp — Defaults include forwarding authorization and x-gateway-model-name headers.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conseel-0.5.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

conseel-0.5.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file conseel-0.5.0.tar.gz.

File metadata

  • Download URL: conseel-0.5.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for conseel-0.5.0.tar.gz
Algorithm Hash digest
SHA256 433ac9904750f7093c8c9cf6d68b20dd69e615211ec00bd2e0c32c08d629e6c5
MD5 f8aedc4f5241d13a8512cb37436c4303
BLAKE2b-256 8e26b67faf4709814dc51c9fcf8dff08c5fb03085983b703ef48634428d26932

See more details on using hashes here.

Provenance

The following attestation bundles were made for conseel-0.5.0.tar.gz:

Publisher: co-build-python.yml on cohere-ai/TNG

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conseel-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: conseel-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for conseel-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2409ec0e63e68b5c98f6817db2cc978c17c095d1f61802fe339dd36950685b57
MD5 001699affc9e4f43eecc9d928061a274
BLAKE2b-256 25be5ad940db0ec73bd3ab4167e35bcaf932f2c72609bda636265310637ce51f

See more details on using hashes here.

Provenance

The following attestation bundles were made for conseel-0.5.0-py3-none-any.whl:

Publisher: co-build-python.yml on cohere-ai/TNG

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page