MCPcopy Create free account

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

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

↓ 2 callersFunctiontokenBatchAuditParams
(c *gin.Context, ids []int)
controller/audit.go:196
↓ 2 callersFunctiontokenize
(input: string)
web/src/features/home/components/hero-terminal-demo.tsx:459
↓ 2 callersMethodtokens
()
controller/provider_plugin_test.go:68
↓ 2 callersMethodtoolItem
(event *dto.ResponsesStreamResponse)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:307
↓ 2 callersMethodtoolOutput
(tool *chatToResponsesStreamTool, status string)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:894
↓ 2 callersFunctiontopBar
()
web/src/features/system-settings/models/__tests__/price-changes.test.tsx:129
↓ 2 callersFunctiontopUpQueryCutoff
topUpQueryCutoff 返回允许查询的最早 create_time(秒级 Unix 时间戳)。
model/topup.go:296
↓ 2 callersFunctiontopUpQuotaMaxCurrent
(creditedQuota int)
model/topup.go:61
↓ 2 callersMethodtouch
touch restarts the idle timer on upstream data.
relay/channel/providerplugin/stream.go:170
↓ 2 callersFunctiontransformApiKeyToFormDefaults
( apiKey: ApiKey, availableAutoGroups: string[] = [], maxAutoGroups = 5 )
web/src/features/keys/lib/api-key-form.ts:169
↓ 2 callersFunctiontransformFormDataToPayload
( data: ApiKeyFormValues )
web/src/features/keys/lib/api-key-form.ts:141
↓ 2 callersFunctiontransformUserToFormDefaults
(user: User)
web/src/features/users/lib/user-form.ts:115
↓ 2 callersMethodtransportFor
(proxyURL *url.URL)
service/protected_fetch_client.go:124
↓ 2 callersFunctiontrimMessages
(messages: Message[])
web/src/features/playground/lib/storage/storage.ts:106
↓ 2 callersFunctiontruncateAuthMetadata
(value string, max int)
service/auth_session.go:455
↓ 2 callersFunctiontryParseOperations
(paramOverride map[string]any)
relay/common/override.go:595
↓ 2 callersFunctiontryParseRequestConditions
( conditionStr: string )
web/src/features/pricing/lib/billing-expr.ts:536
↓ 2 callersFunctiontryParseVisualConfig
( exprStr: string | null | undefined )
web/src/features/pricing/lib/tier-expr.ts:176
↓ 2 callersFunctionuid
()
web/src/features/system-settings/models/group-special-usable-editor.tsx:67
↓ 2 callersFunctionunmarshalBodyReusable
(c *gin.Context, v any, noCopy bool)
common/gin.go:130
↓ 2 callersMethodunobserve
()
web/src/test-setup.ts:92
↓ 2 callersFunctionunrecognizedPollDetail
unrecognizedPollDetail pairs the plugin's reason with a bounded copy of the upstream body so the WARN line is enough to diagnose a parser gap.
service/task_polling.go:851
↓ 2 callersFunctionupdate
(changes: Partial<OrderOptions>)
web/src/features/models/components/dialogs/model-square-order-dialog.tsx:148
↓ 2 callersFunctionupdateAdminPermissionsForUserInTx
(c *gin.Context, tx *gorm.DB, userID int, userRole int, permissions map[string]map[string]bool)
controller/user.go:1070
↓ 2 callersFunctionupdateAuth
( field: Exclude<keyof NonNullable<AdvancedCustomRoute['auth']>, 'type'>, value: string )
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:1016
↓ 2 callersFunctionupdateBalanceInRun
updateBalanceInRun queries one enabled channel in an update of all balances and disables what has none left, when the channel's automatic disabling is
controller/channel_balance.go:197
↓ 2 callersFunctionupdateBatchTasks
(ctx context.Context, adaptor BatchTaskPollingAdaptor, channelId int, taskIds []string, taskM map[string]*mode
service/task_polling.go:271
↓ 2 callersFunctionupdateChannelBalance
( id: number )
web/src/features/channels/api.ts:358
↓ 2 callersFunctionupdateChannelStatus
( id: number, status: number )
web/src/features/channels/api.ts:276
↓ 2 callersFunctionupdateChannelUpstreamModelSettings
(channel *model.Channel, settings dto.ChannelOtherSettings, updateModels bool)
controller/channel_upstream_update.go:583
↓ 2 callersFunctionupdateChannelUsedQuota
(id int, quota int)
model/channel.go:1080
↓ 2 callersFunctionupdateConfigFromMap
辅助函数:从map更新配置对象
setting/config/config.go:165
↓ 2 callersFunctionupdateLastAssistantMessage
( messages: Message[], updater: (message: Message) => Message )
web/src/features/playground/lib/message/message-update-utils.ts:51
↓ 2 callersFunctionupdatePluginChannelBalance
updatePluginChannelBalance queries the balance of a task plugin channel with its plugin's balance hooks, each key line of a multi-key channel on its o
controller/channel_balance.go:89
↓ 2 callersFunctionupdatePricing
()
model/pricing.go:217
↓ 2 callersFunctionupdateSystemOption
(request: UpdateOptionRequest)
web/src/features/system-settings/api.ts:42
↓ 2 callersFunctionupsertPasskeyCredentialWithAuthVersion
(credential *PasskeyCredential, identity *AuthSessionIdentity)
model/passkey.go:232
↓ 2 callersFunctionupstreamBody
upstreamBody is the body a convertRequest result sends and its content type: the result's body, a multipart form of its fields and the client files it
relay/channel/providerplugin/adaptor.go:335
↓ 2 callersFunctionupstreamErrorResponse
upstreamErrorResponse is the error a converter hook returned, as an upstream response in the OpenAI error format, so that the host's error handling an
relay/channel/providerplugin/adaptor.go:790
↓ 2 callersFunctionurlFor
(ctx, action)
plugins/tasks/kling/plugin.js:177
↓ 2 callersFunctionusablePerfMetricGroups
(c *gin.Context)
controller/perf_metrics.go:17
↓ 2 callersFunctionusageBillingPathForLog
(isLocalCountTokens bool, usage *dto.Usage)
service/billing_usage.go:26
↓ 2 callersFunctionusageCompletionTokens
(usage *dto.Usage)
service/channel_affinity.go:960
↓ 2 callersFunctionusageExampleNumber
(value any)
pluginkit/meta.go:1841
↓ 2 callersFunctionusageFromBillingUsage
(usage *dto.Usage)
service/billing_usage.go:63
↓ 2 callersFunctionusageFromResponsesUsage
(src *dto.Usage, createBillingSnapshot bool)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp.go:195
↓ 2 callersFunctionusagePromptTokens
(usage *dto.Usage)
service/channel_affinity.go:950
↓ 2 callersMethodusageRatios
(ctx context.Context, models []string, hook string, args ...any)
relay/channel/task/jsplugin/adaptor.go:1650
↓ 2 callersFunctionuseActiveChatKey
(enabled: boolean)
web/src/features/chat/hooks/use-active-chat-key.ts:53
↓ 2 callersFunctionuseApiKeysColumns
(now: number)
web/src/features/keys/components/api-keys-columns.tsx:70
↓ 2 callersFunctionuseChannelBalanceQueryable
( channel: Pick<Channel, 'type' | 'setting'> )
web/src/features/channels/hooks/use-task-plugin-option.ts:85
↓ 2 callersFunctionuseChannelKeyDisclosure
( open: boolean, channelId: number | null )
web/src/features/channels/hooks/use-channel-key-disclosure.ts:30
↓ 2 callersFunctionuseChannelModelFetchable
( channel: Pick<Channel, 'type' | 'setting'> )
web/src/features/channels/hooks/use-task-plugin-option.ts:65
↓ 2 callersFunctionuseChannelsColumns
( options: { enableSelection?: boolean } = {} )
web/src/features/channels/components/channels-columns.tsx:672
↓ 2 callersFunctionuseChart
()
web/src/components/ui/chart.tsx:48
↓ 2 callersFunctionuseComboboxAnchor
()
web/src/components/ui/combobox.tsx:471
↓ 2 callersFunctionuseControllableState
({ prop, defaultProp, onChange, }: { prop?: T | undefined defaultProp?: T | undefined onChange?: (
web/src/lib/use-controllable-state.ts:46
↓ 2 callersMethoduseCredentialLine
useCredentialLine switches the request to a refreshed credential line, also for the error handling that finds the key by its line.
relay/channel/providerplugin/adaptor.go:569
↓ 2 callersFunctionuseDataTableViewMode
( options: UseDataTableViewModeOptions = {} )
web/src/components/data-table/hooks/use-data-table-view-mode.ts:67
↓ 2 callersFunctionuseDebouncedColumnFilter
({ columnFilters, columnId, onColumnFiltersChange, delay = 500, }: UseDebouncedColumnFilterOptions)
web/src/components/data-table/hooks/use-debounced-column-filter.ts:31
↓ 2 callersFunctionuseDialogs
()
web/src/hooks/use-dialog.ts:131
↓ 2 callersFunctionuseDirection
()
web/src/context/direction-provider.tsx:74
↓ 2 callersFunctionuseFilters
(models: PricingModel[], modelOrder?: ModelOrder)
web/src/features/pricing/hooks/use-filters.ts:56
↓ 2 callersFunctionuseIndependentAuthSessionRedis
(t *testing.T)
service/auth_session_test.go:65
↓ 2 callersFunctionuseIsSidebarModuleVisible
(url: string)
web/src/hooks/use-sidebar-config.ts:322
↓ 2 callersFunctionuseLogExportDatabases
(t *testing.T, mainDB *gorm.DB, logDB *gorm.DB, mainType common.DatabaseType, logType common.DatabaseType)
controller/log_export_test.go:69
↓ 2 callersFunctionuseModelPricingIssues
()
web/src/features/system-settings/models/pricing-issues.ts:64
↓ 2 callersFunctionuseNodeSync
(topics?: string[])
web/src/features/system-info/hooks/use-node-sync.ts:36
↓ 2 callersFunctionuseNotifications
()
web/src/hooks/use-notifications.ts:66
↓ 2 callersFunctionuseOAuthLogin
( status: SystemStatus | null, redirectTo?: string )
web/src/features/auth/hooks/use-oauth-login.ts:41
↓ 2 callersFunctionuseOptionalPromptInputController
()
web/src/components/ai-elements/prompt-input.tsx:141
↓ 2 callersFunctionusePlan
()
web/src/components/ai-elements/plan.tsx:50
↓ 2 callersFunctionusePortalContainer
()
web/src/components/ui/portal-container.ts:31
↓ 2 callersFunctionusePricingColumns
( options: PricingColumnsOptions = {} )
web/src/features/pricing/components/pricing-columns.tsx:43
↓ 2 callersFunctionuseProfile
()
web/src/features/profile/hooks/use-profile.ts:36
↓ 2 callersFunctionuseRedirectPanelPlacement
( anchorRef: RefObject<HTMLElement | null>, enabled: boolean, sheetSide: 'left' | 'right' )
web/src/features/channels/hooks/use-redirect-panel-placement.ts:38
↓ 2 callersFunctionuseSaveModelPricing
()
web/src/features/model-pricing/api.ts:169
↓ 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:274
↓ 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:560
↓ 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:499
↓ 2 callersFunctionvalidateLikePattern
(input string)
model/token.go:138
↓ 2 callersFunctionvalidateLocalizedText
(text LocalizedText, name string, maxRunes int)
pluginkit/meta.go:2156
← previousnext →4,901–5,000 of 15,592, ranked by callers