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,
|
cchApiKey: null,
|
||||||
cchApiKeyConfigured: false,
|
cchApiKeyConfigured: false,
|
||||||
defaultModel: 'claude-sonnet-4-5-20250929',
|
defaultModel: 'claude-sonnet-4-5-20250929',
|
||||||
defaultTools: ['web_search', 'code_execution', 'web_fetch'],
|
defaultTools: ['web_search', 'web_fetch'],
|
||||||
theme: 'light',
|
theme: 'light',
|
||||||
language: 'zh-CN',
|
language: 'zh-CN',
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
|
|||||||
@ -11,7 +11,7 @@ const DEFAULT_SETTINGS = {
|
|||||||
cchApiKeyConfigured: false,
|
cchApiKeyConfigured: false,
|
||||||
apiFormat: 'claude' as 'claude' | 'openai', // API 格式:claude(原生)| openai(兼容)
|
apiFormat: 'claude' as 'claude' | 'openai', // API 格式:claude(原生)| openai(兼容)
|
||||||
defaultModel: 'claude-sonnet-4-5-20250929',
|
defaultModel: 'claude-sonnet-4-5-20250929',
|
||||||
defaultTools: ['web_search', 'code_execution', 'web_fetch'],
|
defaultTools: ['web_search', 'web_fetch'],
|
||||||
systemPrompt: '',
|
systemPrompt: '',
|
||||||
temperature: '0.7',
|
temperature: '0.7',
|
||||||
theme: 'light',
|
theme: 'light',
|
||||||
|
|||||||
@ -11,7 +11,10 @@ export async function GET() {
|
|||||||
orderBy: [asc(tools.sortOrder)],
|
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) {
|
} catch (error) {
|
||||||
console.error('Failed to get tools:', error);
|
console.error('Failed to get tools:', error);
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user