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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
5974d31164
commit
2fca9febe4
@@ -126,7 +126,7 @@ function anthropicToBackend(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const base: BackendBody = {
|
const base: BackendBody = {
|
||||||
model: backendModel,
|
model: anthReq.model,
|
||||||
messages,
|
messages,
|
||||||
max_tokens: anthReq.max_tokens,
|
max_tokens: anthReq.max_tokens,
|
||||||
temperature: anthReq.temperature,
|
temperature: anthReq.temperature,
|
||||||
@@ -144,7 +144,7 @@ function anthropicToBackend(
|
|||||||
// If backend has a custom adaptRequest, use it
|
// If backend has a custom adaptRequest, use it
|
||||||
if (config.adaptRequest) {
|
if (config.adaptRequest) {
|
||||||
return config.adaptRequest({
|
return config.adaptRequest({
|
||||||
model: backendModel,
|
model: anthReq.model,
|
||||||
messages,
|
messages,
|
||||||
temperature: anthReq.temperature,
|
temperature: anthReq.temperature,
|
||||||
max_tokens: anthReq.max_tokens,
|
max_tokens: anthReq.max_tokens,
|
||||||
|
|||||||
Reference in New Issue
Block a user