Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
15,592 in github.com/QuantumNous/new-api
⨍
Functions
15,592
◇
Types & classes
2,267
↓ 3 callers
Function
taskModelName
taskModelName 从 BillingContext 或 Properties 中获取模型名称。
service/task_billing.go:257
↓ 3 callers
Function
taskPluginControllerModelSource
taskPluginControllerModelSource is a task plugin with one model; two plugins whose model names differ only in case conflict.
controller/task_plugin_test.go:64
↓ 3 callers
Function
taskPluginHookDetail
(err error)
middleware/task_plugin.go:1747
↓ 3 callers
Function
taskPluginOptionsHasKey
(t *testing.T, key string)
controller/task_plugin_test.go:203
↓ 3 callers
Function
taskPluginProtocolRendererContext
( request pluginruntime.ProtocolRequestContext, pinned pluginruntime.PinnedEndpoint, task *model.Task, art
controller/plugin_protocol.go:1177
↓ 3 callers
Function
taskPluginRoutingDebugReason
(message string)
pkg/jsplugin/registry.go:454
↓ 3 callers
Function
taskPluginSkippedRoutes
taskPluginSkippedRoutes lists, as "METHOD /path", the declared top-level routes the gateway does not register for the plugin version serving key; the
controller/task_plugin.go:461
↓ 3 callers
Function
taskSubmissionAPIError
taskSubmissionAPIError adapts a task error for the shared relay error paths. TaskError.Error is nil for many local rejections, so fall back to the mes
controller/relay.go:974
↓ 3 callers
Function
terminalTestGeminiChunk
(text string, finishReason string, toolCall bool)
relaykit/relayconvert/terminal_stream_test.go:333
↓ 3 callers
Function
textContent
(text string)
relay/requestplugin/pdf_test.go:101
↓ 3 callers
Function
textFormat
textFormat is the format the host reads text from for a file of mime and filename: text, docx or pdf; "" for any other file.
relay/requestplugin/attachments.go:103
↓ 3 callers
Function
textRequestViaResponses
(c *gin.Context, info *relaycommon.RelayInfo, adaptor channel.Adaptor, request any)
relay/chat_completions_via_responses.go:76
↓ 3 callers
Function
thrownAt
thrownAt is the frame an Error was thrown from, as " at fn (file:line:col)", for host logs; it is empty for thrown values that are not Errors and for
pluginkit/engine.go:630
↓ 3 callers
Function
timeCondition
(overrides: Partial<TimeCondition> = {})
web/src/features/pricing/lib/__tests__/time-rule-expr.test.ts:33
↓ 3 callers
Function
toBoolean
(value: unknown, fallback: boolean)
web/src/features/system-settings/maintenance/config.ts:88
↓ 3 callers
Function
toInputValue
(date?: Date)
web/src/features/usage-logs/components/compact-date-time-range-picker.tsx:40
↓ 3 callers
Method
toMap
()
model/log_other.go:154
↓ 3 callers
Function
toastPluginChange
( title: string, issues: ModelPricingIssue[] | null | undefined )
web/src/features/task-plugins/lib/plugin-change-toast.tsx:29
↓ 3 callers
Method
touchEntry
touchEntry returns the key's bucket, creating it on demand, and marks it as the most recently active key. The caller must hold the mutex.
common/rate-limit.go:135
↓ 3 callers
Method
transformHookContext
transformHookContext is the ctx argument of a stage, reply or report hook.
pluginkit/transform.go:365
↓ 3 callers
Function
trimmed
(value)
plugins/tasks/google/plugin.js:49
↓ 3 callers
Function
truncateRunes
(text string, limit int)
pluginkit/provider.go:1462
↓ 3 callers
Function
tryParseTaskMatrixConfig
( expression: string | null | undefined, schema: BillingUsageSchema )
web/src/features/pricing/lib/task-expr.ts:191
↓ 3 callers
Function
tryParseTimeCondition
(expr: string)
web/src/features/pricing/lib/billing-expr.ts:402
↓ 3 callers
Function
tryRealtimeFetch
tryRealtimeFetch 尝试从上游实时拉取 Gemini/Vertex 任务状态。 仅当渠道类型为 Gemini 或 Vertex 时触发;其他渠道或出错时返回 nil。 当非 OpenAI Video API 时,还会构建自定义格式的响应体。
relay/relay_task.go:561
↓ 3 callers
Function
uniqueChannelIDs
(channelIDs []int)
pkg/wsmanager/wsmanager.go:218
↓ 3 callers
Function
unmarshalJSONString
(data string, v any)
pluginkit/json.go:22
↓ 3 callers
Function
unwrapStoredValue
(value: unknown)
web/src/features/playground/lib/storage/storage.ts:83
↓ 3 callers
Function
updateRow
(index: number, patch: Partial<MarketplaceSource>)
web/src/features/task-plugins/components/marketplace-sources-dialog.tsx:92
↓ 3 callers
Method
updateUsageState
()
model/twofa.go:65
↓ 3 callers
Function
updateVideoSingleTask
(ctx context.Context, adaptor TaskPollingAdaptor, ch *model.Channel, taskId string, taskM map[string]*model.Ta
service/task_polling.go:556
↓ 3 callers
Function
usageNumber
(value any)
relay/channel/task/jsplugin/adaptor.go:1832
↓ 3 callers
Function
useApiInfo
()
web/src/features/dashboard/hooks/use-status-data.ts:40
↓ 3 callers
Function
useCanBindTaskPlugins
Whether the user may read the plugin options, which only binding needs.
web/src/features/channels/hooks/use-task-plugin-option.ts:35
↓ 3 callers
Function
useCarouselApi
()
web/src/components/ai-elements/inline-citation.tsx:115
↓ 3 callers
Function
useChannelUpstreamUpdates
(refresh: () => Promise<void>)
web/src/features/channels/hooks/use-channel-upstream-updates.ts:52
↓ 3 callers
Function
useInvalidateOnSuccess
()
web/src/features/system-settings/auth/custom-oauth/hooks/use-custom-oauth-mutations.ts:33
↓ 3 callers
Function
useSettingsForm
({ onSubmit, compareValues, defaultValues, ...formOptions }: SettingsFormOptions<T>)
web/src/features/system-settings/hooks/use-settings-form.ts:185
↓ 3 callers
Function
useSidebarConfig
(navGroups: NavGroup[])
web/src/hooks/use-sidebar-config.ts:279
↓ 3 callers
Function
useSidebarView
()
web/src/hooks/use-sidebar-view.ts:52
↓ 3 callers
Function
useStatusData
( enabledKey: string, dataKey: string )
web/src/features/dashboard/hooks/use-status-data.ts:26
↓ 3 callers
Function
useSystemOptions
(enabled = true)
web/src/features/system-settings/hooks/use-system-options.ts:25
↓ 3 callers
Function
useTopNavLinks
()
web/src/hooks/use-top-nav-links.ts:46
↓ 3 callers
Function
useTurnstile
()
web/src/features/auth/hooks/use-turnstile.ts:28
↓ 3 callers
Function
useWebPreview
()
web/src/components/ai-elements/web-preview.tsx:57
↓ 3 callers
Function
userAuthFenceTTLSeconds
A pending fence only covers the interval between publishing the next version and the surrounding database transaction reaching a decision. Its TTL mus
model/user_auth_cache.go:42
↓ 3 callers
Function
usesKling4
(ctx, req)
plugins/tasks/kling/plugin.js:295
↓ 3 callers
Function
validateCreditedQuota
(quota decimal.Decimal)
controller/topup.go:247
↓ 3 callers
Function
validateH3Content
(items)
plugins/tasks/hailuo/plugin.js:360
↓ 3 callers
Function
validateJsonString
( value: string, options: JsonValidationOptions = {} )
web/src/features/system-settings/models/utils.ts:145
↓ 3 callers
Function
validateKlingDuration
(value)
plugins/tasks/kling/plugin.js:224
↓ 3 callers
Function
validateTurnstile
()
web/src/features/auth/hooks/use-turnstile.ts:40
↓ 3 callers
Function
validateUsageNumberLimit
(number float64, limit int)
relay/channel/task/jsplugin/adaptor.go:1822
↓ 3 callers
Function
validateVendorMetadata
(tx *gorm.DB, vendor *Vendor)
model/vendor_management.go:52
↓ 3 callers
Function
verify
( input: VerificationInput, operation: VerificationOperation, passwordEncryptionEnabled: boolean, sign
web/src/features/auth/secure-verification/api.ts:202
↓ 3 callers
Function
verifySecurityProof
(raw string, identity AuthIdentity, binding VerificationBinding)
service/auth_token.go:162
↓ 3 callers
Function
viaGateway
(ctx)
plugins/tasks/google/plugin.js:60
↓ 3 callers
Function
viaGateway
(ctx)
plugins/tasks/hailuo/plugin.js:216
↓ 3 callers
Function
videoModel
(identity)
plugins/tasks/xai/plugin.js:146
↓ 3 callers
Function
videoProfile
(ctx)
plugins/tasks/doubao/plugin.js:426
↓ 3 callers
Function
videoRequest
(action, source, identity)
plugins/tasks/xai/plugin.js:271
↓ 3 callers
Function
videoSize
(value)
plugins/tasks/alibaba/plugin.js:825
↓ 3 callers
Function
videoURL
(body)
plugins/tasks/alibaba/plugin.js:1295
↓ 3 callers
Function
videoURL
(data)
plugins/tasks/xai/plugin.js:340
↓ 3 callers
Function
warnLegacyProxyURLOnce
(config *proxyURLConfig)
service/http_client.go:181
↓ 3 callers
Function
wechatLoginByCode
(code: string)
web/src/features/auth/api.ts:227
↓ 3 callers
Function
withClient
(children: React.ReactNode)
web/src/features/usage-logs/components/__tests__/request-plugin-record.test.tsx:147
↓ 3 callers
Function
withNormalizedEmailLock
withNormalizedEmailLock serializes concurrent writers that target the same normalized email inside tx, so a "check then write" sequence cannot be race
model/user.go:371
↓ 3 callers
Function
withTieredBillingConfig
(t *testing.T, modes map[string]string, exprs map[string]string)
controller/model_list_test.go:99
↓ 3 callers
Method
writeClient
(kind int, message []byte)
relay/responses_websocket.go:871
↓ 3 callers
Function
writeDashboardAuthError
(c *gin.Context, err error)
middleware/auth.go:385
↓ 3 callers
Function
writeStoredValue
(baseKey: string, data: T)
web/src/features/playground/lib/storage/storage.ts:95
↓ 3 callers
Function
writeTaskPluginProtocolEvent
(c *gin.Context, event dto.PluginResponsesStreamEvent)
controller/plugin_protocol.go:1219
↓ 3 callers
Function
writeTestCgroupFile
(t *testing.T, path string, content string)
common/system_monitor_test.go:23
↓ 3 callers
Function
writeVideoDataURL
(c *gin.Context, dataURL string)
controller/video_proxy.go:679
↓ 3 callers
Method
xref
xref writes a cross-reference stream of rows as object number and returns its offset. encode, when set, encodes the rows.
relay/requestplugin/pdf_test.go:47
↓ 3 callers
Function
zeroPluginResponsesUsage
()
relay/plugin_protocol.go:1030
↓ 2 callers
Function
ASCIIFold
ASCIIFold is the exported form of asciiFold for consumers outside this package.
pluginkit/model_fold.go:24
↓ 2 callers
Function
AccessTokenRouteRule
AccessTokenRouteRule returns the rule for "METHOD /full/path".
middleware/access_token_routes.go:341
↓ 2 callers
Function
AccessTokenScopeGranted
(scopes []string, scope string)
service/access_token_scope.go:212
↓ 2 callers
Function
AccessTokenVerificationScope
AccessTokenVerificationScope returns the token scope a PAT needs for a verification scope and whether the scope is listed at all.
service/access_token_scope.go:246
↓ 2 callers
Function
ActivateTaskPlugin
(c *gin.Context)
controller/task_plugin.go:665
↓ 2 callers
Function
AdjustUserQuota
(userID, operatorRole int, mode string, value int)
model/user_quota_adjustment.go:25
↓ 2 callers
Method
Allow
(ctx context.Context, key string, opts ...Option)
common/limiter/limiter.go:43
↓ 2 callers
Function
ApiErrorI18n
ApiErrorI18n returns a translated error message based on the user's language preference key is the i18n message key, args is optional template data
common/gin.go:335
↓ 2 callers
Function
AppendResponseModelLogInfo
(relayInfo *relaycommon.RelayInfo, other *model.LogOther)
service/log_info_generate.go:140
↓ 2 callers
Function
AppendTaskPluginAuditInfo
AppendTaskPluginAuditInfo writes role-separated, credential-free plugin provenance into a usage log.
service/task_plugin_audit.go:54
↓ 2 callers
Function
ApplyGeminiThinkingConfigChecked
(geminiRequest *dto.GeminiChatRequest, info convmeta.Meta, oaiRequest ...dto.GeneralOpenAIRequest)
relaykit/relayconvert/request_compat.go:32
↓ 2 callers
Function
ApplyMetadataSync
(updates []MetadataSyncUpdate, upstreamVendors map[string]Vendor)
model/model_metadata_sync.go:158
↓ 2 callers
Method
ApplyOtherRatiosToDecimal
(value decimal.Decimal)
types/price_data.go:97
↓ 2 callers
Function
ApplyVendorOperation
(operation VendorOperation)
model/vendor_management.go:201
↓ 2 callers
Function
AsParamOverrideReturnError
(err error)
relay/common/override.go:125
↓ 2 callers
Function
AttachHostedResponse
(format types.RelayFormat, response any, set HostedResponseSet, options *convmeta.Options)
relaykit/relayconvert/internal/toolconv/response_artifacts.go:76
↓ 2 callers
Function
AudioCompletionRatio2JSONString
()
setting/ratio_setting/model_ratio.go:676
↓ 2 callers
Function
AudioRatio2JSONString
()
setting/ratio_setting/model_ratio.go:668
↓ 2 callers
Function
AutomaticDisableKeywordsToString
()
setting/operation_setting/operation_setting.go:18
↓ 2 callers
Function
AutomaticDisableStatusCodesToString
()
setting/operation_setting/status_code_ranges.go:40
↓ 2 callers
Method
BalanceRoute
BalanceRoute returns the explicitly configured channel-management balance route.
relaykit/dto/channel_settings.go:315
↓ 2 callers
Function
BatchDeleteChannels
(ids []int)
model/channel.go:540
↓ 2 callers
Function
BatchDeleteRedemptions
BatchDeleteRedemptions soft-deletes the selected codes in one statement.
model/redemption.go:243
← previous
next →
3,001–3,100 of 15,592, ranked by callers