mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-11 06:30:21 +00:00
feat: configurable tool pricing, Sub2API channel, and alpha search billing
Add admin-configurable tool-call prices with cross-provider surcharge settlement, Sub2API channel support, /v1/alpha/search relay, and usage-log surcharge UI.
This commit is contained in:
@@ -26,6 +26,13 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
* - Size parameter: getLobeIcon("OpenAI", 20)
|
||||
*/
|
||||
import * as LobeIcons from '@lobehub/icons'
|
||||
import type React from 'react'
|
||||
|
||||
import { IconSub2api } from '@/assets/custom/icon-sub2api'
|
||||
|
||||
const CUSTOM_ICONS: Record<string, React.ComponentType<{ size?: number }>> = {
|
||||
Sub2API: IconSub2api,
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a property value from string to appropriate type
|
||||
@@ -102,6 +109,10 @@ export function getLobeIcon(
|
||||
// Parse component path and chained properties
|
||||
const segments = trimmedName.split('.')
|
||||
const baseKey = segments[0]
|
||||
const CustomIcon = CUSTOM_ICONS[baseKey]
|
||||
if (CustomIcon) {
|
||||
return <CustomIcon size={size} />
|
||||
}
|
||||
const BaseIcon = (LobeIcons as Record<string, unknown>)[baseKey] as
|
||||
| Record<string, unknown>
|
||||
| undefined
|
||||
|
||||
Reference in New Issue
Block a user