feat: add OpenRouter pricing support to upstream ratio sync
This commit is contained in:
@@ -117,6 +117,7 @@ const ChannelSelectorModal = forwardRef(
|
||||
const getEndpointType = (ep) => {
|
||||
if (ep === '/api/ratio_config') return 'ratio_config';
|
||||
if (ep === '/api/pricing') return 'pricing';
|
||||
if (ep === 'openrouter') return 'openrouter';
|
||||
return 'custom';
|
||||
};
|
||||
|
||||
@@ -127,6 +128,8 @@ const ChannelSelectorModal = forwardRef(
|
||||
updateEndpoint(channelId, '/api/ratio_config');
|
||||
} else if (val === 'pricing') {
|
||||
updateEndpoint(channelId, '/api/pricing');
|
||||
} else if (val === 'openrouter') {
|
||||
updateEndpoint(channelId, 'openrouter');
|
||||
} else {
|
||||
if (currentType !== 'custom') {
|
||||
updateEndpoint(channelId, '');
|
||||
@@ -144,6 +147,7 @@ const ChannelSelectorModal = forwardRef(
|
||||
optionList={[
|
||||
{ label: 'ratio_config', value: 'ratio_config' },
|
||||
{ label: 'pricing', value: 'pricing' },
|
||||
{ label: 'OpenRouter', value: 'openrouter' },
|
||||
{ label: 'custom', value: 'custom' },
|
||||
]}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user