fix: refresh upstream catalog facts without invalidating saved credentials
This commit is contained in:
@@ -37,10 +37,10 @@ export function catalogModel(item, config = {}) {
|
||||
const efforts = ['minimal', 'low', 'medium', 'high', 'xhigh', 'max'].filter(value => supported(caps.effort?.[value]) === 'supported');
|
||||
const modes = ['disabled', 'enabled', 'adaptive'].filter(value => supported(caps.thinking?.types?.[value]) === 'supported');
|
||||
const features = Object.fromEntries(['thinking', 'effort', 'pdf_input', 'structured_outputs', 'server_tools', 'code_execution', 'batch', 'citations', 'context_management'].map(key => [key, supported(caps[key])]));
|
||||
return { id, name: field(item.display_name ?? item.name ?? id), owner: field(item.owned_by ?? item.provider, 100),
|
||||
return { id, name: field(item.display_name ?? item.displayName ?? item.name ?? id), owner: field(item.owned_by ?? item.provider, 100),
|
||||
lifecycle: ['active', 'deprecated', 'retired'].includes(item.lifecycle) ? item.lifecycle : null,
|
||||
contextLimit: positive(item.context_length ?? item.max_input_tokens ?? item.context_window),
|
||||
maxOutputTokens: positive(item.max_output_tokens ?? item.max_tokens ?? item.top_provider?.max_completion_tokens),
|
||||
contextLimit: positive(item.context_length ?? item.max_input_tokens ?? item.context_window ?? item.inputTokenLimit),
|
||||
maxOutputTokens: positive(item.max_output_tokens ?? item.max_tokens ?? item.top_provider?.max_completion_tokens ?? item.outputTokenLimit),
|
||||
capabilityDeclarations: declarations, features, efforts, modes, parameters,
|
||||
metadataSource: 'upstream-model-list' };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user