mirror of
https://github.com/musistudio/claude-code-router.git
synced 2026-02-02 23:00:50 +08:00
fix #900
This commit is contained in:
@@ -122,11 +122,7 @@ const getUseModel = async (
|
|||||||
req.log.info(`Using background model for ${req.body.model}`);
|
req.log.info(`Using background model for ${req.body.model}`);
|
||||||
return config.Router.background;
|
return config.Router.background;
|
||||||
}
|
}
|
||||||
// if exits thinking, use the think model
|
// The priority of websearch must be higher than thinking.
|
||||||
if (req.body.thinking && config.Router.think) {
|
|
||||||
req.log.info(`Using think model for ${req.body.thinking}`);
|
|
||||||
return config.Router.think;
|
|
||||||
}
|
|
||||||
if (
|
if (
|
||||||
Array.isArray(req.body.tools) &&
|
Array.isArray(req.body.tools) &&
|
||||||
req.body.tools.some((tool: any) => tool.type?.startsWith("web_search")) &&
|
req.body.tools.some((tool: any) => tool.type?.startsWith("web_search")) &&
|
||||||
@@ -134,6 +130,11 @@ const getUseModel = async (
|
|||||||
) {
|
) {
|
||||||
return config.Router.webSearch;
|
return config.Router.webSearch;
|
||||||
}
|
}
|
||||||
|
// if exits thinking, use the think model
|
||||||
|
if (req.body.thinking && config.Router.think) {
|
||||||
|
req.log.info(`Using think model for ${req.body.thinking}`);
|
||||||
|
return config.Router.think;
|
||||||
|
}
|
||||||
return config.Router!.default;
|
return config.Router!.default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user