Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
9,195 in github.com/QuantumNous/new-api
⨍
Functions
9,195
◇
Types & classes
1,481
↓ 2 callers
Function
noteTaskQuotaClamp
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 callers
Function
notifySystemTaskRunner
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 callers
Function
ollamaChatHandler
non-stream handler for chat/generate
relay/channel/ollama/stream.go:206
↓ 2 callers
Function
ollamaToolCallsToOpenAI
(toolCalls []OllamaToolCall, startIndex int, includeIndex bool)
relay/channel/ollama/stream.go:45
↓ 2 callers
Function
onPaginationChange
(updater)
web/src/hooks/use-table-url-state.ts:169
↓ 2 callers
Function
onSubmit
(data: z.infer<typeof otpFormSchema>)
web/src/features/auth/otp/components/otp-form.tsx:80
↓ 2 callers
Function
openAIBillingUsageFromUsage
(usage *dto.Usage)
service/relayconvert/internal/oai_chat/to_gemini_chat_resp.go:218
↓ 2 callers
Function
openAIChatToOllamaChat
(c *gin.Context, r *dto.GeneralOpenAIRequest)
relay/channel/ollama/relay-ollama.go:22
↓ 2 callers
Function
openTokenControllerExternalDB
(t *testing.T, dialect string, dsn string)
controller/token_test.go:115
↓ 2 callers
Function
openTokenControllerTestDB
(t *testing.T)
controller/token_test.go:74
↓ 2 callers
Function
orderCardCells
( cells: Cell<TData, unknown>[] )
web/src/components/data-table/layout/card-row-content.tsx:26
↓ 2 callers
Method
outputStatus
()
service/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:363
↓ 2 callers
Function
parseAdvancedCustomRouteModels
(value: string)
web/src/features/channels/lib/advanced-custom.ts:510
↓ 2 callers
Function
parseAudio
(audioBase64 string, format string)
service/audio.go:9
↓ 2 callers
Function
parseAuthClaims
(raw, expectedUse string, key []byte)
service/auth_token.go:194
↓ 2 callers
Function
parseBoundary
parseBoundary extracts the multipart boundary from the Content-Type header using mime.ParseMediaType
common/gin.go:361
↓ 2 callers
Function
parseConditionOperations
(raw interface{})
relay/common/override.go:1907
↓ 2 callers
Function
parseFlowQuotaTimeRange
(c *gin.Context)
controller/usedata.go:13
↓ 2 callers
Function
parseHEIFDimensions
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 callers
Function
parseHeaderNavBoolean
( raw: unknown, fallback: boolean )
web/src/lib/nav-modules.ts:57
↓ 2 callers
Function
parseHeaderNavModulesFromStatus
( status: Record<string, unknown> | null )
web/src/lib/nav-modules.ts:139
↓ 2 callers
Function
parseHeaderReplacementTokens
(value interface{})
relay/common/override.go:1192
↓ 2 callers
Function
parseJsonRows
(json: string)
web/src/components/json-editor.tsx:46
↓ 2 callers
Function
parseModelTags
(tags: string | undefined)
web/src/features/models/lib/model-utils.ts:66
↓ 2 callers
Function
parseModelsList
(models: string)
web/src/features/channels/lib/channel-utils.ts:223
↓ 2 callers
Function
parseNestedRatioMap
( value: string )
web/src/features/system-settings/models/group-ratio-visual-editor.tsx:126
↓ 2 callers
Function
parseOpenAIModelIDs
(body []byte)
controller/channel_upstream_update.go:265
↓ 2 callers
Function
parseProxyURL
(rawProxyURL string, allowLegacySuffix bool)
common/proxy_url.go:23
↓ 2 callers
Function
parseSidebarConfig
* Parse backend SidebarModulesAdmin configuration
web/src/hooks/use-sidebar-config.ts:124
↓ 2 callers
Function
parseStatusCodeKey
(rawKey: string)
web/src/features/channels/lib/status-code-risk-guard.ts:21
↓ 2 callers
Function
parseStatusCodeMappingTarget
(rawValue: unknown)
web/src/features/channels/lib/status-code-risk-guard.ts:27
↓ 2 callers
Function
parseStatusFilter
(statusParam string)
controller/channel.go:56
↓ 2 callers
Function
parseStringItems
(items: PrefillGroup['items'])
web/src/features/models/components/prefill-group-shared.ts:69
↓ 2 callers
Function
parseTaskData
(data: unknown)
web/src/features/usage-logs/components/columns/task-logs-columns.tsx:46
↓ 2 callers
Function
parseTelegramBindCallback
( search: TelegramBindCallbackSearch )
web/src/features/auth/lib/oauth-bind-window.ts:56
↓ 2 callers
Function
parseToolPrice
(value: string)
web/src/features/system-settings/models/tool-price-settings.tsx:53
↓ 2 callers
Function
parseUpstreamUpdateMeta
(settings: unknown)
web/src/features/channels/lib/upstream-update-utils.ts:27
↓ 2 callers
Function
parseUserSidebarConfig
* 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 callers
Function
parseVolcengineAuth
(apiKey string)
relay/channel/volcengine/tts.go:110
↓ 2 callers
Function
parseWaffoPayMethods
(value: string)
web/src/features/system-settings/integrations/payment-settings-section.tsx:207
↓ 2 callers
Function
patchGeminiZeroCompletionUsage
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 callers
Function
pickTelegramAuthorization
( value: unknown )
web/src/features/auth/lib/telegram-login.ts:40
↓ 2 callers
Function
policyEffect
(policy []string)
service/authz/resolver.go:78
↓ 2 callers
Function
postTelegramBindResult
( callback: TelegramBindCallback, opener: Pick<Window, 'closed' | 'postMessage'> | null, targetOrigin: s
web/src/features/auth/lib/oauth-bind-window.ts:79
↓ 2 callers
Method
prefix
()
pkg/cachex/namespace.go:8
↓ 2 callers
Function
prepareCredentialRequestOptions
( payload: any )
web/src/lib/passkey.ts:153
↓ 2 callers
Method
prepareForInsert
(tx *gorm.DB)
model/user.go:540
↓ 2 callers
Function
priceToUnitCost
(price: number | string)
web/src/features/system-settings/models/tiered-pricing-editor.tsx:320
↓ 2 callers
Function
pricingEndpointTypesFromPricing
(pricings []Pricing)
model/pricing_endpoint_test.go:73
↓ 2 callers
Function
processChartData
( data: QuotaDataItem[], timeGranularity: TimeGranularity = 'day', t?: TFunction, chartCornerRadius?:
web/src/features/dashboard/lib/charts.ts:70
↓ 2 callers
Function
processFormMap
(formMap map[string]any, v any)
common/gin.go:293
↓ 2 callers
Function
providerParams
providerParams returns map with Provider key for i18n templates
controller/oauth.go:33
↓ 2 callers
Function
publishAuthSessionEvent
( kind: AuthSessionSyncEvent['kind'], sid: string )
web/src/lib/auth-session-sync.ts:53
↓ 2 callers
Function
queueSearchValue
(value: string)
web/src/components/data-table/toolbar/toolbar.tsx:218
↓ 2 callers
Function
randomIdentifier
()
web/src/lib/auth-session-sync.ts:30
↓ 2 callers
Function
rankingBucketLabel
(bucket int64, config rankingPeriodConfig)
service/rankings.go:529
↓ 2 callers
Function
rankingBucketTs
(bucket int64)
service/rankings.go:525
↓ 2 callers
Function
rankingGrowthPct
(current int64, previous int64)
service/rankings.go:564
↓ 2 callers
Function
ratioToPrice
(ratio?: string, denominator?: string)
web/src/features/system-settings/models/model-pricing-snapshots.ts:76
↓ 2 callers
Function
readStoredValue
(key: string)
web/src/features/playground/lib/storage/storage.ts:49
↓ 2 callers
Method
reasoningDelta
(delta string)
service/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:195
↓ 2 callers
Method
reasoningOutput
(status string)
service/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:394
↓ 2 callers
Method
recordOperation
(mode, path, from, to string, value interface{})
relay/common/override.go:243
↓ 2 callers
Function
recordRedisRequest
记录Redis请求
middleware/model-rate-limit.go:66
↓ 2 callers
Function
recordSubscriptionResetUserLogs
(result *model.SubscriptionResetResult, adminInfo map[string]interface{})
controller/subscription.go:410
↓ 2 callers
Function
recordUserSecurityAudit
recordUserSecurityAudit 记录普通用户自己的安全敏感操作(如 passkey 绑定/解绑)。 这类日志没有管理员操作者,不写 admin_info;同时不依赖 AdminAuth/RootAuth 的兜底。
controller/audit.go:113
↓ 2 callers
Function
redisBucketKey
(key bucketKey)
pkg/perf_metrics/metrics.go:426
↓ 2 callers
Function
redisUserRateLimitKey
(mark string, userID int)
middleware/rate-limit.go:48
↓ 2 callers
Function
register
(payload: RegisterPayload)
web/src/features/auth/api.ts:184
↓ 2 callers
Function
registerChannelRoutes
(apiRouter *gin.RouterGroup)
router/channel-router.go:19
↓ 2 callers
Function
registeredSystemTaskHandlers
()
service/system_task.go:66
↓ 2 callers
Function
removeTag
(tagToRemove: string)
web/src/components/tag-input.tsx:55
↓ 2 callers
Function
renderAuditContent
( other: LogOtherData | null | undefined, t: (key: string, opts?: Record<string, unknown>) => string )
web/src/features/usage-logs/lib/format.ts:460
↓ 2 callers
Function
renderCellContent
( cell: Cell<TData, unknown> )
web/src/components/data-table/layout/card-cell-utils.ts:39
↓ 2 callers
Function
renderMath
(source: string, displayMode: boolean)
web/src/components/ui/markdown.tsx:183
↓ 2 callers
Function
renderTableBody
( props: DataTableViewProps<TData>, rows: Row<TData>[], colSpan: number, getColumnClassName: DataTable
web/src/components/data-table/core/data-table-view.tsx:248
↓ 2 callers
Function
replaceBackupCodesWithTx
(tx *gorm.DB, userId int, codes []string)
model/twofa.go:199
↓ 2 callers
Function
requestPaymentAmount
( topupAmount: number, paymentType: string, calculators: PaymentAmountCalculators = defaultPaymentAmount
web/src/features/wallet/hooks/use-payment.ts:60
↓ 2 callers
Function
requireOrderedSubstrings
(t *testing.T, s string, parts ...string)
relay/channel/openai/chat_via_responses_test.go:171
↓ 2 callers
Function
requirePasskeyRegistrationVerification
(c *gin.Context, userID int)
controller/passkey.go:669
↓ 2 callers
Function
requireSuccessfulFlowRows
( response: FlowResponse, fallbackMessage: string )
web/src/features/dashboard/lib/flow-selection.ts:32
↓ 2 callers
Function
resetUserSubscriptionTx
(tx *gorm.DB, sub *UserSubscription, plan *SubscriptionPlan, now int64, advanceResetTime bool)
model/subscription.go:1002
↓ 2 callers
Function
resolveAdvanceResetTime
(value *bool)
controller/subscription.go:403
↓ 2 callers
Function
resolveLegacyRoute
(rawHref: string)
web/src/lib/legacy-route.ts:66
↓ 2 callers
Function
resolveOAuthSiteUrl
( serverAddress: string, fallback: string )
web/src/features/system-settings/auth/oauth-callback-url.ts:19
↓ 2 callers
Function
resolveOllamaBaseUrl
(channel: Channel | null)
web/src/features/channels/lib/ollama-utils.ts:66
↓ 2 callers
Function
resolveRateLimitWindows
(data: RateLimitSource | null)
web/src/features/channels/components/dialogs/codex-usage-dialog.tsx:298
↓ 2 callers
Function
resolveSidebarView
(pathname: string)
web/src/components/layout/lib/sidebar-view-registry.ts:41
↓ 2 callers
Function
resolveUserSortOptions
(sortOptions []UserSortOptions)
model/user.go:70
↓ 2 callers
Function
respPtr
(value T)
service/relayconvert/response_registry_test.go:671
↓ 2 callers
Function
respondTaskError
respondTaskError 统一输出 Task 错误响应(含 429 限流提示改写)
controller/relay.go:611
↓ 2 callers
Function
responseGeminiChat2OpenAI
(c *gin.Context, response *dto.GeminiChatResponse)
relay/channel/gemini/relay-gemini.go:118
↓ 2 callers
Function
responseStreamEventItemID
(event *dto.ResponsesStreamResponse)
service/relayconvert/internal/oai_responses/to_oai_chat_resp.go:254
↓ 2 callers
Function
responseStreamResults
(state *ResponseStreamState, values []any, usage *dto.Usage)
service/relayconvert/response_registry.go:600
↓ 2 callers
Function
responsesArgumentsString
(value any)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:499
↓ 2 callers
Function
responsesPartPayload
(part map[string]any, key string)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:473
↓ 2 callers
Function
responsesRequestTextToChatResponseFormat
(raw json.RawMessage)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:392
↓ 2 callers
Function
responsesRequestToolChoiceToChat
(raw json.RawMessage)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:358
↓ 2 callers
Function
revokeUserSessions
(userID int, excludedSID, reason string)
model/user_session.go:712
↓ 2 callers
Function
roleBaselineAllows
(e *casbin.SyncedEnforcer, roleKey string, permission Permission)
service/authz/resolver.go:53
← previous
next →
2,001–2,100 of 9,195, ranked by callers