MCPcopy Create free account

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

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

↓ 3 callersFunctioninitCol
()
model/main.go:30
↓ 3 callersFunctioninsertTask
(t *testing.T, task *Task)
model/task_cas_test.go:95
↓ 3 callersFunctionintersectModelNames
(base []string, allowed []string)
controller/channel_upstream_update.go:134
↓ 3 callersFunctioninvalidateUserCache
invalidateUserCache clears user cache
model/user_cache.go:63
↓ 3 callersFunctionisAssistantMessagePending
(message: Message)
web/src/features/playground/lib/message/message-streaming-utils.ts:165
↓ 3 callersFunctionisErrorMessage
(message: Message)
web/src/features/playground/lib/message/message-error-utils.ts:39
↓ 3 callersFunctionisHttpUrl
(value: string)
web/src/lib/content-format.ts:19
↓ 3 callersFunctionisLikelyHtml
(value: string)
web/src/lib/content-format.ts:28
↓ 3 callersFunctionisManageableChannelStatus
(status int)
controller/channel.go:1177
↓ 3 callersFunctionisModuleEnabled
* Check if a module is enabled. Admin config is the first (authoritative) * layer: if admin disables a section/module it is always hidden. User confi
web/src/hooks/use-sidebar-config.ts:168
↓ 3 callersFunctionisNewAPIRelay
(apiKey string)
relay/channel/task/jimeng/adaptor.go:478
↓ 3 callersFunctionisNewAPIRelay
(apiKey string)
relay/channel/task/kling/adaptor.go:376
↓ 3 callersFunctionisPlainObject
(v)
web/scripts/sync-i18n.mjs:117
↓ 3 callersFunctionisStripePayment
(paymentType: string)
web/src/features/wallet/lib/payment.ts:74
↓ 3 callersFunctionisSyncImageModel
(modelName string)
relay/channel/ali/adaptor.go:64
↓ 3 callersFunctionisTimingLogType
(type: number)
web/src/features/usage-logs/lib/utils.ts:57
↓ 3 callersFunctionisUserDeleted
(user: UserType)
web/src/features/users/constants.ts:27
↓ 3 callersFunctionisWaffoPancakePayment
(paymentType: string)
web/src/features/wallet/lib/payment.ts:92
↓ 3 callersFunctionisWaffoPayment
(paymentType: string)
web/src/features/wallet/lib/payment.ts:81
↓ 3 callersFunctionisWanModel
(modelName string)
relay/channel/ali/image_wan.go:47
↓ 3 callersFunctionissueAuthBundle
(session *model.UserSession, rawRefreshToken string, current bool)
service/auth_session.go:328
↓ 3 callersFunctionloadConfig
()
web/src/features/playground/lib/storage/storage.ts:281
↓ 3 callersFunctionlogout
()
web/src/features/auth/api.ts:100
↓ 3 callersFunctionlookupResponseRoute
(from types.RelayFormat, to types.RelayFormat)
service/relayconvert/response_registry.go:675
↓ 3 callersFunctionmapIoNetDeployment
(d ionet.Deployment)
controller/deployment.go:138
↓ 3 callersFunctionmarkGeminiGoogleSearchCall
(c *gin.Context, response *dto.GeminiChatResponse)
relay/channel/gemini/relay-gemini.go:79
↓ 3 callersFunctionmarshalSystemTaskJSON
(v any)
model/system_task.go:437
↓ 3 callersFunctionmergeOptions
( options?: CurrencyFormatOptions )
web/src/lib/currency.ts:231
↓ 3 callersMethodmessageID
()
service/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:370
↓ 3 callersFunctionmustAdvancedCustomRawMessage
(t *testing.T, value any)
relay/channel/advancedcustom/adaptor_test.go:815
↓ 3 callersFunctionmustParseURL
(t *testing.T, rawURL string)
service/protected_fetch_client_test.go:60
↓ 3 callersFunctionnearlyEqual
(a, b float64)
controller/ratio_sync.go:48
↓ 3 callersFunctionnewAwsInvokeContext
()
relay/channel/aws/relay-aws.go:43
↓ 3 callersFunctionnewGeminiResponsesRelayInfo
(isStream bool)
relay/channel/gemini/relay_responses_test.go:170
↓ 3 callersFunctionnewProxyURLConfig
(parsedURL *url.URL)
service/http_client.go:137
↓ 3 callersFunctionnewResponsesChatTestContext
(t *testing.T, body string, isStream bool)
relay/channel/openai/chat_via_responses_test.go:18
↓ 3 callersFunctionnewRule
(ptype string, policy []string)
service/authz/adapter.go:96
↓ 3 callersFunctionnewSMTPClient
(addr string)
common/email.go:44
↓ 3 callersMethodnextIndex
(kind string, toolIndex int)
service/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:343
↓ 3 callersFunctionnextLocalId
()
web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:452
↓ 3 callersFunctionnormalizeAdvancedCustomRouteModels
(models []string)
dto/channel_settings.go:448
↓ 3 callersFunctionnormalizeCatalogItems
(items?: readonly string[])
web/src/features/pricing/components/model-details.tsx:144
↓ 3 callersFunctionnormalizeInterfaceLanguage
(value?: string | null)
web/src/i18n/languages.ts:32
↓ 3 callersFunctionnormalizeLineEndings
(value: string)
web/src/features/system-settings/models/routing-reliability-section.tsx:133
↓ 3 callersFunctionnormalizeModelList
(models: unknown[] = [])
web/src/features/channels/lib/upstream-update-utils.ts:19
↓ 3 callersFunctionnormalizeOpenAIUsage
normalizeOpenAIUsage maps the OpenAI Images usage shape (input_tokens / output_tokens / input_tokens_details) onto the canonical prompt/completion fie
relay/channel/openai/relay_image.go:70
↓ 3 callersFunctionnormalizeRatio
(value: unknown)
web/src/features/system-settings/models/group-ratio-visual-editor.tsx:107
↓ 3 callersFunctionnormalizeResetCreditStatus
(value: unknown)
web/src/features/channels/components/dialogs/codex-usage-dialog.tsx:253
↓ 3 callersFunctionoptionalString
(s string)
service/waffo_pancake.go:147
↓ 3 callersFunctionparseCodexOAuthKey
(raw string)
service/codex_credential_refresh.go:31
↓ 3 callersFunctionparseGroupsList
(groups: string)
web/src/features/channels/lib/channel-utils.ts:237
↓ 3 callersFunctionparseJsonEditorConfig
()
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:427
↓ 3 callersFunctionparseModelsString
(modelsStr: string)
web/src/features/channels/lib/model-mapping-validation.ts:26
↓ 3 callersFunctionparseNumberDraft
(value: string)
web/src/features/system-settings/models/tiered-pricing-editor.tsx:340
↓ 3 callersFunctionparseThinkTags
(content: string)
web/src/features/playground/lib/message/message-reasoning-utils.ts:29
↓ 3 callersFunctionparseTiersFromExpr
(exprStr: string)
web/src/features/pricing/lib/billing-expr.ts:268
↓ 3 callersFunctionparseUserSettings
(settingsJson?: string)
web/src/features/profile/lib/format.ts:28
↓ 3 callersFunctionpatchClaudeMessageDeltaUsageData
(data string, usage *dto.ClaudeUsage)
relay/channel/claude/relay-claude.go:78
↓ 3 callersFunctionperformManageUserRequest
(t *testing.T, body string)
controller/user_manage_test.go:50
↓ 3 callersFunctionprocessChannelError
(c *gin.Context, channelError types.ChannelError, err *types.NewAPIError)
controller/relay.go:359
↓ 3 callersFunctionproofHeaders
(proofToken?: string)
web/src/features/auth/passkey/api.ts:27
↓ 3 callersFunctionpublishCommittedUserAuthVersion
publishCommittedUserAuthVersion records the durable lower bound used to reject an arbitrarily delayed cache fill after a committed security change. It
model/user_auth_cache.go:153
↓ 3 callersFunctionrandomInRange
( rand: () => number, min: number, max: number )
web/src/features/pricing/lib/seed.ts:48
↓ 3 callersFunctionrankingShare
(value int64, total int64)
service/rankings.go:557
↓ 3 callersMethodreasoningID
()
service/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:374
↓ 3 callersFunctionrecalcQuotaFromRatios
recalcQuotaFromRatios 根据 adjustedRatios 重新计算 quota。 公式: baseQuota × ∏(ratio) — 其中 baseQuota 是不含 OtherRatios 的基础额度。
relay/relay_task.go:264
↓ 3 callersFunctionrecordValue
(value: unknown)
web/src/features/dashboard/lib/flow.ts:1024
↓ 3 callersFunctionredirectToLogin
()
web/src/features/auth/hooks/use-auth-redirect.ts:65
↓ 3 callersFunctionrefreshAuthentication
()
web/src/lib/auth-session.ts:333
↓ 3 callersMethodrememberUsage
(usage *dto.Usage)
service/relayconvert/response_registry.go:594
↓ 3 callersFunctionremoveTrailingSlash
(value: string)
web/src/features/system-settings/integrations/utils.ts:19
↓ 3 callersFunctionrenderChildren
(nodes: ParsedNode[])
web/src/components/ai-elements/response-renderer.tsx:56
↓ 3 callersFunctionrenderQuotaCompat
(rawQuota: number, digits = 4)
web/src/features/dashboard/lib/charts.ts:53
↓ 3 callersFunctionrequireBrowserSession
(c *gin.Context)
controller/auth_session.go:151
↓ 3 callersFunctionresolveChannelSortOptions
(idSort bool, sortOptions []ChannelSortOptions)
model/channel.go:123
↓ 3 callersFunctionresolveChannelTestUserID
(c *gin.Context)
controller/channel-test.go:58
↓ 3 callersFunctionresolveVisibleStages
( role: FlowRole, visibleStages?: FlowNodeKind[] )
web/src/features/dashboard/lib/flow.ts:260
↓ 3 callersFunctionresponsesCallID
(item map[string]any)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:487
↓ 3 callersFunctionresponsesJSONString
(raw json.RawMessage)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:529
↓ 3 callersFunctionrunResponsesImageBillingStream
(t *testing.T, events ...string)
relay/channel/openai/relay_responses_billing_test.go:197
↓ 3 callersFunctionrunSystemTaskClaimPass
runSystemTaskClaimPass tries to claim one pending task per registered type and dispatches each claimed task in its own goroutine so a long-running han
service/system_task.go:225
↓ 3 callersFunctionrunSystemTaskScheduler
runSystemTaskScheduler creates a new task row for each enabled scheduled handler whose interval has elapsed since its last run and that has no active
service/system_task.go:263
↓ 3 callersFunctionrunTokenMigrationCompatibilityTest
(t *testing.T, db *gorm.DB, dialect string, managedTokensTable *bool)
controller/token_test.go:276
↓ 3 callersFunctionsanitizeFetchModelsError
(err error, key string)
controller/channel_upstream_update.go:284
↓ 3 callersFunctionsanitizeHeaderOverrideMap
(source map[string]interface{})
relay/common/override.go:398
↓ 3 callersFunctionsaturateQuota
saturateQuota converts an already-rounded quota value to int, clamping to the int32 range. Whenever clamping (what would otherwise be an integer wrapa
common/quota_math.go:72
↓ 3 callersMethodscanKeys
(match string)
pkg/cachex/hybrid_cache.go:139
↓ 3 callersFunctionselectChannelsForAutomaticTest
(channels []*model.Channel, mode string)
controller/channel-test.go:1018
↓ 3 callersFunctionsetAuthNoStore
(c *gin.Context)
controller/auth_session.go:178
↓ 3 callersFunctionsetChannelAffinityContext
(c *gin.Context, meta channelAffinityMeta)
service/channel_affinity.go:352
↓ 3 callersFunctionsetCodexWhamRequestHeaders
(req *http.Request, accessToken string, accountID string)
service/codex_wham_usage.go:154
↓ 3 callersFunctionsetDashboardAuthContext
(c *gin.Context, user *model.UserBase, identity service.AuthIdentity, useAccessToken bool)
middleware/auth.go:194
↓ 3 callersFunctionsetFormValue
(field: keyof ModelPricingFormValues, value: string)
web/src/features/system-settings/models/model-pricing-sheet.tsx:223
↓ 3 callersFunctionsetHeaderOverrideInContext
(context map[string]interface{}, headerName string, value interface{}, keepOrigin bool)
relay/common/override.go:1073
↓ 3 callersFunctionsetupManageUserTestDB
(t *testing.T)
controller/user_manage_test.go:22
↓ 3 callersFunctionshouldAuditParamPath
(path string)
relay/common/override.go:257
↓ 3 callersFunctionstableColorMap
( keys: string[], palette?: readonly string[] )
web/src/features/dashboard/lib/flow.ts:315
↓ 3 callersFunctionstartReasoningTiming
( message: Message, startedAt: number = Date.now() )
web/src/features/playground/lib/message/message-timing-utils.ts:40
↓ 3 callersMethodstop
()
web/src/components/ai-elements/prompt-input.tsx:1052
↓ 3 callersFunctionsubtractModelNames
(base []string, removed []string)
controller/channel_upstream_update.go:123
← previousnext →1,101–1,200 of 9,195, ranked by callers