fix: use MODEL_ROUTES directly for Anthropic proxy routing
Remove the ANTHROPIC_MODEL_MAP layer — /v1/messages now uses the same model names as /v1/chat/completions (deepseek-v4-flash-free, gpt-5.4-mini-no-login, deepseek/deepseek-v4-flash). This way users send the original model name and it routes to the correct backend. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
2fca9febe4
commit
2fead57d0f
+2
-2
@@ -28,7 +28,7 @@ import { checkBodySize } from "../src/middleware/body-limiter";
|
||||
import { createRateLimiter } from "../src/middleware/rate-limiter";
|
||||
import { logRelayEvent } from "../src/middleware/logger";
|
||||
import { handleChatCompletion, listModels } from "../src/lib/ai-proxy";
|
||||
import { handleAnthropicMessages, listAnthropicModels } from "../src/lib/anthropic-proxy";
|
||||
import { handleAnthropicMessages } from "../src/lib/anthropic-proxy";
|
||||
|
||||
// ─── Configuration ──────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -428,7 +428,7 @@ export default {
|
||||
|
||||
// Models list
|
||||
if (url.pathname === "/v1/models" && req.method === "GET") {
|
||||
const models = [...listModels(), ...listAnthropicModels()].map((id) => ({
|
||||
const models = listModels().map((id) => ({
|
||||
id,
|
||||
object: "model",
|
||||
created: Math.floor(Date.now() / 1000),
|
||||
|
||||
Reference in New Issue
Block a user