Skip to main content

Drop-in Anthropic SDK shim for EvalOps llm-gateway routing

Project description

evalops-anthropic

Drop-in Anthropic SDK shim for stamping EvalOps organization scope, principal attribution, trace IDs, and provider references onto Anthropic-compatible requests.

This package is part of the G1 shim wedge from evalops/platform#1133. It establishes the package and conformance surface while llm-gateway grows Anthropic-native endpoint coverage.

Python

pip install evalops-anthropic
from evalops_anthropic import Anthropic

client = Anthropic(organization_id="org_123", principal="user:ada@example.com")

message = client.messages.create(
    **client.with_provider_ref(
        {
            "model": "claude-sonnet-4.6",
            "max_tokens": 256,
            "messages": [{"role": "user", "content": "hello"}],
        }
    )
)

Node

npm install @evalops/anthropic
import { Anthropic } from "@evalops/anthropic";

const client = new Anthropic({
  organizationId: "org_123",
  principal: "user:ada@example.com",
});

const message = await client.messages.create(
  client.withProviderRef({
    model: "claude-sonnet-4.6",
    max_tokens: 256,
    messages: [{ role: "user", content: "hello" }],
  }),
);

Environment

  • EVALOPS_API_KEY or ANTHROPIC_API_KEY: Platform-issued bearer token.
  • EVALOPS_ORGANIZATION_ID: organization scope stamped into requests.
  • EVALOPS_PRINCIPAL: optional actor string for audit attribution.
  • EVALOPS_TRACE_ID: optional trace correlation ID.
  • EVALOPS_LLM_GATEWAY_ANTHROPIC_URL: Anthropic-compatible gateway base URL.
  • EVALOPS_LLM_GATEWAY_URL: fallback gateway base URL.
  • EVALOPS_PROVIDER_ENVIRONMENT: defaults to prod.
  • EVALOPS_PROVIDER_CREDENTIAL_NAME: optional provider ref credential name.
  • EVALOPS_PROVIDER_TEAM_ID: optional provider ref team ID.

Gateway Status

llm-gateway currently exposes OpenAI-compatible /v1/chat/completions and /v1/responses. This shim ships the package contract and conformance helpers for the Anthropic adapter; full import-only parity depends on gateway-side Anthropic endpoint support.

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

evalops_anthropic-0.2.0.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

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

evalops_anthropic-0.2.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file evalops_anthropic-0.2.0.tar.gz.

File metadata

  • Download URL: evalops_anthropic-0.2.0.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for evalops_anthropic-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d2614353dee9cc31c729496090a2502763b31db945c82b901ed68393952d6895
MD5 36fd5c3e16ad4b14ec58e5bbd7253170
BLAKE2b-256 0a3890ef4dc1c7d9a50dbbb650ba7485bb92320c0b610c672da77b05df65812b

See more details on using hashes here.

File details

Details for the file evalops_anthropic-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for evalops_anthropic-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 824f3c6618c251dee1dde500cc125eb3bcb53c2f16b52e83727de1302842c9e3
MD5 e91bae00380801c1eabbc35f661b6e9d
BLAKE2b-256 f8d6d97d1ab0b99e1496d3ad0f821f9442cb14a2c5c9bcb88a0b8bdc825de769

See more details on using hashes here.

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