MCPcopy Create free account

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

Functions9,195 in github.com/QuantumNous/new-api

↓ 2 callersFunctionnoteTaskQuotaClamp
noteTaskQuotaClamp records the first quota saturation event onto the task's RelayInfo so LogTaskConsumption can surface it on the submit log's admin_i
relay/relay_task.go:281
↓ 2 callersFunctionnotifySystemTaskRunner
notifySystemTaskRunner wakes the runner without blocking. If a wakeup is already pending it is a no-op, which is fine since one pass drains all work.
service/system_task.go:116
↓ 2 callersFunctionollamaChatHandler
non-stream handler for chat/generate
relay/channel/ollama/stream.go:206
↓ 2 callersFunctionollamaToolCallsToOpenAI
(toolCalls []OllamaToolCall, startIndex int, includeIndex bool)
relay/channel/ollama/stream.go:45
↓ 2 callersFunctiononPaginationChange
(updater)
web/src/hooks/use-table-url-state.ts:169
↓ 2 callersFunctiononSubmit
(data: z.infer<typeof otpFormSchema>)
web/src/features/auth/otp/components/otp-form.tsx:80
↓ 2 callersFunctionopenAIBillingUsageFromUsage
(usage *dto.Usage)
service/relayconvert/internal/oai_chat/to_gemini_chat_resp.go:218
↓ 2 callersFunctionopenAIChatToOllamaChat
(c *gin.Context, r *dto.GeneralOpenAIRequest)
relay/channel/ollama/relay-ollama.go:22
↓ 2 callersFunctionopenTokenControllerExternalDB
(t *testing.T, dialect string, dsn string)
controller/token_test.go:115
↓ 2 callersFunctionopenTokenControllerTestDB
(t *testing.T)
controller/token_test.go:74
↓ 2 callersFunctionorderCardCells
( cells: Cell<TData, unknown>[] )
web/src/components/data-table/layout/card-row-content.tsx:26
↓ 2 callersMethodoutputStatus
()
service/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:363
↓ 2 callersFunctionparseAdvancedCustomRouteModels
(value: string)
web/src/features/channels/lib/advanced-custom.ts:510
↓ 2 callersFunctionparseAudio
(audioBase64 string, format string)
service/audio.go:9
↓ 2 callersFunctionparseAuthClaims
(raw, expectedUse string, key []byte)
service/auth_token.go:194
↓ 2 callersFunctionparseBoundary
parseBoundary extracts the multipart boundary from the Content-Type header using mime.ParseMediaType
common/gin.go:361
↓ 2 callersFunctionparseConditionOperations
(raw interface{})
relay/common/override.go:1907
↓ 2 callersFunctionparseFlowQuotaTimeRange
(c *gin.Context)
controller/usedata.go:13
↓ 2 callersFunctionparseHEIFDimensions
parseHEIFDimensions parses ISOBMFF box tree to find the ispe box and extract image width/height. Returns (width, height, ok).
service/file_service.go:517
↓ 2 callersFunctionparseHeaderNavBoolean
( raw: unknown, fallback: boolean )
web/src/lib/nav-modules.ts:57
↓ 2 callersFunctionparseHeaderNavModulesFromStatus
( status: Record<string, unknown> | null )
web/src/lib/nav-modules.ts:139
↓ 2 callersFunctionparseHeaderReplacementTokens
(value interface{})
relay/common/override.go:1192
↓ 2 callersFunctionparseJsonRows
(json: string)
web/src/components/json-editor.tsx:46
↓ 2 callersFunctionparseModelTags
(tags: string | undefined)
web/src/features/models/lib/model-utils.ts:66
↓ 2 callersFunctionparseModelsList
(models: string)
web/src/features/channels/lib/channel-utils.ts:223
↓ 2 callersFunctionparseNestedRatioMap
( value: string )
web/src/features/system-settings/models/group-ratio-visual-editor.tsx:126
↓ 2 callersFunctionparseOpenAIModelIDs
(body []byte)
controller/channel_upstream_update.go:265
↓ 2 callersFunctionparseProxyURL
(rawProxyURL string, allowLegacySuffix bool)
common/proxy_url.go:23
↓ 2 callersFunctionparseSidebarConfig
* Parse backend SidebarModulesAdmin configuration
web/src/hooks/use-sidebar-config.ts:124
↓ 2 callersFunctionparseStatusCodeKey
(rawKey: string)
web/src/features/channels/lib/status-code-risk-guard.ts:21
↓ 2 callersFunctionparseStatusCodeMappingTarget
(rawValue: unknown)
web/src/features/channels/lib/status-code-risk-guard.ts:27
↓ 2 callersFunctionparseStatusFilter
(statusParam string)
controller/channel.go:56
↓ 2 callersFunctionparseStringItems
(items: PrefillGroup['items'])
web/src/features/models/components/prefill-group-shared.ts:69
↓ 2 callersFunctionparseTaskData
(data: unknown)
web/src/features/usage-logs/components/columns/task-logs-columns.tsx:46
↓ 2 callersFunctionparseTelegramBindCallback
( search: TelegramBindCallbackSearch )
web/src/features/auth/lib/oauth-bind-window.ts:56
↓ 2 callersFunctionparseToolPrice
(value: string)
web/src/features/system-settings/models/tool-price-settings.tsx:53
↓ 2 callersFunctionparseUpstreamUpdateMeta
(settings: unknown)
web/src/features/channels/lib/upstream-update-utils.ts:27
↓ 2 callersFunctionparseUserSidebarConfig
* Parse user-level sidebar_modules. Returns null when the value is empty, * invalid, or otherwise unusable — the caller treats null as "do not narrow
web/src/hooks/use-sidebar-config.ts:147
↓ 2 callersFunctionparseVolcengineAuth
(apiKey string)
relay/channel/volcengine/tts.go:110
↓ 2 callersFunctionparseWaffoPayMethods
(value: string)
web/src/features/system-settings/integrations/payment-settings-section.tsx:207
↓ 2 callersFunctionpatchGeminiZeroCompletionUsage
patchGeminiZeroCompletionUsage estimates completion tokens locally when upstream usageMetadata was billable but reported zero completion tokens even t
relay/channel/gemini/relay-gemini.go:45
↓ 2 callersFunctionpickTelegramAuthorization
( value: unknown )
web/src/features/auth/lib/telegram-login.ts:40
↓ 2 callersFunctionpolicyEffect
(policy []string)
service/authz/resolver.go:78
↓ 2 callersFunctionpostTelegramBindResult
( callback: TelegramBindCallback, opener: Pick<Window, 'closed' | 'postMessage'> | null, targetOrigin: s
web/src/features/auth/lib/oauth-bind-window.ts:79
↓ 2 callersMethodprefix
()
pkg/cachex/namespace.go:8
↓ 2 callersFunctionprepareCredentialRequestOptions
( payload: any )
web/src/lib/passkey.ts:153
↓ 2 callersMethodprepareForInsert
(tx *gorm.DB)
model/user.go:540
↓ 2 callersFunctionpriceToUnitCost
(price: number | string)
web/src/features/system-settings/models/tiered-pricing-editor.tsx:320
↓ 2 callersFunctionpricingEndpointTypesFromPricing
(pricings []Pricing)
model/pricing_endpoint_test.go:73
↓ 2 callersFunctionprocessChartData
( data: QuotaDataItem[], timeGranularity: TimeGranularity = 'day', t?: TFunction, chartCornerRadius?:
web/src/features/dashboard/lib/charts.ts:70
↓ 2 callersFunctionprocessFormMap
(formMap map[string]any, v any)
common/gin.go:293
↓ 2 callersFunctionproviderParams
providerParams returns map with Provider key for i18n templates
controller/oauth.go:33
↓ 2 callersFunctionpublishAuthSessionEvent
( kind: AuthSessionSyncEvent['kind'], sid: string )
web/src/lib/auth-session-sync.ts:53
↓ 2 callersFunctionqueueSearchValue
(value: string)
web/src/components/data-table/toolbar/toolbar.tsx:218
↓ 2 callersFunctionrandomIdentifier
()
web/src/lib/auth-session-sync.ts:30
↓ 2 callersFunctionrankingBucketLabel
(bucket int64, config rankingPeriodConfig)
service/rankings.go:529
↓ 2 callersFunctionrankingBucketTs
(bucket int64)
service/rankings.go:525
↓ 2 callersFunctionrankingGrowthPct
(current int64, previous int64)
service/rankings.go:564
↓ 2 callersFunctionratioToPrice
(ratio?: string, denominator?: string)
web/src/features/system-settings/models/model-pricing-snapshots.ts:76
↓ 2 callersFunctionreadStoredValue
(key: string)
web/src/features/playground/lib/storage/storage.ts:49
↓ 2 callersMethodreasoningDelta
(delta string)
service/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:195
↓ 2 callersMethodreasoningOutput
(status string)
service/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:394
↓ 2 callersMethodrecordOperation
(mode, path, from, to string, value interface{})
relay/common/override.go:243
↓ 2 callersFunctionrecordRedisRequest
记录Redis请求
middleware/model-rate-limit.go:66
↓ 2 callersFunctionrecordSubscriptionResetUserLogs
(result *model.SubscriptionResetResult, adminInfo map[string]interface{})
controller/subscription.go:410
↓ 2 callersFunctionrecordUserSecurityAudit
recordUserSecurityAudit 记录普通用户自己的安全敏感操作(如 passkey 绑定/解绑)。 这类日志没有管理员操作者,不写 admin_info;同时不依赖 AdminAuth/RootAuth 的兜底。
controller/audit.go:113
↓ 2 callersFunctionredisBucketKey
(key bucketKey)
pkg/perf_metrics/metrics.go:426
↓ 2 callersFunctionredisUserRateLimitKey
(mark string, userID int)
middleware/rate-limit.go:48
↓ 2 callersFunctionregister
(payload: RegisterPayload)
web/src/features/auth/api.ts:184
↓ 2 callersFunctionregisterChannelRoutes
(apiRouter *gin.RouterGroup)
router/channel-router.go:19
↓ 2 callersFunctionregisteredSystemTaskHandlers
()
service/system_task.go:66
↓ 2 callersFunctionremoveTag
(tagToRemove: string)
web/src/components/tag-input.tsx:55
↓ 2 callersFunctionrenderAuditContent
( other: LogOtherData | null | undefined, t: (key: string, opts?: Record<string, unknown>) => string )
web/src/features/usage-logs/lib/format.ts:460
↓ 2 callersFunctionrenderCellContent
( cell: Cell<TData, unknown> )
web/src/components/data-table/layout/card-cell-utils.ts:39
↓ 2 callersFunctionrenderMath
(source: string, displayMode: boolean)
web/src/components/ui/markdown.tsx:183
↓ 2 callersFunctionrenderTableBody
( props: DataTableViewProps<TData>, rows: Row<TData>[], colSpan: number, getColumnClassName: DataTable
web/src/components/data-table/core/data-table-view.tsx:248
↓ 2 callersFunctionreplaceBackupCodesWithTx
(tx *gorm.DB, userId int, codes []string)
model/twofa.go:199
↓ 2 callersFunctionrequestPaymentAmount
( topupAmount: number, paymentType: string, calculators: PaymentAmountCalculators = defaultPaymentAmount
web/src/features/wallet/hooks/use-payment.ts:60
↓ 2 callersFunctionrequireOrderedSubstrings
(t *testing.T, s string, parts ...string)
relay/channel/openai/chat_via_responses_test.go:171
↓ 2 callersFunctionrequirePasskeyRegistrationVerification
(c *gin.Context, userID int)
controller/passkey.go:669
↓ 2 callersFunctionrequireSuccessfulFlowRows
( response: FlowResponse, fallbackMessage: string )
web/src/features/dashboard/lib/flow-selection.ts:32
↓ 2 callersFunctionresetUserSubscriptionTx
(tx *gorm.DB, sub *UserSubscription, plan *SubscriptionPlan, now int64, advanceResetTime bool)
model/subscription.go:1002
↓ 2 callersFunctionresolveAdvanceResetTime
(value *bool)
controller/subscription.go:403
↓ 2 callersFunctionresolveLegacyRoute
(rawHref: string)
web/src/lib/legacy-route.ts:66
↓ 2 callersFunctionresolveOAuthSiteUrl
( serverAddress: string, fallback: string )
web/src/features/system-settings/auth/oauth-callback-url.ts:19
↓ 2 callersFunctionresolveOllamaBaseUrl
(channel: Channel | null)
web/src/features/channels/lib/ollama-utils.ts:66
↓ 2 callersFunctionresolveRateLimitWindows
(data: RateLimitSource | null)
web/src/features/channels/components/dialogs/codex-usage-dialog.tsx:298
↓ 2 callersFunctionresolveSidebarView
(pathname: string)
web/src/components/layout/lib/sidebar-view-registry.ts:41
↓ 2 callersFunctionresolveUserSortOptions
(sortOptions []UserSortOptions)
model/user.go:70
↓ 2 callersFunctionrespPtr
(value T)
service/relayconvert/response_registry_test.go:671
↓ 2 callersFunctionrespondTaskError
respondTaskError 统一输出 Task 错误响应(含 429 限流提示改写)
controller/relay.go:611
↓ 2 callersFunctionresponseGeminiChat2OpenAI
(c *gin.Context, response *dto.GeminiChatResponse)
relay/channel/gemini/relay-gemini.go:118
↓ 2 callersFunctionresponseStreamEventItemID
(event *dto.ResponsesStreamResponse)
service/relayconvert/internal/oai_responses/to_oai_chat_resp.go:254
↓ 2 callersFunctionresponseStreamResults
(state *ResponseStreamState, values []any, usage *dto.Usage)
service/relayconvert/response_registry.go:600
↓ 2 callersFunctionresponsesArgumentsString
(value any)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:499
↓ 2 callersFunctionresponsesPartPayload
(part map[string]any, key string)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:473
↓ 2 callersFunctionresponsesRequestTextToChatResponseFormat
(raw json.RawMessage)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:392
↓ 2 callersFunctionresponsesRequestToolChoiceToChat
(raw json.RawMessage)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:358
↓ 2 callersFunctionrevokeUserSessions
(userID int, excludedSID, reason string)
model/user_session.go:712
↓ 2 callersFunctionroleBaselineAllows
(e *casbin.SyncedEnforcer, roleKey string, permission Permission)
service/authz/resolver.go:53
← previousnext →2,001–2,100 of 9,195, ranked by callers