clean up anthropic constant locations

This commit is contained in:
perf3ct 2025-03-30 19:50:16 +00:00
parent a5488771ae
commit 997edd8de8
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232
3 changed files with 21 additions and 16 deletions

View File

@ -4,14 +4,6 @@ import log from "../../services/log.js";
import type { Request, Response } from "express";
import { PROVIDER_CONSTANTS } from '../../services/llm/constants/provider_constants.js';
// Map of simplified model names to full model names with versions
const MODEL_MAPPING: Record<string, string> = {
'claude-3-opus': 'claude-3-opus-20240229',
'claude-3-sonnet': 'claude-3-sonnet-20240229',
'claude-3-haiku': 'claude-3-haiku-20240307',
'claude-2': 'claude-2.1'
};
// Interface for Anthropic model entries
interface AnthropicModel {
id: string;

View File

@ -4,8 +4,29 @@ export const PROVIDER_CONSTANTS = {
BETA_VERSION: 'messages-2023-12-15',
BASE_URL: 'https://api.anthropic.com',
DEFAULT_MODEL: 'claude-3-haiku-20240307',
// Model mapping for simplified model names to their full versions
MODEL_MAPPING: {
'claude-3.7-sonnet': 'claude-3-7-sonnet-20240620',
'claude-3.5-haiku': 'claude-3-5-haiku-20240307',
'claude-3-opus': 'claude-3-opus-20240229',
'claude-3-sonnet': 'claude-3-sonnet-20240229',
'claude-3-haiku': 'claude-3-haiku-20240307',
'claude-2': 'claude-2.1'
},
// These are the currently available models from Anthropic
AVAILABLE_MODELS: [
{
id: 'claude-3-7-sonnet-20240620',
name: 'Claude 3.7 Sonnet',
description: 'Most intelligent model with hybrid reasoning capabilities',
maxTokens: 4096
},
{
id: 'claude-3-5-haiku-20240307',
name: 'Claude 3.5 Haiku',
description: 'Improved version of Haiku with better performance',
maxTokens: 4096
},
{
id: 'claude-3-opus-20240229',
name: 'Claude 3 Opus',

View File

@ -9,14 +9,6 @@ interface AnthropicMessage {
}
export class AnthropicService extends BaseAIService {
// Map of simplified model names to full model names with versions
private static MODEL_MAPPING: Record<string, string> = {
'claude-3-opus': 'claude-3-opus-20240229',
'claude-3-sonnet': 'claude-3-sonnet-20240229',
'claude-3-haiku': 'claude-3-haiku-20240307',
'claude-2': 'claude-2.1'
};
constructor() {
super('Anthropic');
}