refactor: broaden haiku background routing

This commit is contained in:
zhangbowen09
2025-10-17 22:59:16 +08:00
parent 33a72cc965
commit 0c0929ed9d

View File

@@ -114,9 +114,10 @@ const getUseModel = async (
return model[1];
}
}
// If the model is claude-3-5-haiku, use the background model
// Use the background model for any Claude Haiku variant
if (
req.body.model?.startsWith("claude-3-5-haiku") &&
req.body.model?.includes("claude") &&
req.body.model?.includes("haiku") &&
config.Router.background
) {
req.log.info(`Using background model for ${req.body.model}`);