mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-19 00:27:26 +00:00
feat: /v1/chat/completion -> /v1/response (#2629)
* feat: /v1/chat/completion -> /v1/response
This commit is contained in:
@@ -39,6 +39,7 @@ const ModelSetting = () => {
|
||||
'claude.thinking_adapter_budget_tokens_percentage': 0.8,
|
||||
'global.pass_through_request_enabled': false,
|
||||
'global.thinking_model_blacklist': '[]',
|
||||
'global.chat_completions_to_responses_policy': '{}',
|
||||
'general_setting.ping_interval_enabled': false,
|
||||
'general_setting.ping_interval_seconds': 60,
|
||||
'gemini.thinking_adapter_enabled': false,
|
||||
@@ -59,10 +60,16 @@ const ModelSetting = () => {
|
||||
item.key === 'claude.model_headers_settings' ||
|
||||
item.key === 'claude.default_max_tokens' ||
|
||||
item.key === 'gemini.supported_imagine_models' ||
|
||||
item.key === 'global.thinking_model_blacklist'
|
||||
item.key === 'global.thinking_model_blacklist' ||
|
||||
item.key === 'global.chat_completions_to_responses_policy'
|
||||
) {
|
||||
if (item.value !== '') {
|
||||
item.value = JSON.stringify(JSON.parse(item.value), null, 2);
|
||||
try {
|
||||
item.value = JSON.stringify(JSON.parse(item.value), null, 2);
|
||||
} catch (e) {
|
||||
// Keep raw value so user can fix it, and avoid crashing the page.
|
||||
console.error(`Invalid JSON for option ${item.key}:`, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Keep boolean config keys ending with enabled/Enabled so UI parses correctly.
|
||||
|
||||
Reference in New Issue
Block a user