Deprecate 01.ai chat completion source (#4327)

086f873f2f6c8c7f025b1d43f07912ce50ba7d71

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
17 files changed, +3 -153Ignore whitespace
public/index.html+3 -21
@@ -691,7 +691,7 @@
691691 </span>
692692 </div>
693693 </div>
694694 <div class="range-block" data-source="openai,claude,aimlapi,openrouter,ai21,makersuite,vertexai,mistralai,custom,cohere,perplexity,groq,01ai,nanogpt,deepseek,xai,pollinations">
695695 <div class="range-block-title" data-i18n="Temperature">
696696 Temperature
697697 </div>
@@ -743,7 +743,7 @@
743743 </div>
744744 </div>
745745 </div>
746746 <div class="range-block" data-source="openai,claude,aimlapi,openrouter,ai21,makersuite,vertexai,mistralai,custom,cohere,perplexity,groq,01ai,nanogpt,deepseek,xai,pollinations">
747747 <div class="range-block-title" data-i18n="Top P">
748748 Top P
749749 </div>
@@ -1995,7 +1995,7 @@
19951995 <strong data-i18n="enable_functions_desc_4">Not supported when Prompt Post-Processing with "no tools" is used!</strong>
19961996 </div>
19971997 </div>
19981998 <div class="range-block" data-source="openai,aimlapi,openrouter,mistralai,makersuite,vertexai,claude,custom,01ai,xai,pollinations">
19991999 <label for="openai_image_inlining" class="checkbox_label flexWrap widthFreeExpand">
20002000 <input id="openai_image_inlining" type="checkbox" />
20012001 <span data-i18n="Send inline images">Send inline images</span>
@@ -2788,7 +2788,6 @@
27882788 <option value="custom" data-i18n="Custom (OpenAI-compatible)">Custom (OpenAI-compatible)</option>
27892789 </optgroup>
27902790 <optgroup>
2791- <option value="01ai">01.AI (Yi)</option>
27922791 <option value="ai21">AI21</option>
27932792 <option value="aimlapi">AI/ML API</option>
27942793 <option value="claude">Claude</option>
@@ -3572,23 +3571,6 @@
35723571 <select id="model_custom_select" class="text_pole model_custom_select"></select>
35733572 </div>
35743573 </form>
3575- <div id="01ai_form" data-source="01ai">
3576- <h4>
3577- <a data-i18n="01.AI API Key" href="https://platform.lingyiwanwu.com/" target="_blank" rel="noopener noreferrer">
3578- 01.AI API Key
3579- </a>
3580- </h4>
3581- <div class="flex-container">
3582- <input id="api_key_01ai" name="api_key_01ai" class="text_pole flex1" value="" type="text" autocomplete="off">
3583- <div title="Manage API keys" data-i18n="[title]Manage API keys" class="menu_button fa-solid fa-key fa-fw manage-api-keys" data-key="api_key_01ai"></div>
3584- </div>
3585- <div data-for="api_key_01ai" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you click 'Connect'.">
3586- For privacy reasons, your API key will be hidden after you click 'Connect'.
3587- </div>
3588- <h4 data-i18n="01.AI Model">01.AI Model</h4>
3589- <select id="model_01ai_select">
3590- </select>
3591- </div>
35923574 <div id="xai_form" data-source="xai">
35933575 <h4>
35943576 <a data-i18n="xAI API Key" href="https://console.x.ai/" target="_blank" rel="noopener noreferrer">
public/locales/fr-fr.json+0 -2
@@ -1426,8 +1426,6 @@
14261426 "prompt_post_processing_merge": "Fusionner les rôles consécutifs",
14271427 "prompt_post_processing_semi": "Semi-strict (rôles alternés)",
14281428 "prompt_post_processing_strict": "Strict (l'utilisateur d'abord, rôles alternés)",
1429- "01.AI API Key": "01.Clé IA API",
1430- "01.AI Model": "01.Modèle IA",
14311429 "Additional Parameters": "Paramètres supplémentaires",
14321430 "Import Advanced Formatting settings": "Importer les paramètres de formatage avancé\n\nVous pouvez également fournir des fichiers hérités pour les modèles Instruct et Context..",
14331431 "Master Import": "Master Import",
public/locales/ru-ru.json+0 -2
@@ -1619,8 +1619,6 @@
16191619 "Do not proceed if you do not agree to this!": "Не продолжайте, если не согласны с этими условиями!",
16201620 "Relative (to other prompts in prompt manager) or In-chat @ Depth.": "Относительно других промтов в менеджере, либо на опред. глубину в чате.",
16211621 "prompt_manager_in_chat": "На глубине в чате",
1622- "01.AI API Key": "Ключ от API 01.AI",
1623- "01.AI Model": "Модель 01.AI",
16241622 "Load a custom asset list or select": "Загрузите набор внешних ресурсов или выберите",
16251623 "Install Extension": "Установить расширение",
16261624 "to install 3rd party extensions.": ", чтобы установить стороннее расширение.",
public/locales/zh-cn.json+0 -2
@@ -460,8 +460,6 @@
460460 "prompt_post_processing_merge": "合并相同角色连续的发言",
461461 "prompt_post_processing_semi": "半严格(强制对话角色交替)",
462462 "prompt_post_processing_strict": "严格(强制对话角色交替、用户最先)",
463- "01.AI API Key": "01.AI API密钥",
464- "01.AI Model": "01.AI 模型",
465463 "Additional Parameters": "附加参数",
466464 "Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "通过发送简短的测试消息验证您的API连接。请注意,您将因此消耗额度!",
467465 "Test Message": "发送测试消息",
public/locales/zh-tw.json+0 -2
@@ -1547,8 +1547,6 @@
15471547 "Width of a node, in pixels at zoom level 1.0.": "縮放等級為 1.0 時,節點的像素寬度。",
15481548 "world_button_title": "角色背景設定\n「Shift+點選」可開啟「連結至世界資訊」彈窗",
15491549 "# of Beams": "# of Beams",
1550- "01.AI API Key": "01.AI API 金鑰",
1551- "01.AI Model": "01.AI 模型",
15521550 "Additional Parameters": "其他參數",
15531551 "All": "全部",
15541552 "Allow fallback models": "允許回退模型",
public/scripts/RossAscends-mods.js+0 -1
@@ -406,7 +406,6 @@ function RA_autoconnect(PrevApi) {
406406 || (secret_state[SECRET_KEYS.COHERE] && oai_settings.chat_completion_source == chat_completion_sources.COHERE)
407407 || (secret_state[SECRET_KEYS.PERPLEXITY] && oai_settings.chat_completion_source == chat_completion_sources.PERPLEXITY)
408408 || (secret_state[SECRET_KEYS.GROQ] && oai_settings.chat_completion_source == chat_completion_sources.GROQ)
409- || (secret_state[SECRET_KEYS.ZEROONEAI] && oai_settings.chat_completion_source == chat_completion_sources.ZEROONEAI)
410409 || (secret_state[SECRET_KEYS.NANOGPT] && oai_settings.chat_completion_source == chat_completion_sources.NANOGPT)
411410 || (secret_state[SECRET_KEYS.DEEPSEEK] && oai_settings.chat_completion_source == chat_completion_sources.DEEPSEEK)
412411 || (secret_state[SECRET_KEYS.XAI] && oai_settings.chat_completion_source == chat_completion_sources.XAI)
public/scripts/extensions/caption/index.js+0 -1
@@ -435,7 +435,6 @@ jQuery(async function () {
435435
436436 const chatCompletionApis = {
437437 'openrouter': SECRET_KEYS.OPENROUTER,
438- 'zerooneai': SECRET_KEYS.ZEROONEAI,
439438 'groq': SECRET_KEYS.GROQ,
440439 'cohere': SECRET_KEYS.COHERE,
441440 'aimlapi': SECRET_KEYS.AIMLAPI,
public/scripts/extensions/caption/settings.html+0 -2
@@ -17,7 +17,6 @@
1717 <div class="flex1 flex-container flexFlowColumn flexNoGap">
1818 <label for="caption_multimodal_api" data-i18n="API">API</label>
1919 <select id="caption_multimodal_api" class="flex1 text_pole">
20- <option value="zerooneai">01.AI (Yi)</option>
2120 <option value="aimlapi">AI/ML API</option>
2221 <option value="anthropic">Anthropic</option>
2322 <option value="cohere">Cohere</option>
@@ -52,7 +51,6 @@
5251 <option data-type="mistral" value="mistral-small-latest">mistral-small-latest</option>
5352 <option data-type="mistral" value="mistral-medium-latest">mistral-medium-latest</option>
5453 <option data-type="mistral" value="mistral-medium-2505">mistral-medium-2505</option>
55- <option data-type="zerooneai" value="yi-vision">yi-vision</option>
5654 <option data-type="openai" value="gpt-4.1">gpt-4.1</option>
5755 <option data-type="openai" value="gpt-4.1-2025-04-14">gpt-4.1-2025-04-14</option>
5856 <option data-type="openai" value="gpt-4.1-mini">gpt-4.1-mini</option>
public/scripts/extensions/shared.js+0 -4
@@ -163,10 +163,6 @@ function throwIfInvalidModel(useReverseProxy) {
163163 throw new Error('Anthropic (Claude) API key is not set.');
164164 }
165165
166- if (multimodalApi === 'zerooneai' && !secret_state[SECRET_KEYS.ZEROONEAI]) {
167- throw new Error('01.AI API key is not set.');
168- }
169-
170166 if (multimodalApi === 'groq' && !secret_state[SECRET_KEYS.GROQ]) {
171167 throw new Error('Groq API key is not set.');
172168 }
public/scripts/openai.js+0 -88
@@ -178,7 +178,6 @@ export const chat_completion_sources = {
178178 COHERE: 'cohere',
179179 PERPLEXITY: 'perplexity',
180180 GROQ: 'groq',
181- ZEROONEAI: '01ai',
182181 NANOGPT: 'nanogpt',
183182 DEEPSEEK: 'deepseek',
184183 AIMLAPI: 'aimlapi',
@@ -271,7 +270,6 @@ export const settingsToUpdate = {
271270 nanogpt_model: ['#model_nanogpt_select', 'nanogpt_model', false, true],
272271 deepseek_model: ['#model_deepseek_select', 'deepseek_model', false, true],
273272 aimlapi_model: ['#model_aimlapi_select', 'aimlapi_model', false, true],
274- zerooneai_model: ['#model_01ai_select', 'zerooneai_model', false, true],
275273 xai_model: ['#model_xai_select', 'xai_model', false, true],
276274 pollinations_model: ['#model_pollinations_select', 'pollinations_model', false, true],
277275 custom_model: ['#custom_model_id', 'custom_model', false, true],
@@ -365,7 +363,6 @@ const default_settings = {
365363 perplexity_model: 'sonar-pro',
366364 groq_model: 'llama-3.3-70b-versatile',
367365 nanogpt_model: 'gpt-4o-mini',
368- zerooneai_model: 'yi-large',
369366 deepseek_model: 'deepseek-chat',
370367 aimlapi_model: 'gpt-4o-mini-2024-07-18',
371368 xai_model: 'grok-3-beta',
@@ -452,7 +449,6 @@ const oai_settings = {
452449 perplexity_model: 'sonar-pro',
453450 groq_model: 'llama-3.1-70b-versatile',
454451 nanogpt_model: 'gpt-4o-mini',
455- zerooneai_model: 'yi-large',
456452 deepseek_model: 'deepseek-chat',
457453 aimlapi_model: 'gpt-4-turbo',
458454 xai_model: 'grok-3-beta',
@@ -1607,8 +1603,6 @@ export function getChatCompletionModel(source = null) {
16071603 return oai_settings.perplexity_model;
16081604 case chat_completion_sources.GROQ:
16091605 return oai_settings.groq_model;
1610- case chat_completion_sources.ZEROONEAI:
1611- return oai_settings.zerooneai_model;
16121606 case chat_completion_sources.NANOGPT:
16131607 return oai_settings.nanogpt_model;
16141608 case chat_completion_sources.DEEPSEEK:
@@ -1722,23 +1716,6 @@ function saveModelList(data) {
17221716 }
17231717 }
17241718
1725- if (oai_settings.chat_completion_source == chat_completion_sources.ZEROONEAI) {
1726- $('#model_01ai_select').empty();
1727- model_list.forEach((model) => {
1728- $('#model_01ai_select').append(
1729- $('<option>', {
1730- value: model.id,
1731- text: model.id,
1732- }));
1733- });
1734-
1735- if (!oai_settings.zerooneai_model && model_list.length > 0) {
1736- oai_settings.zerooneai_model = model_list[0].id;
1737- }
1738-
1739- $('#model_01ai_select').val(oai_settings.zerooneai_model).trigger('change');
1740- }
1741-
17421719 if (oai_settings.chat_completion_source == chat_completion_sources.AIMLAPI) {
17431720 $('#model_aimlapi_select').empty();
17441721 const chatModels = model_list.filter(m => m.type === 'chat-completion');
@@ -2057,7 +2034,6 @@ async function sendOpenAIRequest(type, messages, signal, { jsonSchema = null } =
20572034 const isCohere = oai_settings.chat_completion_source == chat_completion_sources.COHERE;
20582035 const isPerplexity = oai_settings.chat_completion_source == chat_completion_sources.PERPLEXITY;
20592036 const isGroq = oai_settings.chat_completion_source == chat_completion_sources.GROQ;
2060- const is01AI = oai_settings.chat_completion_source == chat_completion_sources.ZEROONEAI;
20612037 const isDeepSeek = oai_settings.chat_completion_source == chat_completion_sources.DEEPSEEK;
20622038 const isAimlapi = oai_settings.chat_completion_source == chat_completion_sources.AIMLAPI;
20632039 const isXAI = oai_settings.chat_completion_source == chat_completion_sources.XAI;
@@ -2215,17 +2191,6 @@ async function sendOpenAIRequest(type, messages, signal, { jsonSchema = null } =
22152191 delete generate_data.n;
22162192 }
22172193
2218- // https://platform.01.ai/docs#request-body
2219- if (is01AI) {
2220- delete generate_data.logprobs;
2221- delete generate_data.logit_bias;
2222- delete generate_data.top_logprobs;
2223- delete generate_data.n;
2224- delete generate_data.frequency_penalty;
2225- delete generate_data.presence_penalty;
2226- delete generate_data.stop;
2227- }
2228-
22292194 // https://api-docs.deepseek.com/api/create-chat-completion
22302195 if (isDeepSeek) {
22312196 generate_data.top_p = generate_data.top_p || Number.EPSILON;
@@ -3378,7 +3343,6 @@ function loadOpenAISettings(data, settings) {
33783343 oai_settings.nanogpt_model = settings.nanogpt_model ?? default_settings.nanogpt_model;
33793344 oai_settings.deepseek_model = settings.deepseek_model ?? default_settings.deepseek_model;
33803345 oai_settings.aimlapi_model = settings.aimlapi_model ?? default_settings.aimlapi_model;
3381- oai_settings.zerooneai_model = settings.zerooneai_model ?? default_settings.zerooneai_model;
33823346 oai_settings.xai_model = settings.xai_model ?? default_settings.xai_model;
33833347 oai_settings.pollinations_model = settings.pollinations_model ?? default_settings.pollinations_model;
33843348 oai_settings.custom_model = settings.custom_model ?? default_settings.custom_model;
@@ -3472,7 +3436,6 @@ function loadOpenAISettings(data, settings) {
34723436 $(`#model_nanogpt_select option[value="${oai_settings.nanogpt_model}"`).prop('selected', true);
34733437 $('#model_deepseek_select').val(oai_settings.deepseek_model);
34743438 $(`#model_deepseek_select option[value="${oai_settings.deepseek_model}"`).prop('selected', true);
3475- $('#model_01ai_select').val(oai_settings.zerooneai_model);
34763439 $('#model_aimlapi_select').val(oai_settings.aimlapi_model);
34773440 $(`#model_aimlapi_select option[value="${oai_settings.aimlapi_model}"`).prop('selected', true);
34783441 $('#model_xai_select').val(oai_settings.xai_model);
@@ -3748,7 +3711,6 @@ async function saveOpenAIPreset(name, settings, triggerUi = true) {
37483711 cohere_model: settings.cohere_model,
37493712 perplexity_model: settings.perplexity_model,
37503713 groq_model: settings.groq_model,
3751- zerooneai_model: settings.zerooneai_model,
37523714 xai_model: settings.xai_model,
37533715 pollinations_model: settings.pollinations_model,
37543716 aimlapi_model: settings.aimlapi_model,
@@ -4572,11 +4534,6 @@ async function onModelChange() {
45724534 oai_settings.deepseek_model = value;
45734535 }
45744536
4575- if (value && $(this).is('#model_01ai_select')) {
4576- console.log('01.AI model changed to', value);
4577- oai_settings.zerooneai_model = value;
4578- }
4579-
45804537 if (value && $(this).is('#model_custom_select')) {
45814538 console.log('Custom model changed to', value);
45824539 oai_settings.custom_model = value;
@@ -4773,30 +4730,6 @@ async function onModelChange() {
47734730 $('#temp_openai').attr('max', oai_max_temp).val(oai_settings.temp_openai).trigger('input');
47744731 }
47754732
4776- if (oai_settings.chat_completion_source === chat_completion_sources.ZEROONEAI) {
4777- if (oai_settings.max_context_unlocked) {
4778- $('#openai_max_context').attr('max', unlocked_max);
4779- }
4780- else if (['yi-large'].includes(oai_settings.zerooneai_model)) {
4781- $('#openai_max_context').attr('max', max_32k);
4782- }
4783- else if (['yi-vision'].includes(oai_settings.zerooneai_model)) {
4784- $('#openai_max_context').attr('max', max_16k);
4785- }
4786- else if (['yi-large-turbo'].includes(oai_settings.zerooneai_model)) {
4787- $('#openai_max_context').attr('max', max_4k);
4788- }
4789- else {
4790- $('#openai_max_context').attr('max', max_16k);
4791- }
4792-
4793- oai_settings.openai_max_context = Math.min(oai_settings.openai_max_context, Number($('#openai_max_context').attr('max')));
4794- $('#openai_max_context').val(oai_settings.openai_max_context).trigger('input');
4795-
4796- oai_settings.temp_openai = Math.min(oai_max_temp, oai_settings.temp_openai);
4797- $('#temp_openai').attr('max', oai_max_temp).val(oai_settings.temp_openai).trigger('input');
4798- }
4799-
48004733 if (oai_settings.chat_completion_source === chat_completion_sources.NANOGPT) {
48014734 if (oai_settings.max_context_unlocked) {
48024735 $('#openai_max_context').attr('max', unlocked_max);
@@ -5094,19 +5027,6 @@ async function onConnectButtonClick(e) {
50945027 }
50955028 }
50965029
5097- if (oai_settings.chat_completion_source == chat_completion_sources.ZEROONEAI) {
5098- const api_key_01ai = String($('#api_key_01ai').val()).trim();
5099-
5100- if (api_key_01ai.length) {
5101- await writeSecret(SECRET_KEYS.ZEROONEAI, api_key_01ai);
5102- }
5103-
5104- if (!secret_state[SECRET_KEYS.ZEROONEAI]) {
5105- console.log('No secret key saved for 01.AI');
5106- return;
5107- }
5108- }
5109-
51105030 if (oai_settings.chat_completion_source === chat_completion_sources.XAI) {
51115031 const api_key_xai = String($('#api_key_xai').val()).trim();
51125032
@@ -5179,9 +5099,6 @@ function toggleChatCompletionForms() {
51795099 else if (oai_settings.chat_completion_source == chat_completion_sources.NANOGPT) {
51805100 $('#model_nanogpt_select').trigger('change');
51815101 }
5182- else if (oai_settings.chat_completion_source == chat_completion_sources.ZEROONEAI) {
5183- $('#model_01ai_select').trigger('change');
5184- }
51855102 else if (oai_settings.chat_completion_source == chat_completion_sources.CUSTOM) {
51865103 $('#model_custom_select').trigger('change');
51875104 }
@@ -5281,8 +5198,6 @@ export function isImageInliningSupported() {
52815198 'o1',
52825199 'o3',
52835200 'o4-mini',
5284- // 01.AI (Yi)
5285- 'yi-vision',
52865201 // Claude
52875202 'claude-3',
52885203 'claude-opus-4',
@@ -5324,8 +5239,6 @@ export function isImageInliningSupported() {
53245239 return true;
53255240 case chat_completion_sources.CUSTOM:
53265241 return true;
5327- case chat_completion_sources.ZEROONEAI:
5328- return visionSupportedModels.some(model => oai_settings.zerooneai_model.includes(model));
53295242 case chat_completion_sources.MISTRALAI:
53305243 return visionSupportedModels.some(model => oai_settings.mistralai_model.includes(model));
53315244 case chat_completion_sources.COHERE:
@@ -6120,7 +6033,6 @@ export function initOpenAI() {
61206033 $('#model_groq_select').on('change', onModelChange);
61216034 $('#model_nanogpt_select').on('change', onModelChange);
61226035 $('#model_deepseek_select').on('change', onModelChange);
6123- $('#model_01ai_select').on('change', onModelChange);
61246036 $('#model_aimlapi_select').on('change', onModelChange);
61256037 $('#model_custom_select').on('change', onModelChange);
61266038 $('#model_xai_select').on('change', onModelChange);
public/scripts/secrets.js+0 -3
@@ -48,7 +48,6 @@ export const SECRET_KEYS = {
4848 GROQ: 'api_key_groq',
4949 AZURE_TTS: 'api_key_azure_tts',
5050 FEATHERLESS: 'api_key_featherless',
51- ZEROONEAI: 'api_key_01ai',
5251 HUGGINGFACE: 'api_key_huggingface',
5352 STABILITY: 'api_key_stability',
5453 CUSTOM_OPENAI_TTS: 'api_key_custom_openai_tts',
@@ -92,7 +91,6 @@ const FRIENDLY_NAMES = {
9291 [SECRET_KEYS.PERPLEXITY]: 'Perplexity',
9392 [SECRET_KEYS.GROQ]: 'Groq',
9493 [SECRET_KEYS.FEATHERLESS]: 'Featherless',
95- [SECRET_KEYS.ZEROONEAI]: '01.AI',
9694 [SECRET_KEYS.HUGGINGFACE]: 'HuggingFace',
9795 [SECRET_KEYS.NANOGPT]: 'NanoGPT',
9896 [SECRET_KEYS.GENERIC]: 'Generic (OpenAI-compatible)',
@@ -143,7 +141,6 @@ const INPUT_MAP = {
143141 [SECRET_KEYS.PERPLEXITY]: '#api_key_perplexity',
144142 [SECRET_KEYS.GROQ]: '#api_key_groq',
145143 [SECRET_KEYS.FEATHERLESS]: '#api_key_featherless',
146- [SECRET_KEYS.ZEROONEAI]: '#api_key_01ai',
147144 [SECRET_KEYS.HUGGINGFACE]: '#api_key_huggingface',
148145 [SECRET_KEYS.NANOGPT]: '#api_key_nanogpt',
149146 [SECRET_KEYS.GENERIC]: '#api_key_generic',
public/scripts/slash-commands.js+0 -1
@@ -4801,7 +4801,6 @@ function getModelOptions(quiet) {
48014801 { id: 'model_perplexity_select', api: 'openai', type: chat_completion_sources.PERPLEXITY },
48024802 { id: 'model_groq_select', api: 'openai', type: chat_completion_sources.GROQ },
48034803 { id: 'model_nanogpt_select', api: 'openai', type: chat_completion_sources.NANOGPT },
4804- { id: 'model_01ai_select', api: 'openai', type: chat_completion_sources.ZEROONEAI },
48054804 { id: 'model_deepseek_select', api: 'openai', type: chat_completion_sources.DEEPSEEK },
48064805 { id: 'model_aimlapi_select', api: 'openai', type: chat_completion_sources.AIMLAPI },
48074806 { id: 'model_xai_select', api: 'openai', type: chat_completion_sources.XAI },
public/scripts/tokenizers.js+0 -4
@@ -708,10 +708,6 @@ export function getTokenizerModel() {
708708 }
709709 }
710710
711- if (oai_settings.chat_completion_source === chat_completion_sources.ZEROONEAI) {
712- return yiTokenizer;
713- }
714-
715711 // Default to Turbo 3.5
716712 return turboTokenizer;
717713}
src/constants.js+0 -1
@@ -173,7 +173,6 @@ export const CHAT_COMPLETION_SOURCES = {
173173 COHERE: 'cohere',
174174 PERPLEXITY: 'perplexity',
175175 GROQ: 'groq',
176- ZEROONEAI: '01ai',
177176 NANOGPT: 'nanogpt',
178177 DEEPSEEK: 'deepseek',
179178 AIMLAPI: 'aimlapi',
src/endpoints/backends/chat-completions.js+0 -10
@@ -59,7 +59,6 @@ const API_PERPLEXITY = 'https://api.perplexity.ai';
5959const API_GROQ = 'https://api.groq.com/openai/v1';
6060const API_MAKERSUITE = 'https://generativelanguage.googleapis.com';
6161const API_VERTEX_AI = 'https://us-central1-aiplatform.googleapis.com';
62-const API_01AI = 'https://api.lingyiwanwu.com/v1';
6362const API_AI21 = 'https://api.ai21.com/studio/v1';
6463const API_NANOGPT = 'https://nano-gpt.com/api/v1';
6564const API_DEEPSEEK = 'https://api.deepseek.com/beta';
@@ -1197,10 +1196,6 @@ router.post('/status', async function (request, statusResponse) {
11971196 apiUrl = API_COHERE_V1;
11981197 apiKey = readSecret(request.user.directories, SECRET_KEYS.COHERE);
11991198 headers = {};
1200- } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.ZEROONEAI) {
1201- apiUrl = API_01AI;
1202- apiKey = readSecret(request.user.directories, SECRET_KEYS.ZEROONEAI);
1203- headers = {};
12041199 } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.NANOGPT) {
12051200 apiUrl = API_NANOGPT;
12061201 apiKey = readSecret(request.user.directories, SECRET_KEYS.NANOGPT);
@@ -1591,11 +1586,6 @@ router.post('/generate', function (request, response) {
15911586 if (request.body.enable_web_search && !/:online$/.test(request.body.model)) {
15921587 request.body.model = `${request.body.model}:online`;
15931588 }
1594- } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.ZEROONEAI) {
1595- apiUrl = API_01AI;
1596- apiKey = readSecret(request.user.directories, SECRET_KEYS.ZEROONEAI);
1597- headers = {};
1598- bodyParams = {};
15991589 } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.POLLINATIONS) {
16001590 apiUrl = API_POLLINATIONS;
16011591 apiKey = 'NONE';
src/endpoints/openai.js+0 -8
@@ -61,10 +61,6 @@ router.post('/caption-image', async (request, response) => {
6161 key = readSecret(request.user.directories, SECRET_KEYS.VLLM);
6262 }
6363
64- if (request.body.api === 'zerooneai') {
65- key = readSecret(request.user.directories, SECRET_KEYS.ZEROONEAI);
66- }
67-
6864 if (request.body.api === 'aimlapi') {
6965 key = readSecret(request.user.directories, SECRET_KEYS.AIMLAPI);
7066 }
@@ -128,10 +124,6 @@ router.post('/caption-image', async (request, response) => {
128124 apiUrl = `${request.body.server_url}/chat/completions`;
129125 }
130126
131- if (request.body.api === 'zerooneai') {
132- apiUrl = 'https://api.lingyiwanwu.com/v1/chat/completions';
133- }
134-
135127 if (request.body.api === 'aimlapi') {
136128 apiUrl = 'https://api.aimlapi.com/v1/chat/completions';
137129 Object.assign(headers, AIMLAPI_HEADERS);
src/endpoints/secrets.js+0 -1
@@ -41,7 +41,6 @@ export const SECRET_KEYS = {
4141 GROQ: 'api_key_groq',
4242 AZURE_TTS: 'api_key_azure_tts',
4343 FEATHERLESS: 'api_key_featherless',
44- ZEROONEAI: 'api_key_01ai',
4544 HUGGINGFACE: 'api_key_huggingface',
4645 STABILITY: 'api_key_stability',
4746 CUSTOM_OPENAI_TTS: 'api_key_custom_openai_tts',