Skip to content

Commit

Permalink
feat: new anthropic model
Browse files Browse the repository at this point in the history
  • Loading branch information
xavidop committed Feb 24, 2025
1 parent 015a0f3 commit 0116ce7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
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

0 comments on commit 0116ce7

Please sign in to comment.