release v1.0.23 to support websearch

This commit is contained in:
jinhui.li
2025-07-21 10:46:53 +08:00
parent e362feaa82
commit 7165953b50
5 changed files with 21 additions and 19 deletions

View File

@@ -14,7 +14,10 @@ const getUseModel = (req: any, tokenCount: number, config: any) => {
return config.Router.longContext;
}
// If the model is claude-3-5-haiku, use the background model
if (req.body.model?.startsWith("claude-3-5-haiku") && config.Router.background) {
if (
req.body.model?.startsWith("claude-3-5-haiku") &&
config.Router.background
) {
log("Using background model for ", req.body.model);
return config.Router.background;
}
@@ -23,6 +26,9 @@ const getUseModel = (req: any, tokenCount: number, config: any) => {
log("Using think model for ", req.body.thinking);
return config.Router.think;
}
if (Array.isArray(req.body.tools) && req.body.tools.some(tool => tool.type?.startsWith('web_search')) && config.Router.webSearch) {
return config.Router.webSearch;
}
return config.Router!.default;
};