npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zhivex-ai/anthropic

v0.7.4

Published

Anthropic adapter for Zhivex AI SDK.

Readme

@zhivex-ai/anthropic

Anthropic adapter for Zhivex AI SDK, with first-class Claude Opus 5 support.

Install

bun add @zhivex-ai/core @zhivex-ai/anthropic

Claude Opus 5

import { generateText } from "@zhivex-ai/core";
import { createAnthropic } from "@zhivex-ai/anthropic";

const anthropic = createAnthropic({
  apiKey: process.env.ANTHROPIC_API_KEY
});

const result = await generateText({
  model: anthropic("claude-opus-5"),
  prompt: "Review this architecture and identify the highest-risk assumption.",
  maxTokens: 64_000,
  reasoning: {
    effort: "xhigh"
  }
});

console.log(result.text);

The model advertises the complete shared effort ladder: none, low, medium, high, xhigh, and max. Omitting reasoning leaves Opus 5's default adaptive thinking untouched. none maps to thinking.disabled; disabling thinking with xhigh or max is rejected before the network request. Manual thinking budgets, non-default sampling, and assistant prefills are also rejected locally.

Native structured output is available through generateObject() and streamObject() across current Claude families, including Opus 5, Sonnet 5, Fable/Mythos 5, Opus 4.6–4.8, Sonnet 4.5–4.6, and Haiku 4.5. The adapter maps the shared schema to output_config.format without a legacy beta header.

Provider-specific Opus 5 controls are typed:

const result = await generateText({
  model: anthropic("claude-opus-5"),
  prompt: "Run the task within the declared token budget.",
  maxTokens: 64_000,
  reasoning: { effort: "max" },
  providerOptions: {
    fallbacks: "default",
    output_config: {
      task_budget: {
        type: "tokens",
        total: 64_000,
        remaining: 48_000
      }
    },
    midConversationToolChanges: true
  }
});

The adapter automatically adds and composes the beta headers required for task budgets, managed or explicit server-side fallbacks, mid-conversation tool changes, MCP, and Files API. Set providerOptions.speed = "fast" only when Anthropic has enabled the premium fast-mode research preview for the account; the adapter then adds fast-mode-2026-02-01.

Usage maps uncached input, cache reads, cache writes, output, thinking tokens, total tokens, and the reported standard/fast speed. Unknown provider-native blocks—including fallback metadata—are preserved as provider-data.

The package also supports current Claude families such as Claude Sonnet 5, Claude Fable 5, Claude Mythos 5, Claude Opus 4.8, and Claude Haiku 4.5, with model-specific capability validation. Models that reject assistant-prefilled conversations fail locally before an API request is attempted.

Authenticated Anthropic requests reject redirects so a 307 or 308 cannot replay x-api-key or the prompt body to another origin. The adapter's explicit rawFetch escape hatch remains uncredentialed.

Official references:

Repository and full documentation: