Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
10,934 in github.com/QuantumNous/new-api
⨍
Functions
10,934
◇
Types & classes
1,622
↓ 6 callers
Method
ResolvedPin
ResolvedPin returns the winning pin after priority resolution. Lowest Rank wins. Pins that name the same channel are merged (stricter RetryMode). over
dto/channel_constraints.go:72
↓ 6 callers
Function
SanitizeURLForLog
(rawURL string)
relay/common/relay_utils.go:40
↓ 6 callers
Function
SettleMidjourneyTaskBilling
SettleMidjourneyTaskBilling charges a persisted legacy task and records the applied stages.
service/midjourney.go:64
↓ 6 callers
Method
SetupRequestHeader
(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo)
relay/channel/adapter.go:21
↓ 6 callers
Function
TaskErrorWrapper
(err error, code string, statusCode int)
service/error.go:200
↓ 6 callers
Method
ToBaseUser
()
model/user.go:115
↓ 6 callers
Function
UpdateAutoGroupsByJsonString
(jsonString string)
setting/auto_group.go:34
↓ 6 callers
Function
UpdateConfigFromMap
UpdateConfigFromMap 从map更新配置对象(导出函数)
setting/config/config.go:281
↓ 6 callers
Function
UpdateGroupRatioByJSONString
(jsonStr string)
setting/ratio_setting/group_ratio.go:75
↓ 6 callers
Function
UpdateOption
(c *gin.Context)
controller/option.go:128
↓ 6 callers
Function
UpdateVideoTasks
UpdateVideoTasks 按渠道更新所有视频任务
service/task_polling.go:340
↓ 6 callers
Function
UpstreamModelName
UpstreamModelName / ChannelTypeOf are nil-safe accessors for optional Meta values (converters are often called with a nil Meta in tests and compat shi
relaykit/relayconvert/convmeta/meta.go:195
↓ 6 callers
Function
UsageFromChatUsage
(src *dto.Usage)
relaykit/relayconvert/response_compat.go:91
↓ 6 callers
Method
ValidateNetworkTarget
ValidateNetworkTarget validates the host and port before dialing.
common/ssrf_protection.go:290
↓ 6 callers
Function
ValidateWalletQuota
ValidateWalletQuota enforces the upper bound shared by wallet mutations. Negative balances remain valid because billing can temporarily overdraw a wal
common/quota_math.go:22
↓ 6 callers
Method
acquire
( pluginKey string, userID int, tokenID int, )
controller/plugin_protocol_limiter.go:65
↓ 6 callers
Function
applyOriginTaskIntent
(c *gin.Context, intent map[string]any, meta pluginruntime.Meta)
middleware/task_plugin.go:1022
↓ 6 callers
Function
clearAuthentication
( synchronizeTabs = true, bootstrapState: AuthBootstrapState = 'complete' )
web/src/lib/auth-session.ts:185
↓ 6 callers
Function
combineBillingExpr
( baseExpr: string, requestRuleExpr: string )
web/src/features/pricing/lib/billing-expr.ts:933
↓ 6 callers
Function
convert
(value any, target any)
relay/channel/task/jsplugin/adaptor.go:1388
↓ 6 callers
Function
createEpayTestOrder
(t *testing.T, userId int, tradeNo string, provider string, status string)
model/payment_method_guard_test.go:177
↓ 6 callers
Function
createOAuthFlow
( provider: string, intent: 'login' | 'bind' )
web/src/features/auth/api.ts:167
↓ 6 callers
Function
fetchLogs
( endpoint: string, params: T, isAdmin: boolean )
web/src/features/usage-logs/api.ts:42
↓ 6 callers
Function
formatBillingCurrencyFromUSD
( amountUSD: number | null | undefined, options?: CurrencyFormatOptions )
web/src/lib/currency.ts:471
↓ 6 callers
Function
formatNumber
( value: number | null | undefined, locales?: Intl.LocalesArgument )
web/src/lib/format.ts:32
↓ 6 callers
Function
formatPricingNumber
(value: unknown)
web/src/features/system-settings/models/pricing-format.ts:55
↓ 6 callers
Function
formatTokens
(value: number)
web/src/features/rankings/lib/format.ts:24
↓ 6 callers
Function
formatUptimePct
(pct: number)
web/src/features/performance-metrics/lib/format.ts:31
↓ 6 callers
Function
getAuthenticatedUser
(c *gin.Context)
controller/passkey.go:654
↓ 6 callers
Function
getCookie
(name: string)
web/src/lib/cookies.ts:29
↓ 6 callers
Function
getCurrentVersion
(message: Message)
web/src/features/playground/lib/message/message-utils.ts:42
↓ 6 callers
Function
getRouteIncomingPath
(route: AdvancedCustomRoute)
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:163
↓ 6 callers
Function
getSuccessRateTextClass
(rate: number)
web/src/features/performance-metrics/lib/format.ts:88
↓ 6 callers
Function
handleLoginSuccess
( bundle: AuthBundle, redirectTo?: string )
web/src/features/auth/hooks/use-auth-redirect.ts:40
↓ 6 callers
Function
hasTaskUsageSchema
(model: PricingModel)
web/src/features/pricing/lib/dynamic-price.ts:134
↓ 6 callers
Function
hashStringToSeed
(input: string)
web/src/features/pricing/lib/seed.ts:30
↓ 6 callers
Function
initDefaultHTTPClientFixture
(t *testing.T)
service/http_client_transport_test.go:36
↓ 6 callers
Function
isApiSuccess
(response: ApiResponse)
web/src/features/wallet/api.ts:51
↓ 6 callers
Function
isTokenBasedModel
(model: PricingModel)
web/src/features/pricing/lib/model-helpers.ts:107
↓ 6 callers
Function
isValidOtherRatio
(ratio float64)
types/price_data.go:106
↓ 6 callers
Function
mustStreamChunks
(t *testing.T, state *ResponsesToChatStreamState, event *dto.ResponsesStreamResponse)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp_test.go:443
↓ 6 callers
Function
mustUnmarshalFixture
(raw string, out any)
relaykit/relayconvert/golden_test.go:471
↓ 6 callers
Function
newAdvancedCustomModelListChannel
(baseURL string, key string, upstreamPath string, auth *dto.AdvancedCustomRouteAuth)
controller/channel_upstream_update_test.go:20
↓ 6 callers
Function
newAuthenticatedContext
(t *testing.T, method string, target string, body any, userID int)
controller/token_test.go:184
↓ 6 callers
Function
newClientIPRouter
()
middleware/trusted_proxies_test.go:24
↓ 6 callers
Function
newFakeSMTPServerWithSTARTTLSAdvertisement
(t *testing.T, advertiseSTARTTLS bool)
common/email_test.go:39
↓ 6 callers
Function
normalizeJsonString
(value: string)
web/src/features/system-settings/models/utils.ts:32
↓ 6 callers
Function
normalizeModelName
(model: string)
web/src/features/channels/lib/model-mapping-validation.ts:45
↓ 6 callers
Function
noteQuotaClamp
noteQuotaClamp records the first quota saturation event onto relayInfo so it can later be attached to the consume/task log for admin auditing. First n
service/text_quota.go:194
↓ 6 callers
Function
parseLogOther
(other: string)
web/src/features/usage-logs/lib/format.ts:159
↓ 6 callers
Function
parseTags
(tagsString?: string)
web/src/features/pricing/lib/filters.ts:170
↓ 6 callers
Function
parseTaskTiersFromExpr
( exprStr: string, schema: BillingUsageSchema | null | undefined )
web/src/features/pricing/lib/billing-expr.ts:555
↓ 6 callers
Function
paymentReturnPath
(suffix string)
controller/return_path.go:9
↓ 6 callers
Function
pluginMapKeys
(plugins map[string]*LoadedPlugin)
pkg/jsplugin/registry.go:913
↓ 6 callers
Function
pricingEndpointAdvancedCustomConfig
(routes ...dto.AdvancedCustomRoute)
model/pricing_endpoint_test.go:59
↓ 6 callers
Function
pricingEndpointTypesByModel
(t *testing.T)
model/pricing_endpoint_test.go:67
↓ 6 callers
Function
proxyTaskMedia
(c *gin.Context, task *model.Task, descriptor *relaychannel.TaskContentRequest)
controller/video_proxy.go:132
↓ 6 callers
Function
redisFixedWindowTake
(ctx context.Context, key string, maxRequestNum int, duration int64)
middleware/rate-limit.go:65
↓ 6 callers
Function
refreshSubscriptionUserGroupCache
(userId int, operation string)
model/subscription.go:560
↓ 6 callers
Function
rejectInvalidTopUpQuota
(c *gin.Context, userId int, amount int64)
controller/topup.go:258
↓ 6 callers
Function
requestContextDone
(c *gin.Context)
relay/helper/common.go:41
↓ 6 callers
Function
requireOptionValue
(t *testing.T, db *gorm.DB, key string)
model/frontend_option_migration_test.go:30
↓ 6 callers
Function
resetSession
()
web/src/features/auth/hooks/use-oauth-login.ts:62
↓ 6 callers
Function
responsesStreamEvent
(eventType string, payload dto.ResponsesStreamResponse)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp.go:222
↓ 6 callers
Function
seedPollingTask
(t *testing.T, channelID int, publicID string, upstreamID string)
service/task_polling_test.go:172
↓ 6 callers
Function
seedToken
(t *testing.T, db *gorm.DB, userID int, name string, rawKey string)
controller/token_test.go:163
↓ 6 callers
Function
seededRandom
(seed: number)
web/src/features/pricing/lib/seed.ts:39
↓ 6 callers
Function
setCookie
( name: string, value: string, maxAge: number = DEFAULT_MAX_AGE )
web/src/lib/cookies.ts:44
↓ 6 callers
Function
taskBillingOther
taskBillingOther 从 task 的 BillingContext 构建日志 Other 字段。
service/task_billing.go:137
↓ 6 callers
Function
tasksToDto
(tasks []*model.Task, fillUser bool, viewerRole int)
controller/task.go:397
↓ 6 callers
Function
toIntlLocale
(value?: string | null)
web/src/i18n/languages.ts:86
↓ 6 callers
Function
trimmed
(value)
plugins/tasks/sunoapi/plugin.js:33
↓ 6 callers
Function
updateCurrentVersionContent
( message: Message, content: string )
web/src/features/playground/lib/message/message-utils.ts:63
↓ 6 callers
Function
updateOptionMap
(key string, value string)
model/option.go:288
↓ 6 callers
Function
useChartTheme
()
web/src/lib/use-chart-theme.ts:32
↓ 6 callers
Function
useDialogState
( initialState: T | null = null )
web/src/hooks/use-dialog.ts:97
↓ 6 callers
Function
useFrontendOptionMigrationDB
(t *testing.T)
model/frontend_option_migration_test.go:14
↓ 6 callers
Function
useOpenInContext
()
web/src/components/ai-elements/open-in-chat.tsx:206
↓ 6 callers
Function
useRedemptions
()
web/src/features/redemption-codes/components/redemptions-provider.tsx:66
↓ 6 callers
Function
useResetForm
( form: UseFormReturn<TFieldValues>, values: DefaultValues<TFieldValues> | undefined )
web/src/features/system-settings/hooks/use-reset-form.ts:27
↓ 6 callers
Function
useUsers
()
web/src/features/users/components/users-provider.tsx:60
↓ 6 callers
Function
userSessionCacheDeadline
()
model/user_session.go:129
↓ 6 callers
Function
validateChannel
validateChannel 通用的渠道校验函数
controller/channel.go:475
↓ 6 callers
Function
withRelayHTTPTransportSettings
(t *testing.T)
service/http_client_transport_test.go:21
↓ 6 callers
Function
writeTaskArtifactError
(c *gin.Context, status int, code, message string)
controller/task.go:259
↓ 5 callers
Method
Apply
(query *gorm.DB)
model/channel.go:104
↓ 5 callers
Function
ApplyChannelAffinityOverrideTemplate
ApplyChannelAffinityOverrideTemplate merges per-rule channel override templates onto the selected channel override config.
service/channel_affinity.go:533
↓ 5 callers
Function
AutoGroups2JsonString
()
setting/auto_group.go:39
↓ 5 callers
Method
BuildContentRequest
(task *model.Task, artifactKey string, clientRequest TaskArtifactClientRequest)
relay/channel/adapter.go:116
↓ 5 callers
Method
CallMember
CallMember invokes a function stored on an exported object, such as a renderer in the renderers export.
pkg/jsplugin/engine.go:307
↓ 5 callers
Method
CallPathWithAdmissionTimeout
CallPathWithAdmissionTimeout gives long-lived observers a separate bound for waiting on JavaScript capacity. Once admitted, the hook receives the engi
pkg/jsplugin/engine.go:321
↓ 5 callers
Function
Capabilities
Capabilities returns the full resource/action matrix the subject is allowed.
service/authz/resolver.go:38
↓ 5 callers
Function
ChatCompletionsRequestToResponsesRequest
(req *dto.GeneralOpenAIRequest)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_req.go:76
↓ 5 callers
Function
CommonClaudeHeadersOperation
(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo)
relay/channel/claude/adaptor.go:74
↓ 5 callers
Function
CompileFromCache
CompileFromCache compiles an expression string, using a cached program when available. The cache is keyed by the SHA-256 hex digest of the expression.
pkg/billingexpr/compile.go:164
↓ 5 callers
Function
ComputeTieredQuotaWithRequest
(snap *BillingSnapshot, params TokenParams, request RequestInput)
pkg/billingexpr/settle.go:24
↓ 5 callers
Method
ConvertImageRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.ImageRequest)
relay/channel/adapter.go:26
↓ 5 callers
Method
ConvertOpenAIResponsesRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.OpenAIResponsesRequest)
relay/channel/adapter.go:27
↓ 5 callers
Function
ConvertRequestByID
(c context.Context, info convmeta.Meta, converter string, request any)
relaykit/relayconvert/request_registry.go:214
↓ 5 callers
Function
ConvertStreamResponse
(c context.Context, info convmeta.Meta, target types.RelayFormat, response any)
relaykit/relayconvert/response_registry.go:247
← previous
next →
601–700 of 10,934, ranked by callers