MCPcopy Create free account

hub / github.com/QuantumNous/new-api / functions

Functions10,602 in github.com/QuantumNous/new-api

↓ 6 callersMethodGetTools
GetTools 获取工具列表
dto/claude.go:402
↓ 6 callersMethodGetUsageMetadata
()
dto/gemini.go:490
↓ 6 callersFunctionGetUserUsableGroups
(userGroup string)
service/group.go:10
↓ 6 callersFunctionHeaderNavModuleAuth
(module string)
middleware/header_nav.go:104
↓ 6 callersFunctionHeaderNavModulePublicOrUserAuth
(module string)
middleware/header_nav.go:125
↓ 6 callersMethodInsert
()
model/topup.go:50
↓ 6 callersFunctionInvalidatePricingCache
()
model/pricing.go:80
↓ 6 callersMethodMatchPathForModel
MatchPathForModel returns the first route whose IncomingPath and Models match. An empty Models list is a catch-all fallback for that incoming path.
dto/channel_settings.go:132
↓ 6 callersFunctionMidjourneyErrorWrapper
(code int, desc string)
service/error.go:20
↓ 6 callersFunctionOpenaiHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay-openai.go:190
↓ 6 callersFunctionQuotaRound
QuotaRound converts a float64 quota value to int using half-away-from-zero rounding with int32 saturation. Every tiered billing path (pre-consume, set
pkg/billingexpr/round.go:12
↓ 6 callersMethodRead
(p []byte)
common/body_storage.go:169
↓ 6 callersFunctionReloadPolicy
()
service/authz/enforcer.go:69
↓ 6 callersFunctionRemoveDisabledFields
RemoveDisabledFields 从请求 JSON 数据中移除渠道设置中禁用的字段 service_tier: 服务层级字段,可能导致额外计费(OpenAI、Claude、Responses API 支持) inference_geo: Claude 数据驻留推理区域字段(仅 Claude
relay/common/relay_info.go:798
↓ 6 callersFunctionSanitizeURLForLog
(rawURL string)
relay/common/relay_utils.go:40
↓ 6 callersFunctionSetDatabaseTypes
(mainType DatabaseType, logType DatabaseType)
common/database.go:31
↓ 6 callersMethodSetOtherSettings
(setting dto.ChannelOtherSettings)
model/channel.go:1003
↓ 6 callersMethodSetupRequestHeader
(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo)
relay/channel/adapter.go:19
↓ 6 callersFunctionShouldPreserveThinkingSuffix
ShouldPreserveThinkingSuffix 判断模型是否配置为保留 thinking/-nothinking/-low/-high/-medium 后缀
setting/model_setting/global.go:67
↓ 6 callersMethodSize
Size 获取数据大小
common/body_storage.go:20
↓ 6 callersMethodSource
Source 返回资金来源标识:"wallet" 或 "subscription"
service/funding_source.go:16
↓ 6 callersFunctionUnmarshalMetadata
UnmarshalMetadata converts a map[string]any metadata to a typed struct via JSON round-trip. This replaces the repeated pattern: json.Marshal(metadata)
relay/channel/task/taskcommon/helpers.go:16
↓ 6 callersMethodUpdate
Update 更新2FA设置
model/twofa.go:89
↓ 6 callersFunctionUpdateUserGroupCache
(userId int, group string)
model/user_cache.go:234
↓ 6 callersFunctionUpdateVideoTasks
UpdateVideoTasks 按渠道更新所有视频任务
service/task_polling.go:342
↓ 6 callersFunctionUsageFromChatUsage
(src *dto.Usage)
service/relayconvert/response_compat.go:91
↓ 6 callersMethodValidateNetworkTarget
ValidateNetworkTarget validates the host and port before dialing.
common/ssrf_protection.go:290
↓ 6 callersFunctionaddNewRecord
(type_ int, id int, value int)
model/utils.go:42
↓ 6 callersFunctioncurrentEnforcer
()
service/authz/enforcer.go:63
↓ 6 callersFunctionfetchLogs
( endpoint: string, params: T, isAdmin: boolean )
web/default/src/features/usage-logs/api.ts:40
↓ 6 callersFunctionfetchStatus
()
web/classic/src/components/settings/personal/components/TwoFASetting.jsx:68
↓ 6 callersFunctionformatNumber
( value: number | null | undefined, locales?: Intl.LocalesArgument )
web/default/src/lib/format.ts:31
↓ 6 callersFunctionformatNumber
(value)
web/classic/src/pages/Setting/Ratio/hooks/useModelPricingEditorState.js:78
↓ 6 callersFunctionformatTokens
(value: number)
web/default/src/features/rankings/lib/format.ts:24
↓ 6 callersFunctionformatUptimePct
(pct: number)
web/default/src/features/performance-metrics/lib/format.ts:31
↓ 6 callersFunctiongetCookie
(name: string)
web/default/src/lib/cookies.ts:29
↓ 6 callersFunctiongetCurrentVersion
(message: Message)
web/default/src/features/playground/lib/message/message-utils.ts:42
↓ 6 callersFunctiongetSessionUser
(c *gin.Context)
controller/passkey.go:511
↓ 6 callersFunctiongetSuccessRateTextClass
(rate: number)
web/default/src/features/performance-metrics/lib/format.ts:88
↓ 6 callersFunctionhandleClose
()
web/default/src/features/channels/components/dialogs/edit-tag-dialog.tsx:213
↓ 6 callersFunctionhashStringToSeed
(input: string)
web/default/src/features/pricing/lib/seed.ts:30
↓ 6 callersFunctionisValidOtherRatio
(ratio float64)
types/price_data.go:106
↓ 6 callersFunctionloadModels
( page = 1, size = pageSize, vendorKey = activeVendorKey, )
web/classic/src/hooks/models/useModelsData.jsx:123
↓ 6 callersFunctionloadUsers
(startIdx, pageSize)
web/classic/src/hooks/users/useUsersData.jsx:73
↓ 6 callersFunctionmergeFormValues
(newValues)
web/classic/src/components/settings/CustomOAuthSetting.jsx:206
↓ 6 callersFunctionnewFakeSMTPServerWithSTARTTLSAdvertisement
(t *testing.T, advertiseSTARTTLS bool)
common/email_test.go:39
↓ 6 callersFunctionnormalizeJsonString
(value: string)
web/default/src/features/system-settings/models/utils.ts:32
↓ 6 callersFunctionnormalizeModelName
(model: string)
web/default/src/features/channels/lib/model-mapping-validation.ts:45
↓ 6 callersFunctionnoteQuotaClamp
noteQuotaClamp records the first quota saturation event onto relayInfo so it can later be attached to the consume/task log for admin auditing. First n
service/text_quota.go:144
↓ 6 callersFunctionparseLogOther
(other: string)
web/default/src/features/usage-logs/lib/format.ts:98
↓ 6 callersFunctionparseTags
(tagsString?: string)
web/default/src/features/pricing/lib/filters.ts:163
↓ 6 callersFunctionpricingEndpointAdvancedCustomConfig
(routes ...dto.AdvancedCustomRoute)
model/pricing_endpoint_test.go:59
↓ 6 callersFunctionpricingEndpointTypesByModel
(t *testing.T)
model/pricing_endpoint_test.go:67
↓ 6 callersFunctionrenderNumber
(num)
web/classic/src/helpers/render.jsx:985
↓ 6 callersFunctionrequestContextDone
(c *gin.Context)
relay/helper/common.go:41
↓ 6 callersFunctionresetSessionCookieSettingsAfterTest
(t *testing.T)
common/url_validator_test.go:125
↓ 6 callersFunctionresponsesStreamEvent
(eventType string, payload dto.ResponsesStreamResponse)
service/relayconvert/internal/oai_chat/to_oai_responses_resp.go:222
↓ 6 callersFunctionsearchChannels
( enableTagMode, typeKey = activeTypeKey, statusF = statusFilter, page = 1, pageSz = pageS
web/classic/src/hooks/channels/useChannelsData.jsx:376
↓ 6 callersFunctionseededRandom
(seed: number)
web/default/src/features/pricing/lib/seed.ts:39
↓ 6 callersFunctionsetCookie
( name: string, value: string, maxAge: number = DEFAULT_MAX_AGE )
web/default/src/lib/cookies.ts:44
↓ 6 callersFunctionsetupTokenControllerTestDB
(t *testing.T)
controller/token_test.go:107
↓ 6 callersFunctionstreamValuesFromAny
(value any)
service/relayconvert/response_registry.go:620
↓ 6 callersFunctionstringifyAdvancedCustomConfig
( config: AdvancedCustomConfig )
web/default/src/features/channels/lib/advanced-custom.ts:480
↓ 6 callersFunctiontoIntlLocale
(value?: string | null)
web/default/src/i18n/languages.ts:82
↓ 6 callersFunctiontoNumberOrNull
(value)
web/classic/src/pages/Setting/Ratio/hooks/useModelPricingEditorState.js:70
↓ 6 callersFunctionupdateCurrentVersionContent
( message: Message, content: string )
web/default/src/features/playground/lib/message/message-utils.ts:63
↓ 6 callersFunctionuseChartTheme
()
web/default/src/lib/use-chart-theme.ts:32
↓ 6 callersFunctionuseDialogState
( initialState: T | null = null )
web/default/src/hooks/use-dialog.ts:97
↓ 6 callersFunctionuseOpenInContext
()
web/default/src/components/ai-elements/open-in-chat.tsx:206
↓ 6 callersFunctionuseRedemptions
()
web/default/src/features/redemption-codes/components/redemptions-provider.tsx:66
↓ 6 callersFunctionuseResetForm
( form: UseFormReturn<TFieldValues>, values: DefaultValues<TFieldValues> | undefined )
web/default/src/features/system-settings/hooks/use-reset-form.ts:27
↓ 6 callersFunctionuseUsers
()
web/default/src/features/users/components/users-provider.tsx:60
↓ 5 callersMethodApply
(query *gorm.DB)
model/channel.go:104
↓ 5 callersFunctionApplyChannelAffinityOverrideTemplate
ApplyChannelAffinityOverrideTemplate merges per-rule channel override templates onto the selected channel override config.
service/channel_affinity.go:533
↓ 5 callersMethodConvertOpenAIResponsesRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.OpenAIResponsesRequest)
relay/channel/adapter.go:25
↓ 5 callersFunctionConvertRequestByID
(c *gin.Context, info *relaycommon.RelayInfo, converter string, request any)
service/relayconvert/request_registry.go:214
↓ 5 callersFunctionConvertStreamResponseChunk
(c *gin.Context, info *relaycommon.RelayInfo, state *ResponseStreamState, response any)
service/relayconvert/response_registry.go:299
↓ 5 callersFunctionCountTextToken
CountTextToken 统计文本的token数量,仅OpenAI模型使用tokenizer,其余模型使用估算
service/token_counter.go:402
↓ 5 callersMethodDelete
()
model/channel.go:595
↓ 5 callersFunctionEnableWorker
()
setting/system_setting/system_setting_old.go:8
↓ 5 callersFunctionFinalizeStreamResponse
(c *gin.Context, info *relaycommon.RelayInfo, state *ResponseStreamState)
service/relayconvert/response_registry.go:324
↓ 5 callersFunctionGenerateTextOtherInfo
(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, modelRatio, groupRatio, completionRatio float64, cacheTo
service/log_info_generate.go:71
↓ 5 callersFunctionGetAudioCompletionRatio
(name string)
setting/ratio_setting/model_ratio.go:631
↓ 5 callersFunctionGetAudioRatio
(name string)
setting/ratio_setting/model_ratio.go:623
↓ 5 callersFunctionGetByTaskId
(userId int, taskId string)
model/task.go:347
↓ 5 callersMethodGetCacheCreation1hTokens
()
dto/claude.go:582
↓ 5 callersMethodGetCacheCreation5mTokens
()
dto/claude.go:575
↓ 5 callersFunctionGetCompletionRatio
(name string)
setting/ratio_setting/model_ratio.go:436
↓ 5 callersFunctionGetConsoleSetting
GetConsoleSetting 获取 ConsoleSetting 配置实例
setting/console_setting/config.go:37
↓ 5 callersFunctionGetDiskCacheDir
GetDiskCacheDir 获取统一的磁盘缓存目录 注意:每次调用都会重新计算,以响应配置变化
common/disk_cache.go:25
↓ 5 callersFunctionGetDiskCachePath
GetDiskCachePath 获取磁盘缓存目录
common/disk_cache_config.go:65
↓ 5 callersFunctionGetEpayClient
()
controller/topup.go:135
↓ 5 callersFunctionGetGroupGroupRatio
(userGroup, usingGroup string)
setting/ratio_setting/group_ratio.go:88
↓ 5 callersMethodGetKeys
()
model/channel.go:175
↓ 5 callersMethodGetMaskedKey
()
model/token.go:55
↓ 5 callersFunctionGetModelPrice
GetModelPrice 返回模型的价格,如果模型不存在则返回-1,false
setting/ratio_setting/model_ratio.go:360
↓ 5 callersMethodGetModels
()
model/channel.go:289
↓ 5 callersFunctionGetMonitorSetting
()
setting/operation_setting/monitor_setting.go:33
↓ 5 callersFunctionGetOIDCSettings
()
setting/system_setting/oidc.go:23
↓ 5 callersMethodGetPage
()
common/page_info.go:29
← previousnext →401–500 of 10,602, ranked by callers