Skip to main content

Anthropic AI Provider Plugin

The Anthropic plugin connects Ever Works to Anthropic's Claude API. Claude is recognized for producing well-structured, nuanced content and adhering closely to instructions, making it particularly suited for work descriptions and detailed content generation.

Source: packages/plugins/anthropic/src/anthropic.plugin.ts

Overview

PropertyValue
Plugin IDanthropic
Categoryai-provider
Capabilitiesai-provider
Version1.0.0
Configuration Modeuser-required
Provider Typeanthropic
Auto-enableNo
Visibilitypublic

Like the OpenAI plugin, the Anthropic plugin extends BaseAiProvider and uses AiOperations for all AI interactions. The AiOperations layer abstracts away the differences between providers using LangChain.

Architecture

Configuration

Settings Schema

SettingTypeRequiredDefaultScopeWidgetDescription
apiKeystringYes--user--Anthropic API key. Secret.
defaultModelstringYesclaude-sonnet-4-5-20250514globalmodel-selectDefault model for all AI tasks.
simpleModelstringNoclaude-haiku-4-5-20251001globalmodel-selectModel for tags, descriptions, classifications.
mediumModelstringNoclaude-sonnet-4-5-20250929globalmodel-selectModel for listings, summaries, reformatting.
complexModelstringNoclaude-sonnet-4-5-20250514globalmodel-selectModel for full page generation, multi-step analysis.
baseUrlstringNohttps://api.anthropic.com/v1/----Custom API endpoint for proxies. Hidden.
temperaturenumberNo0.7----Sampling temperature (0--2). Hidden.
maxTokensnumberNo4096----Max tokens per response. Hidden.

Model Tiers

The Anthropic plugin maps Claude model families to task complexity tiers:

TierDefault ModelUse Case
SimpleClaude 4.5 HaikuTags, short descriptions, quick classifications
StandardClaude 4.5 SonnetListings, summaries, content reformatting
ComplexClaude 4.5 SonnetFull page generation, multi-step analysis

Capabilities

getCapabilities(): AiModelCapabilities {
return {
supportsStructuredOutput: true,
supportsStreaming: true,
supportsToolCalling: true,
supportsVision: true,
maxContextLength: 200000
};
}
CapabilitySupportedDescription
Structured OutputYesJSON mode and tool use for typed responses
StreamingYesServer-sent events for real-time token delivery
Tool CallingYesTool use for agent-based workflows
VisionYesImage understanding with Claude's vision capabilities
Max Context200,000Maximum tokens in a single context window

The 200K context window is the largest among the platform's AI providers, allowing Claude to process significantly more source material per request.

Core Methods

Chat Completion

async createChatCompletion(options: ChatCompletionOptions): Promise<ChatCompletionResponse>

Routes through AiOperations with resolved configuration. The LangChain abstraction translates the standard ChatCompletionOptions format to Anthropic's Messages API format.

Streaming Chat Completion

async *createStreamingChatCompletion(options: ChatCompletionOptions): AsyncIterable<ChatCompletionChunk>

Yields ChatCompletionChunk objects as Claude generates tokens. Used by the conversational AI assistant.

Embeddings

async createEmbedding(_options: EmbeddingOptions): Promise<EmbeddingResponse> {
throw new Error('Embeddings not supported by Anthropic');
}

Anthropic does not offer an embedding API. If embeddings are needed, use the OpenAI plugin or another provider that supports them alongside the Anthropic plugin for generation.

Model Listing

async listModels(settings?: PluginSettings): Promise<readonly AiModel[]>

Fetches the available Claude models from the API. Used to populate model selection in the CLI and web dashboard.

Availability Check

async isAvailable(settings?: PluginSettings): Promise<boolean>

Tests the connection by calling aiOps.testConnection() with the resolved configuration.

Lifecycle

MethodBehavior
onLoad(context)Calls super.onLoad(), creates AiOperations with Anthropic defaults.
onUnload()Sets aiOps to null, calls super.onUnload().
healthCheck()Returns healthy.

Initial Configuration

this.aiOps = new AiOperations({
apiKey: '',
model: 'claude-sonnet-4-5-20250514',
baseURL: 'https://api.anthropic.com/v1/',
temperature: 0.7,
maxTokens: 4096,
providerType: 'anthropic'
});

The providerType: 'anthropic' tells AiOperations (and the underlying LangChain layer) to use the Anthropic message format and API conventions.

Error Handling

ScenarioBehavior
Plugin not loadedThrows Error('Anthropic plugin not loaded')
Embedding requestThrows Error('Embeddings not supported by Anthropic')
API errorsPropagated from AiOperations / LangChain
Connection test failureisAvailable() returns false

Differences from OpenAI Plugin

AspectAnthropicOpenAI
Context window200K tokens128K tokens
EmbeddingsNot supportedSupported
Default modelClaude Sonnet 4.5GPT-5.1
Base URLapi.anthropic.com/v1/api.openai.com/v1
Provider typeanthropicopenai
API formatMessages APIChat Completions API

Both plugins share the same BaseAiProvider base class and AiOperations abstraction, making them interchangeable from the platform's perspective. The AiFacadeService can switch between them based on user configuration.

Usage in the Platform

When Anthropic is selected as the AI provider:

  1. Content generation -- Claude generates work item descriptions, summaries, and metadata. Its instruction-following precision is useful for maintaining consistent formatting.
  2. Conversational AI -- Powers the chat assistant in the web dashboard.
  3. Structured extraction -- Uses tool calling to extract structured data from web content.

Choosing Between AI Providers

Consider Anthropic when...Consider OpenAI when...
You need a large context window (200K)You need embedding support
You value precise instruction followingYou want the latest GPT models
You prefer Claude's writing styleYou need multi-modal capabilities beyond vision
You want consistent formatting outputYou want a wider selection of model sizes