mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Default to Sonnet 4 (#3928)
This commit is contained in:
parent
a734aca02e
commit
4abadd877b
23 changed files with 75 additions and 49 deletions
|
|
@ -12,7 +12,7 @@ jest.mock("delay", () => jest.fn(() => Promise.resolve()))
|
|||
jest.mock("../fetchers/modelCache", () => ({
|
||||
getModels: jest.fn().mockImplementation(() => {
|
||||
return Promise.resolve({
|
||||
"anthropic/claude-3.7-sonnet": {
|
||||
"anthropic/claude-sonnet-4": {
|
||||
maxTokens: 8192,
|
||||
contextWindow: 200000,
|
||||
supportsImages: true,
|
||||
|
|
@ -44,7 +44,7 @@ jest.mock("../fetchers/modelCache", () => ({
|
|||
describe("OpenRouterHandler", () => {
|
||||
const mockOptions: ApiHandlerOptions = {
|
||||
openRouterApiKey: "test-key",
|
||||
openRouterModelId: "anthropic/claude-3.7-sonnet",
|
||||
openRouterModelId: "anthropic/claude-sonnet-4",
|
||||
}
|
||||
|
||||
beforeEach(() => jest.clearAllMocks())
|
||||
|
|
@ -84,7 +84,7 @@ describe("OpenRouterHandler", () => {
|
|||
it("returns default model info when options are not provided", async () => {
|
||||
const handler = new OpenRouterHandler({})
|
||||
const result = await handler.fetchModel()
|
||||
expect(result.id).toBe("anthropic/claude-3.7-sonnet")
|
||||
expect(result.id).toBe("anthropic/claude-sonnet-4")
|
||||
expect(result.info.supportsPromptCache).toBe(true)
|
||||
})
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ describe("OpenRouterHandler", () => {
|
|||
role: "user",
|
||||
},
|
||||
],
|
||||
model: "anthropic/claude-3.7-sonnet",
|
||||
model: "anthropic/claude-sonnet-4",
|
||||
stream: true,
|
||||
stream_options: { include_usage: true },
|
||||
temperature: 0,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ jest.mock("delay", () => jest.fn(() => Promise.resolve()))
|
|||
jest.mock("../fetchers/modelCache", () => ({
|
||||
getModels: jest.fn().mockImplementation(() => {
|
||||
return Promise.resolve({
|
||||
"coding/claude-3-7-sonnet": {
|
||||
"coding/claude-4-sonnet": {
|
||||
maxTokens: 8192,
|
||||
contextWindow: 200000,
|
||||
supportsImages: true,
|
||||
|
|
@ -21,7 +21,7 @@ jest.mock("../fetchers/modelCache", () => ({
|
|||
outputPrice: 15,
|
||||
cacheWritesPrice: 3.75,
|
||||
cacheReadsPrice: 0.3,
|
||||
description: "Claude 3.7 Sonnet",
|
||||
description: "Claude 4 Sonnet",
|
||||
},
|
||||
})
|
||||
}),
|
||||
|
|
@ -30,7 +30,7 @@ jest.mock("../fetchers/modelCache", () => ({
|
|||
describe("RequestyHandler", () => {
|
||||
const mockOptions: ApiHandlerOptions = {
|
||||
requestyApiKey: "test-key",
|
||||
requestyModelId: "coding/claude-3-7-sonnet",
|
||||
requestyModelId: "coding/claude-4-sonnet",
|
||||
}
|
||||
|
||||
beforeEach(() => jest.clearAllMocks())
|
||||
|
|
@ -66,7 +66,7 @@ describe("RequestyHandler", () => {
|
|||
outputPrice: 15,
|
||||
cacheWritesPrice: 3.75,
|
||||
cacheReadsPrice: 0.3,
|
||||
description: "Claude 3.7 Sonnet",
|
||||
description: "Claude 4 Sonnet",
|
||||
},
|
||||
})
|
||||
})
|
||||
|
|
@ -87,7 +87,7 @@ describe("RequestyHandler", () => {
|
|||
outputPrice: 15,
|
||||
cacheWritesPrice: 3.75,
|
||||
cacheReadsPrice: 0.3,
|
||||
description: "Claude 3.7 Sonnet",
|
||||
description: "Claude 4 Sonnet",
|
||||
},
|
||||
})
|
||||
})
|
||||
|
|
@ -161,7 +161,7 @@ describe("RequestyHandler", () => {
|
|||
content: "test message",
|
||||
},
|
||||
],
|
||||
model: "coding/claude-3-7-sonnet",
|
||||
model: "coding/claude-4-sonnet",
|
||||
stream: true,
|
||||
stream_options: { include_usage: true },
|
||||
temperature: undefined,
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import { ProviderSettings } from "../../shared/api"
|
|||
import { findLastIndex } from "../../shared/array"
|
||||
import { combineApiRequests } from "../../shared/combineApiRequests"
|
||||
import { combineCommandSequences } from "../../shared/combineCommandSequences"
|
||||
import { t } from "../../i18n"
|
||||
import {
|
||||
ClineApiReqCancelReason,
|
||||
ClineApiReqInfo,
|
||||
|
|
@ -1039,9 +1040,7 @@ export class Task extends EventEmitter<ClineEvents> {
|
|||
if (this.consecutiveMistakeCount >= this.consecutiveMistakeLimit) {
|
||||
const { response, text, images } = await this.ask(
|
||||
"mistake_limit_reached",
|
||||
this.api.getModel().id.includes("claude")
|
||||
? `This may indicate a failure in his thought process or inability to use a tool properly, which can be mitigated with some user guidance (e.g. "Try breaking down the task into smaller steps").`
|
||||
: "Roo Code uses complex prompts and iterative task execution that may be challenging for less capable models. For best results, it's recommended to use Claude 3.7 Sonnet for its advanced agentic coding capabilities.",
|
||||
t("common:errors.mistake_limit_guidance"),
|
||||
)
|
||||
|
||||
if (response === "messageResponse") {
|
||||
|
|
|
|||
|
|
@ -2114,7 +2114,7 @@ describe("getTelemetryProperties", () => {
|
|||
mockCline = new Task(defaultTaskOptions)
|
||||
mockCline.api = {
|
||||
getModel: jest.fn().mockReturnValue({
|
||||
id: "claude-3-7-sonnet-20250219",
|
||||
id: "claude-sonnet-4-20250514",
|
||||
info: { contextWindow: 200000 },
|
||||
}),
|
||||
}
|
||||
|
|
@ -2134,7 +2134,7 @@ describe("getTelemetryProperties", () => {
|
|||
|
||||
const properties = await provider.getTelemetryProperties()
|
||||
|
||||
expect(properties).toHaveProperty("modelId", "claude-3-7-sonnet-20250219")
|
||||
expect(properties).toHaveProperty("modelId", "claude-sonnet-4-20250514")
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@
|
|||
"failed_remove_directory": "Ha fallat l'eliminació del directori de tasques: {{error}}",
|
||||
"custom_storage_path_unusable": "La ruta d'emmagatzematge personalitzada \"{{path}}\" no és utilitzable, s'utilitzarà la ruta predeterminada",
|
||||
"cannot_access_path": "No es pot accedir a la ruta {{path}}: {{error}}",
|
||||
"settings_import_failed": "Ha fallat la importació de la configuració: {{error}}."
|
||||
"settings_import_failed": "Ha fallat la importació de la configuració: {{error}}.",
|
||||
"mistake_limit_guidance": "Això pot indicar un error en el procés de pensament del model o la incapacitat d'utilitzar una eina correctament, que es pot mitigar amb orientació de l'usuari (p. ex. \"Prova de dividir la tasca en passos més petits\")."
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "No s'ha seleccionat contingut de terminal",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"failed_remove_directory": "Fehler beim Entfernen des Aufgabenverzeichnisses: {{error}}",
|
||||
"custom_storage_path_unusable": "Benutzerdefinierter Speicherpfad \"{{path}}\" ist nicht verwendbar, Standardpfad wird verwendet",
|
||||
"cannot_access_path": "Zugriff auf Pfad {{path}} nicht möglich: {{error}}",
|
||||
"settings_import_failed": "Fehler beim Importieren der Einstellungen: {{error}}."
|
||||
"settings_import_failed": "Fehler beim Importieren der Einstellungen: {{error}}.",
|
||||
"mistake_limit_guidance": "Dies kann auf einen Fehler im Denkprozess des Modells oder die Unfähigkeit hinweisen, ein Tool richtig zu verwenden, was durch Benutzerführung behoben werden kann (z.B. \"Versuche, die Aufgabe in kleinere Schritte zu unterteilen\")."
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "Kein Terminal-Inhalt ausgewählt",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"custom_storage_path_unusable": "Custom storage path \"{{path}}\" is unusable, will use default path",
|
||||
"cannot_access_path": "Cannot access path {{path}}: {{error}}",
|
||||
"failed_update_project_mcp": "Failed to update project MCP servers",
|
||||
"settings_import_failed": "Settings import failed: {{error}}."
|
||||
"settings_import_failed": "Settings import failed: {{error}}.",
|
||||
"mistake_limit_guidance": "This may indicate a failure in the model's thought process or inability to use a tool properly, which can be mitigated with some user guidance (e.g. \"Try breaking down the task into smaller steps\")."
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "No terminal content selected",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"failed_remove_directory": "Error al eliminar el directorio de tareas: {{error}}",
|
||||
"custom_storage_path_unusable": "La ruta de almacenamiento personalizada \"{{path}}\" no es utilizable, se usará la ruta predeterminada",
|
||||
"cannot_access_path": "No se puede acceder a la ruta {{path}}: {{error}}",
|
||||
"settings_import_failed": "Error al importar la configuración: {{error}}."
|
||||
"settings_import_failed": "Error al importar la configuración: {{error}}.",
|
||||
"mistake_limit_guidance": "Esto puede indicar un fallo en el proceso de pensamiento del modelo o la incapacidad de usar una herramienta correctamente, lo cual puede mitigarse con orientación del usuario (ej. \"Intenta dividir la tarea en pasos más pequeños\")."
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "No hay contenido de terminal seleccionado",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"failed_remove_directory": "Échec de la suppression du répertoire de tâches : {{error}}",
|
||||
"custom_storage_path_unusable": "Le chemin de stockage personnalisé \"{{path}}\" est inutilisable, le chemin par défaut sera utilisé",
|
||||
"cannot_access_path": "Impossible d'accéder au chemin {{path}} : {{error}}",
|
||||
"settings_import_failed": "Échec de l'importation des paramètres : {{error}}"
|
||||
"settings_import_failed": "Échec de l'importation des paramètres : {{error}}",
|
||||
"mistake_limit_guidance": "Cela peut indiquer un échec dans le processus de réflexion du modèle ou une incapacité à utiliser un outil correctement, ce qui peut être atténué avec des conseils de l'utilisateur (par ex. \"Essaie de diviser la tâche en étapes plus petites\")."
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "Aucun contenu de terminal sélectionné",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"failed_remove_directory": "टास्क डायरेक्टरी हटाने में विफल: {{error}}",
|
||||
"custom_storage_path_unusable": "कस्टम स्टोरेज पाथ \"{{path}}\" उपयोग योग्य नहीं है, डिफ़ॉल्ट पाथ का उपयोग किया जाएगा",
|
||||
"cannot_access_path": "पाथ {{path}} तक पहुंच नहीं पा रहे हैं: {{error}}",
|
||||
"settings_import_failed": "सेटिंग्स इम्पोर्ट करने में विफल: {{error}}।"
|
||||
"settings_import_failed": "सेटिंग्स इम्पोर्ट करने में विफल: {{error}}।",
|
||||
"mistake_limit_guidance": "यह मॉडल की सोच प्रक्रिया में विफलता या किसी टूल का सही उपयोग न कर पाने का संकेत हो सकता है, जिसे उपयोगकर्ता के मार्गदर्शन से ठीक किया जा सकता है (जैसे \"कार्य को छोटे चरणों में बांटने की कोशिश करें\")।"
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "कोई टर्मिनल सामग्री चयनित नहीं",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"failed_remove_directory": "Impossibile rimuovere la directory delle attività: {{error}}",
|
||||
"custom_storage_path_unusable": "Il percorso di archiviazione personalizzato \"{{path}}\" non è utilizzabile, verrà utilizzato il percorso predefinito",
|
||||
"cannot_access_path": "Impossibile accedere al percorso {{path}}: {{error}}",
|
||||
"settings_import_failed": "Importazione delle impostazioni fallita: {{error}}."
|
||||
"settings_import_failed": "Importazione delle impostazioni fallita: {{error}}.",
|
||||
"mistake_limit_guidance": "Questo può indicare un fallimento nel processo di pensiero del modello o l'incapacità di utilizzare correttamente uno strumento, che può essere mitigato con la guida dell'utente (ad es. \"Prova a suddividere l'attività in passaggi più piccoli\")."
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "Nessun contenuto del terminale selezionato",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"failed_remove_directory": "タスクディレクトリの削除に失敗しました:{{error}}",
|
||||
"custom_storage_path_unusable": "カスタムストレージパス \"{{path}}\" が使用できないため、デフォルトパスを使用します",
|
||||
"cannot_access_path": "パス {{path}} にアクセスできません:{{error}}",
|
||||
"settings_import_failed": "設定のインポートに失敗しました:{{error}}"
|
||||
"settings_import_failed": "設定のインポートに失敗しました:{{error}}",
|
||||
"mistake_limit_guidance": "これは、モデルの思考プロセスの失敗やツールを適切に使用できないことを示している可能性があり、ユーザーのガイダンスによって軽減できます(例:「タスクをより小さなステップに分割してみてください」)。"
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "選択されたターミナルコンテンツがありません",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"failed_remove_directory": "작업 디렉토리 제거 실패: {{error}}",
|
||||
"custom_storage_path_unusable": "사용자 지정 저장 경로 \"{{path}}\"를 사용할 수 없어 기본 경로를 사용합니다",
|
||||
"cannot_access_path": "경로 {{path}}에 접근할 수 없습니다: {{error}}",
|
||||
"settings_import_failed": "설정 가져오기 실패: {{error}}."
|
||||
"settings_import_failed": "설정 가져오기 실패: {{error}}.",
|
||||
"mistake_limit_guidance": "이는 모델의 사고 과정 실패나 도구를 제대로 사용하지 못하는 것을 나타낼 수 있으며, 사용자 가이드를 통해 완화할 수 있습니다 (예: \"작업을 더 작은 단계로 나누어 시도해보세요\")."
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "선택된 터미널 내용이 없습니다",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"custom_storage_path_unusable": "Aangepast opslagpad \"{{path}}\" is onbruikbaar, standaardpad wordt gebruikt",
|
||||
"cannot_access_path": "Kan pad {{path}} niet openen: {{error}}",
|
||||
"failed_update_project_mcp": "Bijwerken van project MCP-servers mislukt",
|
||||
"settings_import_failed": "Importeren van instellingen mislukt: {{error}}."
|
||||
"settings_import_failed": "Importeren van instellingen mislukt: {{error}}.",
|
||||
"mistake_limit_guidance": "Dit kan duiden op een fout in het denkproces van het model of het onvermogen om een tool correct te gebruiken, wat kan worden verminderd met gebruikersbegeleiding (bijv. \"Probeer de taak op te delen in kleinere stappen\")."
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "Geen terminalinhoud geselecteerd",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"failed_remove_directory": "Nie udało się usunąć katalogu zadania: {{error}}",
|
||||
"custom_storage_path_unusable": "Niestandardowa ścieżka przechowywania \"{{path}}\" nie jest użyteczna, zostanie użyta domyślna ścieżka",
|
||||
"cannot_access_path": "Nie można uzyskać dostępu do ścieżki {{path}}: {{error}}",
|
||||
"settings_import_failed": "Nie udało się zaimportować ustawień: {{error}}."
|
||||
"settings_import_failed": "Nie udało się zaimportować ustawień: {{error}}.",
|
||||
"mistake_limit_guidance": "To może wskazywać na błąd w procesie myślowym modelu lub niezdolność do prawidłowego użycia narzędzia, co można złagodzić poprzez wskazówki użytkownika (np. \"Spróbuj podzielić zadanie na mniejsze kroki\")."
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "Nie wybrano zawartości terminala",
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@
|
|||
"failed_remove_directory": "Falha ao remover o diretório de tarefas: {{error}}",
|
||||
"custom_storage_path_unusable": "O caminho de armazenamento personalizado \"{{path}}\" não pode ser usado, será usado o caminho padrão",
|
||||
"cannot_access_path": "Não é possível acessar o caminho {{path}}: {{error}}",
|
||||
"settings_import_failed": "Falha ao importar configurações: {{error}}"
|
||||
"settings_import_failed": "Falha ao importar configurações: {{error}}",
|
||||
"mistake_limit_guidance": "Isso pode indicar uma falha no processo de pensamento do modelo ou incapacidade de usar uma ferramenta adequadamente, o que pode ser mitigado com orientação do usuário (ex. \"Tente dividir a tarefa em etapas menores\")."
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "Nenhum conteúdo do terminal selecionado",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"custom_storage_path_unusable": "Пользовательский путь хранения \"{{path}}\" непригоден, будет использован путь по умолчанию",
|
||||
"cannot_access_path": "Невозможно получить доступ к пути {{path}}: {{error}}",
|
||||
"failed_update_project_mcp": "Не удалось обновить серверы проекта MCP",
|
||||
"settings_import_failed": "Не удалось импортировать настройки: {{error}}."
|
||||
"settings_import_failed": "Не удалось импортировать настройки: {{error}}.",
|
||||
"mistake_limit_guidance": "Это может указывать на сбой в процессе мышления модели или неспособность правильно использовать инструмент, что можно смягчить с помощью руководства пользователя (например, \"Попробуйте разбить задачу на более мелкие шаги\")."
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "Не выбрано содержимое терминала",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"failed_remove_directory": "Görev dizini kaldırılamadı: {{error}}",
|
||||
"custom_storage_path_unusable": "Özel depolama yolu \"{{path}}\" kullanılamıyor, varsayılan yol kullanılacak",
|
||||
"cannot_access_path": "{{path}} yoluna erişilemiyor: {{error}}",
|
||||
"settings_import_failed": "Ayarlar içe aktarılamadı: {{error}}."
|
||||
"settings_import_failed": "Ayarlar içe aktarılamadı: {{error}}.",
|
||||
"mistake_limit_guidance": "Bu, modelin düşünce sürecindeki bir başarısızlığı veya bir aracı düzgün kullanamama durumunu gösterebilir, bu da kullanıcı rehberliği ile hafifletilebilir (örn. \"Görevi daha küçük adımlara bölmeyi deneyin\")."
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "Seçili terminal içeriği yok",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"failed_remove_directory": "Không thể xóa thư mục nhiệm vụ: {{error}}",
|
||||
"custom_storage_path_unusable": "Đường dẫn lưu trữ tùy chỉnh \"{{path}}\" không thể sử dụng được, sẽ sử dụng đường dẫn mặc định",
|
||||
"cannot_access_path": "Không thể truy cập đường dẫn {{path}}: {{error}}",
|
||||
"settings_import_failed": "Nhập cài đặt thất bại: {{error}}."
|
||||
"settings_import_failed": "Nhập cài đặt thất bại: {{error}}.",
|
||||
"mistake_limit_guidance": "Điều này có thể cho thấy sự thất bại trong quá trình suy nghĩ của mô hình hoặc không thể sử dụng công cụ đúng cách, có thể được giảm thiểu bằng hướng dẫn của người dùng (ví dụ: \"Hãy thử chia nhỏ nhiệm vụ thành các bước nhỏ hơn\")."
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "Không có nội dung terminal được chọn",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"failed_remove_directory": "删除任务目录失败:{{error}}",
|
||||
"custom_storage_path_unusable": "自定义存储路径 \"{{path}}\" 不可用,将使用默认路径",
|
||||
"cannot_access_path": "无法访问路径 {{path}}:{{error}}",
|
||||
"settings_import_failed": "设置导入失败:{{error}}。"
|
||||
"settings_import_failed": "设置导入失败:{{error}}。",
|
||||
"mistake_limit_guidance": "这可能表明模型思维过程失败或无法正确使用工具,可通过用户指导来缓解(例如\"尝试将任务分解为更小的步骤\")。"
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "没有选择终端内容",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
"failed_remove_directory": "刪除工作目錄失敗:{{error}}",
|
||||
"custom_storage_path_unusable": "自訂儲存路徑 \"{{path}}\" 無法使用,將使用預設路徑",
|
||||
"cannot_access_path": "無法存取路徑 {{path}}:{{error}}",
|
||||
"settings_import_failed": "設定匯入失敗:{{error}}。"
|
||||
"settings_import_failed": "設定匯入失敗:{{error}}。",
|
||||
"mistake_limit_guidance": "這可能表明模型思維過程失敗或無法正確使用工具,可透過使用者指導來緩解(例如「嘗試將工作分解為更小的步驟」)。"
|
||||
},
|
||||
"warnings": {
|
||||
"no_terminal_content": "沒有選擇終端機內容",
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export type ApiHandlerOptions = Omit<ProviderSettings, "apiProvider">
|
|||
// Anthropic
|
||||
// https://docs.anthropic.com/en/docs/about-claude/models
|
||||
export type AnthropicModelId = keyof typeof anthropicModels
|
||||
export const anthropicDefaultModelId: AnthropicModelId = "claude-3-7-sonnet-20250219"
|
||||
export const anthropicDefaultModelId: AnthropicModelId = "claude-sonnet-4-20250514"
|
||||
export const anthropicModels = {
|
||||
"claude-sonnet-4-20250514": {
|
||||
maxTokens: 64_000, // Overridden to 8k if `enableReasoningEffort` is false.
|
||||
|
|
@ -125,7 +125,7 @@ export interface MessageContent {
|
|||
}
|
||||
|
||||
export type BedrockModelId = keyof typeof bedrockModels
|
||||
export const bedrockDefaultModelId: BedrockModelId = "anthropic.claude-3-7-sonnet-20250219-v1:0"
|
||||
export const bedrockDefaultModelId: BedrockModelId = "anthropic.claude-sonnet-4-20250514-v1:0"
|
||||
export const bedrockDefaultPromptRouterModelId: BedrockModelId = "anthropic.claude-3-sonnet-20240229-v1:0"
|
||||
|
||||
// March, 12 2025 - updated prices to match US-West-2 list price shown at https://aws.amazon.com/bedrock/pricing/
|
||||
|
|
@ -488,7 +488,7 @@ export const glamaDefaultModelInfo: ModelInfo = {
|
|||
|
||||
// Requesty
|
||||
// https://requesty.ai/router-2
|
||||
export const requestyDefaultModelId = "coding/claude-3-7-sonnet"
|
||||
export const requestyDefaultModelId = "coding/claude-4-sonnet"
|
||||
export const requestyDefaultModelInfo: ModelInfo = {
|
||||
maxTokens: 8192,
|
||||
contextWindow: 200_000,
|
||||
|
|
@ -500,12 +500,12 @@ export const requestyDefaultModelInfo: ModelInfo = {
|
|||
cacheWritesPrice: 3.75,
|
||||
cacheReadsPrice: 0.3,
|
||||
description:
|
||||
"The best coding model, optimized by Requesty, and automatically routed to the fastest provider. Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities. It introduces a hybrid reasoning approach, allowing users to choose between rapid responses and extended, step-by-step processing for complex tasks. The model demonstrates notable improvements in coding, particularly in front-end development and full-stack updates, and excels in agentic workflows, where it can autonomously navigate multi-step processes. Claude 3.7 Sonnet maintains performance parity with its predecessor in standard mode while offering an extended reasoning mode for enhanced accuracy in math, coding, and instruction-following tasks. Read more at the [blog post here](https://www.anthropic.com/news/claude-3-7-sonnet)",
|
||||
"The best coding model, optimized by Requesty, and automatically routed to the fastest provider. Claude 4 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities.",
|
||||
}
|
||||
|
||||
// OpenRouter
|
||||
// https://openrouter.ai/models?order=newest&supported_parameters=tools
|
||||
export const openRouterDefaultModelId = "anthropic/claude-3.7-sonnet"
|
||||
export const openRouterDefaultModelId = "anthropic/claude-sonnet-4"
|
||||
export const openRouterDefaultModelInfo: ModelInfo = {
|
||||
maxTokens: 8192,
|
||||
contextWindow: 200_000,
|
||||
|
|
@ -523,7 +523,7 @@ export const openRouterDefaultModelInfo: ModelInfo = {
|
|||
// Vertex AI
|
||||
// https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-claude
|
||||
export type VertexModelId = keyof typeof vertexModels
|
||||
export const vertexDefaultModelId: VertexModelId = "claude-3-7-sonnet@20250219"
|
||||
export const vertexDefaultModelId: VertexModelId = "claude-sonnet-4@20250514"
|
||||
export const vertexModels = {
|
||||
"gemini-2.5-flash-preview-05-20:thinking": {
|
||||
maxTokens: 65_535,
|
||||
|
|
|
|||
|
|
@ -247,12 +247,17 @@ describe("useSelectedModel", () => {
|
|||
mockUseRouterModels.mockReturnValue({
|
||||
data: {
|
||||
openrouter: {
|
||||
"anthropic/claude-3.7-sonnet": {
|
||||
"anthropic/claude-sonnet-4": {
|
||||
// Default model
|
||||
maxTokens: 4096,
|
||||
contextWindow: 8192,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: false,
|
||||
maxTokens: 8192,
|
||||
contextWindow: 200_000,
|
||||
supportsImages: true,
|
||||
supportsComputerUse: true,
|
||||
supportsPromptCache: true,
|
||||
inputPrice: 3.0,
|
||||
outputPrice: 15.0,
|
||||
cacheWritesPrice: 3.75,
|
||||
cacheReadsPrice: 0.3,
|
||||
},
|
||||
},
|
||||
requesty: {},
|
||||
|
|
@ -279,12 +284,17 @@ describe("useSelectedModel", () => {
|
|||
const wrapper = createWrapper()
|
||||
const { result } = renderHook(() => useSelectedModel(apiConfiguration), { wrapper })
|
||||
|
||||
expect(result.current.id).toBe("anthropic/claude-3.7-sonnet")
|
||||
expect(result.current.id).toBe("anthropic/claude-sonnet-4")
|
||||
expect(result.current.info).toEqual({
|
||||
maxTokens: 4096,
|
||||
contextWindow: 8192,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: false,
|
||||
maxTokens: 8192,
|
||||
contextWindow: 200_000,
|
||||
supportsImages: true,
|
||||
supportsComputerUse: true,
|
||||
supportsPromptCache: true,
|
||||
inputPrice: 3.0,
|
||||
outputPrice: 15.0,
|
||||
cacheWritesPrice: 3.75,
|
||||
cacheReadsPrice: 0.3,
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
@ -366,7 +376,7 @@ describe("useSelectedModel", () => {
|
|||
const { result } = renderHook(() => useSelectedModel(), { wrapper })
|
||||
|
||||
expect(result.current.provider).toBe("anthropic")
|
||||
expect(result.current.id).toBe("claude-3-7-sonnet-20250219")
|
||||
expect(result.current.id).toBe("claude-sonnet-4-20250514")
|
||||
expect(result.current.info).toBeUndefined()
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue