From 2fca9febe43e8e0af0270fcef53ecca0b9350529 Mon Sep 17 00:00:00 2001 From: MythEclipse Date: Thu, 11 Jun 2026 00:20:20 +0700 Subject: [PATCH] fix: pass original model name to backend in Anthropic proxy Use anthReq.model instead of backendModel so the backend receives the user-sent model name (e.g. claude-sonnet-4) rather than the internal mapped name. Co-Authored-By: Claude Fable 5 --- src/lib/anthropic-proxy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/anthropic-proxy.ts b/src/lib/anthropic-proxy.ts index 18c927d..9ed0ca5 100644 --- a/src/lib/anthropic-proxy.ts +++ b/src/lib/anthropic-proxy.ts @@ -126,7 +126,7 @@ function anthropicToBackend( } const base: BackendBody = { - model: backendModel, + model: anthReq.model, messages, max_tokens: anthReq.max_tokens, temperature: anthReq.temperature, @@ -144,7 +144,7 @@ function anthropicToBackend( // If backend has a custom adaptRequest, use it if (config.adaptRequest) { return config.adaptRequest({ - model: backendModel, + model: anthReq.model, messages, temperature: anthReq.temperature, max_tokens: anthReq.max_tokens,