fix: remove unavailable Cohere models and fix xAI Grok param support

- Remove 5 Cohere chat models (not available in us-ashburn-1)
- Remove 9 legacy Cohere embedding models (v3.0), keep embed-v4.0
- Update default embedding model to cohere.embed-v4.0
- Skip presence_penalty, frequency_penalty, top_k for xAI models
- Remove Cohere from chat provider order in frontend
This commit is contained in:
nogueiraguh
2026-03-04 13:53:57 -03:00
parent 904d5c4cd7
commit 2071fa037a
2 changed files with 15 additions and 36 deletions

View File

@@ -284,7 +284,7 @@ function rChat(){
'openai.gpt-oss-120b','openai.gpt-oss-20b',
'openai.gpt-5.2-pro','openai.gpt-5.2-pro-2025-12-11']);
const provs={};for(const[mid,info]of Object.entries(S.models)){if(skip.has(mid))continue;const p=info.provider||'other';if(!provs[p])provs[p]=[];provs[p].push({id:mid,name:info.name})}
const provOrder=['openai','google','meta','cohere','xai'];
const provOrder=['openai','google','meta','xai'];
let ddItems=`<div class="itm${!S.chatModel?' sel':''}" onclick="pickModel('')">Agente Local (sem IA)</div>`;
if(S.genaiCfg.length){ddItems+=`<div class="grp">Configs Salvas</div>`;S.genaiCfg.forEach(g=>{const mi=S.models[g.model_id];ddItems+=`<div class="itm${S.chatModel==='cfg:'+g.id?' sel':''}" onclick="pickModel('cfg:${g.id}')">${g.name||mi?.name||g.model_id} (${g.genai_region})</div>`})}
provOrder.filter(p=>provs[p]).forEach(p=>{ddItems+=`<div class="grp">${p.charAt(0).toUpperCase()+p.slice(1)}</div>`;provs[p].forEach(m=>{ddItems+=`<div class="itm${S.chatModel===m.id?' sel':''}" onclick="pickModel('${m.id}')">${m.name}</div>`})});
@@ -603,7 +603,7 @@ async function sAdb(){const btn=document.getElementById('abtn');btn.disabled=tru
fd.append('password',document.getElementById('apw').value);fd.append('wallet_password',document.getElementById('awpw').value||'');
fd.append('table_name',document.getElementById('atbl').value);fd.append('use_mtls','true');
fd.append('genai_config_id',document.getElementById('agcfg').value||'');
fd.append('embedding_model_id',document.getElementById('aemb').value||'cohere.embed-multilingual-v3.0');
fd.append('embedding_model_id',document.getElementById('aemb').value||'cohere.embed-v4.0');
const wf=document.getElementById('awf').files[0];if(wf)fd.append('wallet',wf);
const url=isEdit?'/adb/configs/'+S.editing.id:'/adb/config';const method=isEdit?'PUT':'POST';
await $api(url,{method,body:fd,headers:{}});S.editing=null;