Remove freePlanModel and opencodeBackupModel settings
Users now use OpenCode Models (Fallback Chain) for model selection. - Removed Auto Model for Hobby/Free Plan section from admin panel - Removed OpenCode Ultimate Backup Model section from admin panel - Updated server to use opencodeModels for free plan users - Removed backup model fallback logic (opencodeModels chain handles this)
This commit is contained in:
@@ -3650,14 +3650,6 @@ function getBackupModel(currentModel) {
|
||||
const configuredModels = (state.models || []).map(normalize).filter(Boolean);
|
||||
const current = (currentModel || '').trim();
|
||||
|
||||
const preferredBackup = normalize(window.providerLimits?.opencodeBackupModel || '');
|
||||
|
||||
// If we have a preferred backup model, use it if it's different from current
|
||||
// Don't require it to be in configured models since OpenCode CLI can access models directly
|
||||
if (preferredBackup && preferredBackup !== current) {
|
||||
return preferredBackup;
|
||||
}
|
||||
|
||||
if (!configuredModels.length) return null;
|
||||
|
||||
// If current model is auto/default or not in list, pick the first configured model
|
||||
@@ -4829,15 +4821,8 @@ window.addEventListener('focus', () => {
|
||||
|
||||
async function loadProviderLimits() {
|
||||
try {
|
||||
const data = await api('/api/provider-limits');
|
||||
if (data?.opencodeBackupModel) {
|
||||
window.providerLimits = {
|
||||
opencodeBackupModel: data.opencodeBackupModel
|
||||
};
|
||||
console.log('[PROVIDER-LIMITS] Loaded backup model:', window.providerLimits.opencodeBackupModel);
|
||||
}
|
||||
await api('/api/provider-limits');
|
||||
} catch (err) {
|
||||
console.warn('[PROVIDER-LIMITS] Failed to load provider limits:', err);
|
||||
window.providerLimits = window.providerLimits || {};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user