Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new anthropic model #241

Merged
merged 1 commit into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions plugins/anthropic/src/claude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,23 @@ export const AnthropicConfigSchema = GenerationCommonConfigSchema.extend({
.optional(),
});

export const claude37Sonnet = modelRef({
name: 'anthropic/claude-3-7-sonnet',
info: {
versions: ['claude-3-7-sonnet-20250219', 'claude-3-7-sonnet-latest'],
label: 'Anthropic - Claude 3.7 Sonnet',
supports: {
multiturn: true,
tools: true,
media: true,
systemRole: true,
output: ['text'],
},
},
configSchema: AnthropicConfigSchema,
version: 'claude-3-7-sonnet-latest',
});

export const claude35Sonnet = modelRef({
name: 'anthropic/claude-3-5-sonnet',
info: {
Expand Down Expand Up @@ -163,6 +180,7 @@ export const SUPPORTED_CLAUDE_MODELS: Record<
string,
ModelReference<typeof AnthropicConfigSchema>
> = {
'claude-3-7-sonnet': claude37Sonnet,
'claude-3-5-sonnet': claude35Sonnet,
'claude-3-opus': claude3Opus,
'claude-3-sonnet': claude3Sonnet,
Expand Down
2 changes: 2 additions & 0 deletions plugins/anthropic/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { genkitPlugin } from 'genkit/plugin';
import Anthropic from '@anthropic-ai/sdk';

import {
claude37Sonnet,
claude35Sonnet,
claude3Opus,
claude3Sonnet,
Expand All @@ -29,6 +30,7 @@ import {
} from './claude.js';

export {
claude37Sonnet,
claude35Sonnet,
claude3Opus,
claude3Sonnet,
Expand Down