MCPcopy Create free account

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

Functions15,409 in github.com/QuantumNous/new-api

↓ 2 callersFunctionuseSavePolicy
()
web/src/features/system-settings/request-policies/use-save-policy.ts:9
↓ 2 callersFunctionuseSidebarData
(badges: SidebarBadges = {})
web/src/hooks/use-sidebar-data.ts:52
↓ 2 callersFunctionuseSyncPriceSelection
()
web/src/features/system-settings/models/upstream-ratio-sync-helpers.ts:271
↓ 2 callersFunctionuseSystemOptions
()
web/src/features/system-settings/hooks/use-system-options.ts:25
↓ 2 callersFunctionuseSystemTaskMatrixDB
useSystemTaskMatrixDB points DB at a fresh system_tasks table on dialect, skipping MySQL and PostgreSQL unless TEST_MYSQL_DSN / TEST_POSTGRES_DSN are
model/system_task_test.go:22
↓ 2 callersFunctionuseThemeColor
(cssVariable: string)
web/src/lib/theme-color.ts:51
↓ 2 callersMethoduseToken
useToken exchanges a static key line for the token the hooks get, when the plugin exports exchangeKey. The plugin's error keeps its status, so the cha
relay/channel/providerplugin/adaptor.go:605
↓ 2 callersFunctionuseUserDisplay
(user: AuthUser | null | undefined)
web/src/hooks/use-user-display.ts:29
↓ 2 callersFunctionuseUsersColumns
()
web/src/features/users/components/users-columns.tsx:49
↓ 2 callersFunctionuserContent
(parts ...string)
plugins/request_plugins_test.go:1140
↓ 2 callersFunctionuserNode
(row: FlowQuotaDataItem)
web/src/features/dashboard/lib/flow.ts:174
↓ 2 callersFunctionuserOverridePolicies
userOverridePolicies returns the override entries that differ from the managed role baseline; entries matching the baseline are omitted.
service/authz/override.go:138
↓ 2 callersFunctionusesChatQuantities
(variables: ReadonlySet<string>)
web/src/features/pricing/lib/plugin-pricing.ts:71
↓ 2 callersFunctionusesRequestProbe
(node ast.Node)
pkg/billingexpr/compile.go:98
↓ 2 callersFunctionusesTaskModelPricing
( data: ModelRatioData | null | undefined, schema: BillingUsageSchema | undefined, variants: ModelPricin
web/src/features/system-settings/models/model-pricing-core.ts:86
↓ 2 callersFunctionutf16Byte
utf16Byte is the byte offset in text of a UTF-16 offset. Inside a surrogate pair it rounds down, or up when up is set.
relay/requestplugin/reply.go:556
↓ 2 callersFunctionutf16Text
(data []byte)
relay/requestplugin/pdf.go:500
↓ 2 callersFunctionvalidateAdminStep
()
web/src/features/setup/setup-wizard.tsx:211
↓ 2 callersFunctionvalidateCustomOAuthProvider
validateCustomOAuthProvider validates a custom OAuth provider configuration
model/custom_oauth_provider.go:170
↓ 2 callersFunctionvalidateEmailBindingAccountWithTx
(tx *gorm.DB, identity AuthSessionIdentity, state *EmailBindingState)
model/email_binding.go:188
↓ 2 callersFunctionvalidateExpiredTime
(expired int64)
controller/redemption.go:206
↓ 2 callersFunctionvalidateHailuoCombo
(model, duration, resolution, hasImage)
plugins/tasks/hailuo/plugin.js:469
↓ 2 callersFunctionvalidateLikePattern
(input string)
model/token.go:138
↓ 2 callersFunctionvalidateLocalizedText
(text LocalizedText, name string, maxRunes int)
pkg/jsplugin/registry.go:2554
↓ 2 callersFunctionvalidateLocalizedTextNamed
(text LocalizedText, subject string, maxRunes int)
pkg/jsplugin/registry.go:2558
↓ 2 callersFunctionvalidateModelScope
validateModelScope enforces the shared rules for route.models and per-protocol models entries: non-empty canonical names, no duplicates.
pkg/jsplugin/routing.go:958
↓ 2 callersFunctionvalidateModelVendor
(tx *gorm.DB, id int)
model/vendor_management.go:35
↓ 2 callersFunctionvalidatePasskeyRPIDWithTx
(tx *gorm.DB, rpID string)
model/passkey_option.go:77
↓ 2 callersFunctionvalidateProjectedTaskArtifacts
(artifacts []relaychannel.TaskArtifact)
controller/task.go:186
↓ 2 callersFunctionvalidatePrompt
(prompt string)
relay/common/relay_utils.go:136
↓ 2 callersFunctionvalidateResponsesRequestChatUnsupportedFields
(req *dto.OpenAIResponsesRequest)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:122
↓ 2 callersFunctionvalidateTaskDurationBounds
(req TaskSubmitReq)
relay/common/relay_utils.go:148
↓ 2 callersFunctionvalidateTaskMediaURL
(rawURL, proxy string)
controller/video_proxy.go:529
↓ 2 callersFunctionvalidateTopUpQuota
(amount int64)
controller/topup.go:243
↓ 2 callersFunctionvalidateURL
(urlStr string, index int, messages itemMessages)
setting/console_setting/validation.go:59
↓ 2 callersFunctionvalidateURLWithCurrentFetchSetting
(urlStr string, applyDomainIPFilter bool)
service/http_client.go:66
↓ 2 callersFunctionvalidateUsageFieldSchema
(name string, field UsageFieldSchema)
pkg/jsplugin/registry.go:2052
↓ 2 callersFunctionvalidateUsageModeStep
()
web/src/features/setup/setup-wizard.tsx:248
↓ 2 callersFunctionvalidateUsageValue
(value any, schema pluginruntime.UsageFieldSchema)
relay/channel/task/jsplugin/adaptor.go:2064
↓ 2 callersMethodvalidatedUsageRatios
validatedUsageRatios returns the normalized facts in a new map because the hook result may be a host value, such as the request body, that must stay u
relay/channel/task/jsplugin/adaptor.go:1972
↓ 2 callersFunctionvalue
(this: HTMLElement)
web/src/features/channels/components/__tests__/channel-configuration.test.tsx:2426
↓ 2 callersMethodvalue
()
pkg/jsplugin/json_state.go:431
↓ 2 callersFunctionvendorImageCount
(body)
plugins/tasks/jimeng/plugin.js:110
↓ 2 callersFunctionverifyAuditJSONStorage
(t *testing.T)
controller/access_token_audit_test.go:919
↓ 2 callersFunctionverifyAuditRoleStorage
(t *testing.T)
controller/access_token_audit_test.go:891
↓ 2 callersFunctionverifyJSON
(text: string)
web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:486
↓ 2 callersFunctionverifyLogin
( input: VerificationInput, challenge: LoginChallenge, signal: AbortSignal, onDomains?: (domains: Pass
web/src/features/auth/secure-verification/api.ts:136
↓ 2 callersFunctionviaGateway
(ctx)
plugins/tasks/jimeng/plugin.js:102
↓ 2 callersFunctionviaGateway
(ctx)
plugins/tasks/vidu/plugin.js:169
↓ 2 callersFunctionviaGateway
(ctx)
plugins/tasks/kling/plugin.js:154
↓ 2 callersFunctionvideoAction
(req)
plugins/tasks/alibaba/plugin.js:838
↓ 2 callersFunctionvideoInputRequest
(action, source, identity)
plugins/tasks/xai/plugin.js:259
↓ 2 callersFunctionvideoProxyError
videoProxyError returns a standardized OpenAI-style error response.
controller/video_proxy.go:55
↓ 2 callersFunctionvideoResolution
(ctx)
plugins/tasks/doubao/plugin.js:415
↓ 2 callersFunctionwalk
(dir, files = [])
web/scripts/format-with-protected-headers.mjs:59
↓ 2 callersFunctionwanVideoUsageSchema
(resolutions, audio)
plugins/tasks/alibaba/plugin.js:165
↓ 2 callersFunctionwatchOAuthPopupClosed
( popup: Pick<Window, 'closed'>, onClosed: () => void, interval = 500, runtime: TimerRuntime = interva
web/src/features/auth/lib/oauth-bind-window.ts:116
↓ 2 callersMethodwhole
whole checks a non-stream answer: one call per instance with every output final. It returns the answer to send, nil when an instance stopped it; an an
relay/requestplugin/reply.go:676
↓ 2 callersFunctionwithAccessTokenID
withAccessTokenID sets the :id route parameter the way the router would.
controller/security_enrollment_test.go:143
↓ 2 callersFunctionwithDebugEnabled
(t *testing.T, enabled bool)
service/error_test.go:152
↓ 2 callersMethodwithDefaults
()
relay/plugin_protocol.go:59
↓ 2 callersFunctionwithDeviceAvailability
( requirements: VerificationRequirements, passkeySupported: boolean )
web/src/features/auth/secure-verification/api.ts:70
↓ 2 callersFunctionwithOrdinaryPricing
(model: PricingModel)
web/src/features/pricing/lib/plugin-pricing.ts:92
↓ 2 callersMethodwithProtocol
(value map[string]any)
pkg/jsplugin/routing.go:404
↓ 2 callersFunctionwithSelfUseModeDisabled
(t *testing.T)
controller/model_list_test.go:124
↓ 2 callersFunctionwithSelfUseModeEnabled
(t *testing.T)
controller/model_list_test.go:134
↓ 2 callersFunctionwriteAwsStreamEvent
(writer io.Writer, data string)
relay/channel/aws/relay_aws_test.go:122
↓ 2 callersFunctionwriteH2TestResponse
(framer *http2.Framer, streamID uint32)
relay/channel/api_request_getbody_test.go:313
↓ 2 callersFunctionwriteLoginResponse
(c *gin.Context, user *model.User, bundle *service.AuthBundle)
controller/user.go:198
↓ 2 callersFunctionwritePasskeyDomainSettingsError
(c *gin.Context, err error)
controller/option.go:171
↓ 2 callersFunctionwriteRelayStreamError
(c *gin.Context, format types.RelayFormat, apiError *types.NewAPIError)
controller/relay.go:272
↓ 2 callersFunctionwriteTaskArtifactProjectionError
(c *gin.Context, err error)
controller/task.go:291
↓ 2 callersFunctionwriteTaskArtifacts
(c *gin.Context, task *model.Task, dashboard bool)
controller/task.go:94
↓ 2 callersFunctionwriteTaskMediaBase64
writeTaskMediaBase64 answers with media the upstream delivered as base64, decoding it while it streams; HEAD gets the headers only. The media type def
controller/video_proxy.go:682
↓ 2 callersFunctionwriteTaskMediaProxyError
(c *gin.Context, err error)
controller/video_proxy.go:643
↓ 2 callersFunctionwriteTaskPluginProtocolFailureResponse
( c *gin.Context, machine *relay.PluginResponsesMachine, taskStatus string, )
controller/plugin_protocol.go:1129
↓ 2 callersFunctionwriteTaskPluginProtocolHeartbeat
(c *gin.Context)
controller/plugin_protocol.go:1096
↓ 2 callersFunctionwriteThemePreference
(key: string, value: string | null)
web/src/lib/theme-storage.ts:45
↓ 2 callersFunctionwriteToDiskCache
writeToDiskCache 将数据写入磁盘缓存
service/file_service.go:244
↓ 2 callersFunctionwriteVisualCondition
( node: VisualCondition, source: string, issues: VisualBillingIssue[] )
web/src/features/pricing/lib/billing-expression/visual.ts:257
↓ 2 callersFunctionwriteWebSocketMessage
(session *websocket.Conn, message jsplugin.WebSocketMessage)
relay/channel/providerplugin/stream.go:450
↓ 2 callersFunctionxunfeiMakeRequest
(textRequest dto.GeneralOpenAIRequest, domain, authUrl, appId string)
relay/channel/xunfei/relay-xunfei.go:203
↓ 2 callersFunctionzImage
(ctx)
plugins/tasks/alibaba/plugin.js:486
↓ 1 callersFunctionAcSearch
(findText string, dict []string, stopImmediately bool)
service/str.go:132
↓ 1 callersMethodAcceptsModel
AcceptsModel reports whether the route's Models list admits model, as MatchPathForModel matches it; an empty list admits every model.
relaykit/dto/channel_settings.go:251
↓ 1 callersFunctionAccessTokenRouteRuleKeys
AccessTokenRouteRuleKeys lists every declared route key, sorted.
middleware/access_token_routes.go:350
↓ 1 callersFunctionAccessTokenScopeDictionary
AccessTokenScopeDictionary lists every resource a token scope can name, whatever the viewer may grant, so stored grants keep their labels after the gr
service/access_token_scope.go:159
↓ 1 callersFunctionAddChannel
(c *gin.Context)
controller/channel.go:817
↓ 1 callersMethodAdjustBillingOnComplete
AdjustBillingOnComplete 在任务到达终态(成功/失败)时由轮询循环调用。 返回正数触发差额结算(补扣/退还),返回 0 保持预扣费金额不变。
service/task_polling.go:35
↓ 1 callersMethodAdjustBillingOnComplete
AdjustBillingOnComplete returns the actual quota when a task reaches a terminal state (success/failure) during polling. Called by the polling loop aft
relay/channel/adapter.go:70
↓ 1 callersFunctionAdminDeleteUserSubscription
AdminDeleteUserSubscription hard-deletes a user subscription.
model/subscription.go:990
↓ 1 callersFunctionAdminInvalidateUserSubscription
AdminInvalidateUserSubscription marks a user subscription as cancelled and ends it immediately.
model/subscription.go:945
↓ 1 callersFunctionAdvanceCurrentSessionSecurity
AdvanceCurrentSessionSecurity increments the user's global auth version, preserves only the current browser session at a new session version and retur
service/auth_session.go:189
↓ 1 callersFunctionAdvanceUserSessionAuthVersion
AdvanceUserSessionAuthVersion preserves one browser session across a user-level security-version change. Both old access JWTs and concurrent updates a
model/user_session.go:678
↓ 1 callersMethodAlgorithm
()
pkg/cachex/hybrid_cache.go:280
↓ 1 callersFunctionAlphaSearchHelper
(c *gin.Context, info *relaycommon.RelayInfo)
relay/alpha_search_handler.go:22
↓ 1 callersFunctionAnonymousRequestBodyLimit
()
middleware/request_body_limit.go:12
↓ 1 callersFunctionAppendChannelAffinityAdminInfo
(c *gin.Context, other *model.LogOther)
service/channel_affinity.go:711
↓ 1 callersFunctionAppendTaskPluginContextAuditInfo
AppendTaskPluginContextAuditInfo is used before a task row exists, such as an upstream submission error log.
service/task_plugin_audit.go:81
↓ 1 callersFunctionApplyChannelPin
ApplyChannelPin copies plugin-declared origin-task facts from the prepare context onto RelayInfo and, when the resolved pin retries on the same channe
relay/relay_task.go:155
← previousnext →4,901–5,000 of 15,409, ranked by callers