MCPcopy Create free account

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

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

↓ 6 callersMethodResolvedPin
ResolvedPin returns the winning pin after priority resolution. Lowest Rank wins. Pins that name the same channel are merged (stricter RetryMode). over
dto/channel_constraints.go:72
↓ 6 callersFunctionSanitizeURLForLog
(rawURL string)
relay/common/relay_utils.go:40
↓ 6 callersFunctionSettleMidjourneyTaskBilling
SettleMidjourneyTaskBilling charges a persisted legacy task and records the applied stages.
service/midjourney.go:64
↓ 6 callersMethodSetupRequestHeader
(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo)
relay/channel/adapter.go:21
↓ 6 callersFunctionTaskErrorWrapper
(err error, code string, statusCode int)
service/error.go:200
↓ 6 callersMethodToBaseUser
()
model/user.go:115
↓ 6 callersFunctionUpdateAutoGroupsByJsonString
(jsonString string)
setting/auto_group.go:34
↓ 6 callersFunctionUpdateConfigFromMap
UpdateConfigFromMap 从map更新配置对象(导出函数)
setting/config/config.go:281
↓ 6 callersFunctionUpdateGroupRatioByJSONString
(jsonStr string)
setting/ratio_setting/group_ratio.go:75
↓ 6 callersFunctionUpdateOption
(c *gin.Context)
controller/option.go:128
↓ 6 callersFunctionUpdateVideoTasks
UpdateVideoTasks 按渠道更新所有视频任务
service/task_polling.go:340
↓ 6 callersFunctionUpstreamModelName
UpstreamModelName / ChannelTypeOf are nil-safe accessors for optional Meta values (converters are often called with a nil Meta in tests and compat shi
relaykit/relayconvert/convmeta/meta.go:195
↓ 6 callersFunctionUsageFromChatUsage
(src *dto.Usage)
relaykit/relayconvert/response_compat.go:91
↓ 6 callersMethodValidateNetworkTarget
ValidateNetworkTarget validates the host and port before dialing.
common/ssrf_protection.go:290
↓ 6 callersFunctionValidateWalletQuota
ValidateWalletQuota enforces the upper bound shared by wallet mutations. Negative balances remain valid because billing can temporarily overdraw a wal
common/quota_math.go:22
↓ 6 callersMethodacquire
( pluginKey string, userID int, tokenID int, )
controller/plugin_protocol_limiter.go:65
↓ 6 callersFunctionapplyOriginTaskIntent
(c *gin.Context, intent map[string]any, meta pluginruntime.Meta)
middleware/task_plugin.go:1022
↓ 6 callersFunctionclearAuthentication
( synchronizeTabs = true, bootstrapState: AuthBootstrapState = 'complete' )
web/src/lib/auth-session.ts:185
↓ 6 callersFunctioncombineBillingExpr
( baseExpr: string, requestRuleExpr: string )
web/src/features/pricing/lib/billing-expr.ts:933
↓ 6 callersFunctionconvert
(value any, target any)
relay/channel/task/jsplugin/adaptor.go:1388
↓ 6 callersFunctioncreateEpayTestOrder
(t *testing.T, userId int, tradeNo string, provider string, status string)
model/payment_method_guard_test.go:177
↓ 6 callersFunctioncreateOAuthFlow
( provider: string, intent: 'login' | 'bind' )
web/src/features/auth/api.ts:167
↓ 6 callersFunctionfetchLogs
( endpoint: string, params: T, isAdmin: boolean )
web/src/features/usage-logs/api.ts:42
↓ 6 callersFunctionformatBillingCurrencyFromUSD
( amountUSD: number | null | undefined, options?: CurrencyFormatOptions )
web/src/lib/currency.ts:471
↓ 6 callersFunctionformatNumber
( value: number | null | undefined, locales?: Intl.LocalesArgument )
web/src/lib/format.ts:32
↓ 6 callersFunctionformatPricingNumber
(value: unknown)
web/src/features/system-settings/models/pricing-format.ts:55
↓ 6 callersFunctionformatTokens
(value: number)
web/src/features/rankings/lib/format.ts:24
↓ 6 callersFunctionformatUptimePct
(pct: number)
web/src/features/performance-metrics/lib/format.ts:31
↓ 6 callersFunctiongetAuthenticatedUser
(c *gin.Context)
controller/passkey.go:654
↓ 6 callersFunctiongetCookie
(name: string)
web/src/lib/cookies.ts:29
↓ 6 callersFunctiongetCurrentVersion
(message: Message)
web/src/features/playground/lib/message/message-utils.ts:42
↓ 6 callersFunctiongetRouteIncomingPath
(route: AdvancedCustomRoute)
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:163
↓ 6 callersFunctiongetSuccessRateTextClass
(rate: number)
web/src/features/performance-metrics/lib/format.ts:88
↓ 6 callersFunctionhandleLoginSuccess
( bundle: AuthBundle, redirectTo?: string )
web/src/features/auth/hooks/use-auth-redirect.ts:40
↓ 6 callersFunctionhasTaskUsageSchema
(model: PricingModel)
web/src/features/pricing/lib/dynamic-price.ts:134
↓ 6 callersFunctionhashStringToSeed
(input: string)
web/src/features/pricing/lib/seed.ts:30
↓ 6 callersFunctioninitDefaultHTTPClientFixture
(t *testing.T)
service/http_client_transport_test.go:36
↓ 6 callersFunctionisApiSuccess
(response: ApiResponse)
web/src/features/wallet/api.ts:51
↓ 6 callersFunctionisTokenBasedModel
(model: PricingModel)
web/src/features/pricing/lib/model-helpers.ts:107
↓ 6 callersFunctionisValidOtherRatio
(ratio float64)
types/price_data.go:106
↓ 6 callersFunctionmustStreamChunks
(t *testing.T, state *ResponsesToChatStreamState, event *dto.ResponsesStreamResponse)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp_test.go:443
↓ 6 callersFunctionmustUnmarshalFixture
(raw string, out any)
relaykit/relayconvert/golden_test.go:471
↓ 6 callersFunctionnewAdvancedCustomModelListChannel
(baseURL string, key string, upstreamPath string, auth *dto.AdvancedCustomRouteAuth)
controller/channel_upstream_update_test.go:20
↓ 6 callersFunctionnewAuthenticatedContext
(t *testing.T, method string, target string, body any, userID int)
controller/token_test.go:184
↓ 6 callersFunctionnewClientIPRouter
()
middleware/trusted_proxies_test.go:24
↓ 6 callersFunctionnewFakeSMTPServerWithSTARTTLSAdvertisement
(t *testing.T, advertiseSTARTTLS bool)
common/email_test.go:39
↓ 6 callersFunctionnormalizeJsonString
(value: string)
web/src/features/system-settings/models/utils.ts:32
↓ 6 callersFunctionnormalizeModelName
(model: string)
web/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:194
↓ 6 callersFunctionparseLogOther
(other: string)
web/src/features/usage-logs/lib/format.ts:159
↓ 6 callersFunctionparseTags
(tagsString?: string)
web/src/features/pricing/lib/filters.ts:170
↓ 6 callersFunctionparseTaskTiersFromExpr
( exprStr: string, schema: BillingUsageSchema | null | undefined )
web/src/features/pricing/lib/billing-expr.ts:555
↓ 6 callersFunctionpaymentReturnPath
(suffix string)
controller/return_path.go:9
↓ 6 callersFunctionpluginMapKeys
(plugins map[string]*LoadedPlugin)
pkg/jsplugin/registry.go:913
↓ 6 callersFunctionpricingEndpointAdvancedCustomConfig
(routes ...dto.AdvancedCustomRoute)
model/pricing_endpoint_test.go:59
↓ 6 callersFunctionpricingEndpointTypesByModel
(t *testing.T)
model/pricing_endpoint_test.go:67
↓ 6 callersFunctionproxyTaskMedia
(c *gin.Context, task *model.Task, descriptor *relaychannel.TaskContentRequest)
controller/video_proxy.go:132
↓ 6 callersFunctionredisFixedWindowTake
(ctx context.Context, key string, maxRequestNum int, duration int64)
middleware/rate-limit.go:65
↓ 6 callersFunctionrefreshSubscriptionUserGroupCache
(userId int, operation string)
model/subscription.go:560
↓ 6 callersFunctionrejectInvalidTopUpQuota
(c *gin.Context, userId int, amount int64)
controller/topup.go:258
↓ 6 callersFunctionrequestContextDone
(c *gin.Context)
relay/helper/common.go:41
↓ 6 callersFunctionrequireOptionValue
(t *testing.T, db *gorm.DB, key string)
model/frontend_option_migration_test.go:30
↓ 6 callersFunctionresetSession
()
web/src/features/auth/hooks/use-oauth-login.ts:62
↓ 6 callersFunctionresponsesStreamEvent
(eventType string, payload dto.ResponsesStreamResponse)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp.go:222
↓ 6 callersFunctionseedPollingTask
(t *testing.T, channelID int, publicID string, upstreamID string)
service/task_polling_test.go:172
↓ 6 callersFunctionseedToken
(t *testing.T, db *gorm.DB, userID int, name string, rawKey string)
controller/token_test.go:163
↓ 6 callersFunctionseededRandom
(seed: number)
web/src/features/pricing/lib/seed.ts:39
↓ 6 callersFunctionsetCookie
( name: string, value: string, maxAge: number = DEFAULT_MAX_AGE )
web/src/lib/cookies.ts:44
↓ 6 callersFunctiontaskBillingOther
taskBillingOther 从 task 的 BillingContext 构建日志 Other 字段。
service/task_billing.go:137
↓ 6 callersFunctiontasksToDto
(tasks []*model.Task, fillUser bool, viewerRole int)
controller/task.go:397
↓ 6 callersFunctiontoIntlLocale
(value?: string | null)
web/src/i18n/languages.ts:86
↓ 6 callersFunctiontrimmed
(value)
plugins/tasks/sunoapi/plugin.js:33
↓ 6 callersFunctionupdateCurrentVersionContent
( message: Message, content: string )
web/src/features/playground/lib/message/message-utils.ts:63
↓ 6 callersFunctionupdateOptionMap
(key string, value string)
model/option.go:288
↓ 6 callersFunctionuseChartTheme
()
web/src/lib/use-chart-theme.ts:32
↓ 6 callersFunctionuseDialogState
( initialState: T | null = null )
web/src/hooks/use-dialog.ts:97
↓ 6 callersFunctionuseFrontendOptionMigrationDB
(t *testing.T)
model/frontend_option_migration_test.go:14
↓ 6 callersFunctionuseOpenInContext
()
web/src/components/ai-elements/open-in-chat.tsx:206
↓ 6 callersFunctionuseRedemptions
()
web/src/features/redemption-codes/components/redemptions-provider.tsx:66
↓ 6 callersFunctionuseResetForm
( form: UseFormReturn<TFieldValues>, values: DefaultValues<TFieldValues> | undefined )
web/src/features/system-settings/hooks/use-reset-form.ts:27
↓ 6 callersFunctionuseUsers
()
web/src/features/users/components/users-provider.tsx:60
↓ 6 callersFunctionuserSessionCacheDeadline
()
model/user_session.go:129
↓ 6 callersFunctionvalidateChannel
validateChannel 通用的渠道校验函数
controller/channel.go:475
↓ 6 callersFunctionwithRelayHTTPTransportSettings
(t *testing.T)
service/http_client_transport_test.go:21
↓ 6 callersFunctionwriteTaskArtifactError
(c *gin.Context, status int, code, message string)
controller/task.go:259
↓ 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 callersFunctionAutoGroups2JsonString
()
setting/auto_group.go:39
↓ 5 callersMethodBuildContentRequest
(task *model.Task, artifactKey string, clientRequest TaskArtifactClientRequest)
relay/channel/adapter.go:116
↓ 5 callersMethodCallMember
CallMember invokes a function stored on an exported object, such as a renderer in the renderers export.
pkg/jsplugin/engine.go:307
↓ 5 callersMethodCallPathWithAdmissionTimeout
CallPathWithAdmissionTimeout gives long-lived observers a separate bound for waiting on JavaScript capacity. Once admitted, the hook receives the engi
pkg/jsplugin/engine.go:321
↓ 5 callersFunctionCapabilities
Capabilities returns the full resource/action matrix the subject is allowed.
service/authz/resolver.go:38
↓ 5 callersFunctionChatCompletionsRequestToResponsesRequest
(req *dto.GeneralOpenAIRequest)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_req.go:76
↓ 5 callersFunctionCommonClaudeHeadersOperation
(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo)
relay/channel/claude/adaptor.go:74
↓ 5 callersFunctionCompileFromCache
CompileFromCache compiles an expression string, using a cached program when available. The cache is keyed by the SHA-256 hex digest of the expression.
pkg/billingexpr/compile.go:164
↓ 5 callersFunctionComputeTieredQuotaWithRequest
(snap *BillingSnapshot, params TokenParams, request RequestInput)
pkg/billingexpr/settle.go:24
↓ 5 callersMethodConvertImageRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.ImageRequest)
relay/channel/adapter.go:26
↓ 5 callersMethodConvertOpenAIResponsesRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.OpenAIResponsesRequest)
relay/channel/adapter.go:27
↓ 5 callersFunctionConvertRequestByID
(c context.Context, info convmeta.Meta, converter string, request any)
relaykit/relayconvert/request_registry.go:214
↓ 5 callersFunctionConvertStreamResponse
(c context.Context, info convmeta.Meta, target types.RelayFormat, response any)
relaykit/relayconvert/response_registry.go:247
← previousnext →601–700 of 10,934, ranked by callers