MCPcopy Create free account

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

Functions11,918 in github.com/QuantumNous/new-api

↓ 6 callersFunctionGetRequestAutoGroups
GetRequestAutoGroups resolves the ordered Auto groups for the current token. The absence of the context value means that the token inherits the comple
service/group.go:97
↓ 6 callersFunctionGetSubscriptionPlanById
(id int)
model/subscription.go:385
↓ 6 callersMethodGetTokenCountMeta
()
relaykit/dto/request_common.go:9
↓ 6 callersMethodGetTools
GetTools 获取工具列表
relaykit/dto/claude.go:420
↓ 6 callersFunctionGetTopupGroupRatio
(name string)
common/topup-ratio.go:32
↓ 6 callersFunctionGetUserAccessTokenStatus
(userId int)
model/audit_log.go:213
↓ 6 callersFunctionGetUsernameById
GetUsernameById gets username from Redis first, falls back to DB if needed
model/user.go:1496
↓ 6 callersFunctionGroupRatio2JSONString
()
setting/ratio_setting/group_ratio.go:71
↓ 6 callersFunctionHeaderNavModulePublicOrUserAuth
(module string)
middleware/header_nav.go:125
↓ 6 callersFunctionIncreaseTokenQuota
(tokenId int, key string, quota int)
model/token.go:377
↓ 6 callersFunctionInitDB
()
model/main.go:186
↓ 6 callersMethodInsert
()
model/topup.go:53
↓ 6 callersMethodInsert
()
model/midjourney.go:164
↓ 6 callersFunctionIssueSecurityProof
(identity AuthIdentity, method string, binding VerificationBinding)
service/auth_token.go:131
↓ 6 callersMethodListArtifacts
(task *model.Task)
relay/channel/adapter.go:105
↓ 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.
relaykit/dto/channel_settings.go:191
↓ 6 callersFunctionMidjourneyErrorWrapper
(code int, desc string)
service/error.go:21
↓ 6 callersFunctionMigrateRetiredFrontendOptions
MigrateRetiredFrontendOptions normalizes options that belonged to the removed dashboard frontend. Each legacy console setting is migrated in its own t
model/frontend_option_migration.go:20
↓ 6 callersFunctionNotifyAccountSecurityChange
NotifyAccountSecurityChange never includes credentials or tokens. The caller records delivery failure independently from the already-committed change.
service/account_security.go:34
↓ 6 callersFunctionOpenaiHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay-openai.go:241
↓ 6 callersMethodParseTaskResult
(task *model.Task, resp *http.Response, respBody []byte)
relay/channel/adapter.go:80
↓ 6 callersFunctionPrepareTieredBillingForSelectedGroup
PrepareTieredBillingForSelectedGroup refreshes routing-dependent billing state before an upstream attempt. An existing session reserves any higher est
service/tiered_settle.go:125
↓ 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 callersFunctionRemoveDisabledFields
RemoveDisabledFields 从请求 JSON 数据中移除渠道设置中禁用的字段 service_tier: 服务层级字段,可能导致额外计费(OpenAI、Claude、Responses API 支持) inference_geo: Claude 数据驻留推理区域字段(仅 Claude
relay/common/relay_info.go:1050
↓ 6 callersFunctionResolveTaskModelAlias
ResolveTaskModelAlias returns the mapping-derived alias target for name (exact or ASCII-folded). g is the caller's routing generation: a Number mismat
model/task_model_alias.go:38
↓ 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 callersFunctionResponseChunkData
(c *gin.Context, resp dto.ResponsesStreamResponse, data string)
relay/helper/common.go:87
↓ 6 callersFunctionSanitizeURLForLog
(rawURL string)
relay/common/relay_utils.go:40
↓ 6 callersFunctionSetMainDatabaseType
(databaseType DatabaseType)
common/database.go:23
↓ 6 callersMethodSetModelName
(modelName string)
relaykit/dto/request_common.go:11
↓ 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:117
↓ 6 callersFunctionUpdateAutoGroupsByJsonString
(jsonString string)
setting/auto_group.go:34
↓ 6 callersFunctionUpdateGroupRatioByJSONString
(jsonStr string)
setting/ratio_setting/group_ratio.go:75
↓ 6 callersFunctionUpdateOption
(c *gin.Context)
controller/option.go:139
↓ 6 callersFunctionUpdateVideoTasks
UpdateVideoTasks 按渠道更新所有视频任务
service/task_polling.go:385
↓ 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:221
↓ 6 callersFunctionUsageFromChatUsage
(src *dto.Usage)
relaykit/relayconvert/response_compat.go:156
↓ 6 callersFunctionUsageFromChatUsage
(src *dto.Usage)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp.go:145
↓ 6 callersMethodValidateNetworkTarget
ValidateNetworkTarget validates the host and port before dialing.
common/ssrf_protection.go:290
↓ 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 callersFunctionauditRequest
(router http.Handler, method, path, token string)
controller/access_token_audit_test.go:58
↓ 6 callersFunctionbuildOpenAIStyleUsageFromClaudeUsage
(usage *dto.Usage)
relay/channel/claude/relay-claude.go:57
↓ 6 callersFunctioncanonicalUsageFromResponse
(response any)
relaykit/relayconvert/response_registry.go:844
↓ 6 callersFunctionclearAuthentication
( synchronizeTabs = true, bootstrapState: AuthBootstrapState = 'complete' )
web/src/lib/auth-session.ts:187
↓ 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:1545
↓ 6 callersFunctioncreateEpayTestOrder
(t *testing.T, userId int, tradeNo string, provider string, status string)
model/payment_method_guard_test.go:177
↓ 6 callersFunctioncreateLog
(log *Log)
model/log.go:101
↓ 6 callersFunctioncreateOAuthFlow
( provider: string, intent: 'login' | 'bind' | 'verify', operation?: VerificationOperation, signal?: A
web/src/features/auth/api.ts:213
↓ 6 callersMethodensureStart
()
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:158
↓ 6 callersFunctionfetchLogs
( endpoint: string, params: T, isAdmin: boolean )
web/src/features/usage-logs/api.ts:42
↓ 6 callersMethodfinish
(response *dto.OpenAIResponsesResponse, estimatedInputTokens int)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:456
↓ 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 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 callersFunctionformatUserLogs
(logs []*Log, startIdx int)
model/log.go:116
↓ 6 callersFunctiongetAuthenticatedUser
(c *gin.Context)
controller/passkey.go:635
↓ 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:157
↓ 6 callersFunctiongetSuccessRateTextClass
(rate: number)
web/src/features/performance-metrics/lib/format.ts:88
↓ 6 callersFunctiongetUpstreamDisplayName
( sourceName: string, t: (key: string) => string )
web/src/features/system-settings/models/upstream-ratio-sync-helpers.ts:36
↓ 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 callersMethodmakeChunk
(delta dto.ChatCompletionsStreamResponseChoiceDelta, finishReason *string)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:610
↓ 6 callersFunctionmustRawMessage
(t *testing.T, value any)
relaykit/relayconvert/request_registry_test.go:694
↓ 6 callersFunctionmustStreamChunks
(t *testing.T, state *ResponsesToChatStreamState, event *dto.ResponsesStreamResponse)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp_test.go:541
↓ 6 callersFunctionmustUnmarshalFixture
(raw string, out any)
relaykit/relayconvert/golden_test.go:460
↓ 6 callersFunctionnewAdvancedCustomModelListChannel
(baseURL string, key string, upstreamPath string, auth *dto.AdvancedCustomRouteAuth)
controller/channel_upstream_update_test.go:20
↓ 6 callersFunctionnewAuditTestDatabase
External tests create a new database per case on a loopback-only disposable instance. They never drop databases or tables supplied through an environm
controller/access_token_audit_test.go:436
↓ 6 callersFunctionnewAuthenticatedContext
(t *testing.T, method string, target string, body any, userID int)
controller/token_test.go:190
↓ 6 callersFunctionnewClientIPRouter
()
middleware/trusted_proxies_test.go:24
↓ 6 callersFunctionnewFakeSMTPServerWithSTARTTLSAdvertisement
(t *testing.T, advertiseSTARTTLS bool)
common/email_test.go:39
↓ 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:160
↓ 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 callersFunctionptr
(value T)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp_test.go:422
↓ 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 callersFunctionrememberOAuthLoginRedirect
( state: string, redirect?: string )
web/src/features/auth/lib/oauth-callback-mode.ts:22
↓ 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:59
← previousnext →701–800 of 11,918, ranked by callers