refactor(API): 移除 code_execution 工具相关配置
- 用户注册时默认工具列表移除 code_execution - 设置接口默认工具列表移除 code_execution - 工具列表接口过滤掉 code_execution 工具
This commit is contained in:
parent
65028e37ed
commit
d581b8668a
@ -129,7 +129,7 @@ export async function POST(request: NextRequest) {
|
||||
cchApiKey: null,
|
||||
cchApiKeyConfigured: false,
|
||||
defaultModel: 'claude-sonnet-4-5-20250929',
|
||||
defaultTools: ['web_search', 'code_execution', 'web_fetch'],
|
||||
defaultTools: ['web_search', 'web_fetch'],
|
||||
theme: 'light',
|
||||
language: 'zh-CN',
|
||||
fontSize: 15,
|
||||
|
||||
@ -11,7 +11,7 @@ const DEFAULT_SETTINGS = {
|
||||
cchApiKeyConfigured: false,
|
||||
apiFormat: 'claude' as 'claude' | 'openai', // API 格式:claude(原生)| openai(兼容)
|
||||
defaultModel: 'claude-sonnet-4-5-20250929',
|
||||
defaultTools: ['web_search', 'code_execution', 'web_fetch'],
|
||||
defaultTools: ['web_search', 'web_fetch'],
|
||||
systemPrompt: '',
|
||||
temperature: '0.7',
|
||||
theme: 'light',
|
||||
|
||||
@ -11,7 +11,10 @@ export async function GET() {
|
||||
orderBy: [asc(tools.sortOrder)],
|
||||
});
|
||||
|
||||
return NextResponse.json(toolList);
|
||||
// 过滤掉 code_execution 工具
|
||||
const filteredTools = toolList.filter(tool => tool.toolId !== 'code_execution');
|
||||
|
||||
return NextResponse.json(filteredTools);
|
||||
} catch (error) {
|
||||
console.error('Failed to get tools:', error);
|
||||
return NextResponse.json(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user