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

@veryfront/ext-llm-anthropic

v0.1.1041

Published

Veryfront first-party extension package for ext-llm-anthropic

Readme

@veryfront/ext-llm-anthropic

Category: LLM | Contract: LLMProvider | Built-in

Provides Anthropic Claude models for Veryfront agents and chat. Once loaded, any model string prefixed with anthropic/ (e.g. anthropic/claude-sonnet-4-6) is routed through this provider via the LLMProviderRegistry.

Configuration

The extension is configured through the standard LLMProviderConfig interface:

| Field | Required | Description | | ------------ | -------- | ----------------------------------------------------------------------------------- | | credential | Yes | Anthropic API key (maps to x-api-key header) | | baseURL | No | Override the messages endpoint base (default: https://api.anthropic.com/v1) | | authToken | No | Bearer token for proxied deployments (Veryfront Cloud, Bedrock-compatible gateways) | | name | No | Display name for errors and telemetry (default: "anthropic") | | fetch | No | Custom fetch implementation (used by veryfront-cloud for injecting project auth) |

Example

import extAnthropic from "@veryfront/ext-llm-anthropic";

const ext = extAnthropic();
ext.setup({
  require: (name) => registry, // LLMProviderRegistry
  // ...
});

// Then use via the registry:
const provider = registry.require("anthropic");
const runtime = provider.createModel("claude-sonnet-4-6", {
  credential: process.env.ANTHROPIC_API_KEY!,
  baseURL: "https://api.anthropic.com/v1",
});

Supported Features

Models

Automatic max_tokens defaults based on model family:

| Model | Default max_tokens | | ---------------------------- | ------------------ | | Claude Opus/Sonnet 4.6 | 128,000 | | Claude Opus/Sonnet/Haiku 4.5 | 64,000 | | Claude Opus 4.1 | 32,000 | | Claude 3 Haiku | 4,096 | | Unknown models | 4,096 |

Caller-provided maxOutputTokens is clamped at the model ceiling for known models.

Extended Thinking

Enable reasoning via the reasoning option:

runtime.doGenerate({
  prompt: [...],
  reasoning: {
    enabled: true,
    effort: "high",    // "low" | "medium" | "high" | "max"
    budgetTokens: 8192 // optional explicit override
  },
});

Effort-to-budget mapping: low = 1024, medium = 4096, high = 16384, max = 32768.

When thinking is enabled, temperature and topP are automatically dropped (Anthropic rejects the combo).

Prompt Caching

Control cache breakpoints via cacheControl:

runtime.doGenerate({
  prompt: [...],
  tools: [...],
  cacheControl: {
    system: true,   // or "5m" | "1h" | false
    tools: "1h",    // breakpoint on the last tool entry
  },
});

Provider Tools

Anthropic-native tools are supported via type: "provider" tool definitions:

| Short ID | Resolved Type | | ----------------------------------------------- | ------------------------- | | anthropic.code_execution | code_execution_20260120 | | anthropic.computer_use / anthropic.computer | computer_20250124 | | anthropic.text_editor | text_editor_20250728 | | anthropic.bash | bash_20250124 | | anthropic.memory | memory_20250818 | | anthropic.web_search | web_search_20250305 | | anthropic.web_fetch | web_fetch_20250910 |

Already-versioned IDs (e.g. anthropic.code_execution_20250522) pass through verbatim.

MCP Servers

Pass Anthropic-native MCP servers via mcpServers. Keys are automatically converted from camelCase to snake_case:

runtime.doGenerate({
  prompt: [...],
  mcpServers: [{
    type: "url",
    url: "https://example.com/mcp",
    name: "my-server",
    authorizationToken: "Bearer ...",
    toolConfiguration: {
      enabled: true,
      allowedTools: ["search"],
    },
  }],
});

Container

Pass anthropicContainer to attach a container context to the request (for computer-use sessions).

Provider Options

Arbitrary Anthropic-specific fields can be merged into the request body via providerOptions:

runtime.doGenerate({
  prompt: [...],
  providerOptions: {
    anthropic: { top_k: 3 },
    "my-custom-name": { metadata: { trace: "yes" } },
  },
});

Both the "anthropic" key and the provider's custom name are merged.

Unsupported Options (emits warnings)

The following unified options have no Anthropic equivalent and are silently dropped with a warning:

  • presencePenalty
  • frequencyPenalty
  • seed
  • topK
  • responseFormat (non-text; use tool schemas instead)
  • stopSequences beyond 4 entries (extras truncated)

Running Tests

deno task test