Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
11,918 in github.com/QuantumNous/new-api
⨍
Functions
11,918
◇
Types & classes
1,792
↓ 17 callers
Function
cleanup
()
web/src/features/auth/lib/oauth-popup.ts:66
↓ 17 callers
Function
mustCompileRoutingPlugin
(t *testing.T, key string, channelType int, models, metaFields, exports string)
pkg/jsplugin/routing_test.go:1008
↓ 17 callers
Function
pinTaskPluginRoute
(plugin *jsplugin.LoadedPlugin, routeIndex int)
middleware/task_plugin_test.go:1675
↓ 17 callers
Function
semanticLoss
(path string, code string, message string)
relaykit/relayconvert/internal/toolconv/encode.go:1298
↓ 17 callers
Function
setupUserSessionTest
(t *testing.T)
model/user_session_test.go:43
↓ 17 callers
Function
sideDrawerContentClassName
(className?: string)
web/src/components/drawer-layout.ts:24
↓ 17 callers
Function
useDataTable
(options: UseDataTableOptions<TData>)
web/src/components/data-table/hooks/use-data-table.ts:278
↓ 16 callers
Function
ConvertRequest
(c *gin.Context, info *relaycommon.RelayInfo, target types.RelayFormat, request any)
service/request_converter.go:26
↓ 16 callers
Function
ConvertRequest
(c context.Context, info convmeta.Meta, target types.RelayFormat, request any)
relaykit/relayconvert/request_registry.go:155
↓ 16 callers
Function
FinishSystemTask
(taskID string, lockedBy string, status SystemTaskStatus, resultPayload any, errorMessage string)
model/system_task.go:399
↓ 16 callers
Function
GetChannelConstraints
(c *gin.Context)
service/channel_select.go:15
↓ 16 callers
Function
GetQuotaDisplayType
GetQuotaDisplayType 返回额度展示类型
setting/operation_setting/general_setting.go:55
↓ 16 callers
Function
NewLogOther
()
model/log_other.go:44
↓ 16 callers
Function
PinTaskPluginEndpoint
PinTaskPluginEndpoint decides shared-endpoint ownership without executing plugin code. Invalid or unidentifiable ordinary requests deliberately fall t
middleware/task_plugin.go:318
↓ 16 callers
Function
PrepareTaskPluginEndpoint
PrepareTaskPluginEndpoint normalizes a claimed shared request through the deterministic parser pinned before distribution. A shared-model request can
middleware/task_plugin.go:506
↓ 16 callers
Function
PublishUserAuthCache
PublishUserAuthCache refreshes the current database state after a successful auth-sensitive transaction without touching the cached quota field.
model/user_auth_cache.go:229
↓ 16 callers
Function
RelayErrorHandler
(ctx context.Context, resp *http.Response, showBodyWhenFail bool)
service/error.go:87
↓ 16 callers
Function
SetDatabaseTypes
(mainType DatabaseType, logType DatabaseType)
common/database.go:31
↓ 16 callers
Method
SetReasoningEffort
SetReasoningEffort records the effort level a converter derived from a model-name suffix so downstream billing/logging can see it.
relaykit/relayconvert/convmeta/meta.go:30
↓ 16 callers
Method
Snapshot
()
model/task.go:500
↓ 16 callers
Method
String
()
service/http_transport_policy.go:89
↓ 16 callers
Function
countLogs
(t *testing.T)
service/task_billing_test.go:520
↓ 16 callers
Function
getLobeIcon
( iconName: string | undefined | null, size: number = 20 )
web/src/lib/lobe-icon.tsx:82
↓ 16 callers
Function
newPluginRouterTest
( t *testing.T, plugins []*jsplugin.LoadedPlugin, handlers pluginRouteHandlers, )
router/plugin_router_test.go:780
↓ 16 callers
Function
normalizeAdvancedCustomConfig
( config: AdvancedCustomConfig )
web/src/features/channels/lib/advanced-custom.ts:552
↓ 16 callers
Function
pluginProtocolTestOutcome
( info *relaycommon.RelayInfo, pluginKey string, taskID string, _ ...any, )
controller/plugin_protocol_test.go:1498
↓ 16 callers
Function
setupStreamTest
(t *testing.T, body io.Reader)
relay/helper/stream_scanner_test.go:31
↓ 15 callers
Function
ApplyReasoningModelSuffix
ApplyReasoningModelSuffix parses host-private reasoning suffixes from the origin and mapped model names, attaches the resulting intent to RelayInfo, a
relay/helper/reasoning_suffix.go:25
↓ 15 callers
Function
CacheGetChannel
(id int)
model/channel_cache.go:219
↓ 15 callers
Function
Can
Can reports whether the subject may perform the permission. A superuser role short-circuits to allow. Otherwise a per-user override wins, then the uni
service/authz/resolver.go:8
↓ 15 callers
Function
ClaimSystemTask
(id int64, taskType string, runnerID string, lockUntil int64)
model/system_task.go:225
↓ 15 callers
Method
Close
()
common/body_storage.go:214
↓ 15 callers
Function
ConsumeOperationProof
ConsumeOperationProof accepts a proof at most once. The consumption commits before the caller performs its action; an action failure must not restore
service/security_verification.go:348
↓ 15 callers
Method
DoResponse
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/adapter.go:29
↓ 15 callers
Function
ModelPriceHelper
(c *gin.Context, info *relaycommon.RelayInfo, promptTokens int, meta *types.TokenCountMeta)
relay/helper/price.go:75
↓ 15 callers
Function
ModelRatio2JSONString
()
setting/ratio_setting/model_ratio.go:649
↓ 15 callers
Function
NewPluginResponsesMachine
(taskID, model string, createdAt int64, limits PluginProtocolLimits)
relay/plugin_protocol.go:378
↓ 15 callers
Method
OtherRatios
()
types/price_data.go:58
↓ 15 callers
Function
RunExprWithRequest
(exprStr string, params TokenParams, request RequestInput)
pkg/billingexpr/run.go:28
↓ 15 callers
Method
Seek
(offset int64, whence int)
common/body_storage.go:205
↓ 15 callers
Function
SetEventStreamHeaders
(c *gin.Context)
relay/helper/common.go:45
↓ 15 callers
Function
UpdateModelRatioByJSONString
(jsonStr string)
setting/ratio_setting/model_ratio.go:372
↓ 15 callers
Function
ValidateAuthSessionWithTx
ValidateAuthSessionWithTx rechecks the authoritative identity while holding the user/session locks until the caller's credential change or flow consum
model/auth_flow.go:101
↓ 15 callers
Method
abort
()
web/src/features/auth/secure-verification/__tests__/verification-api.test.ts:192
↓ 15 callers
Function
newTestUserSession
(sid string, userID int, now int64)
model/user_session_test.go:82
↓ 15 callers
Function
setupModelListControllerTestDB
(t *testing.T)
controller/model_list_test.go:37
↓ 15 callers
Function
sideDrawerFormClassName
(className?: string)
web/src/components/drawer-layout.ts:36
↓ 15 callers
Function
sideDrawerHeaderClassName
(className?: string)
web/src/components/drawer-layout.ts:30
↓ 15 callers
Function
streamValuesFromAny
(value any)
relaykit/relayconvert/response_registry.go:731
↓ 14 callers
Function
FormatMatchingModelName
转换模型名,减少渠道必须配置各种带参数模型
setting/ratio_setting/model_ratio.go:732
↓ 14 callers
Function
GetAdaptor
(apiType int)
relay/relay_adaptor.go:50
↓ 14 callers
Function
GetGeminiSettings
GetGeminiSettings 获取Gemini配置
setting/model_setting/gemini.go:65
↓ 14 callers
Function
GetHttpClient
GetHttpClient returns the general outbound client used by relay/provider integrations. Do not attach the SSRF-protected dialer here: provider base URL
service/http_client.go:153
↓ 14 callers
Function
GetHttpClientWithProxy
GetHttpClientWithProxy returns the default client or a cached proxy-enabled client.
service/http_client.go:382
↓ 14 callers
Function
IncrementUserAuthVersionWithTx
IncrementUserAuthVersionWithTx locks the user, publishes the next deny fence, then persists the version in the caller's transaction. Unscoped is inten
model/user_auth_cache.go:180
↓ 14 callers
Function
Init
(db *gorm.DB)
service/authz/enforcer.go:33
↓ 14 callers
Function
InitHttpClient
()
service/http_client.go:139
↓ 14 callers
Function
LogDatabaseType
()
common/database.go:19
↓ 14 callers
Function
NewClaudeMessagesBillingUsage
(usage *ClaudeUsage)
relaykit/dto/billing_usage.go:25
↓ 14 callers
Function
RequireSecurityProof
RequireSecurityProof validates a proof against the authenticated dashboard session and writes the shared proof error contract on failure.
middleware/secure_verification.go:39
↓ 14 callers
Function
ResetStatusCode
(newApiErr *types.NewAPIError, statusCodeMappingStr string)
service/error.go:140
↓ 14 callers
Method
Routes
()
pkg/jsplugin/routing.go:490
↓ 14 callers
Method
Update
(updatePassword bool)
model/user.go:799
↓ 14 callers
Function
getChannelUsedQuota
(t *testing.T, id int)
service/task_billing_test.go:468
↓ 14 callers
Function
getIoEnterpriseClient
(c *gin.Context)
controller/deployment.go:50
↓ 14 callers
Function
getTaskNumberFields
( schema: BillingUsageSchema | null | undefined )
web/src/features/pricing/lib/task-expr.ts:69
↓ 14 callers
Function
getUserUsageAccounting
(t *testing.T, id int)
service/task_billing_test.go:461
↓ 14 callers
Function
normalizeModelNames
(models []string)
controller/channel_upstream_update.go:101
↓ 14 callers
Function
setupAuthSessionTestDB
(t *testing.T)
service/auth_session_test.go:22
↓ 14 callers
Function
trimmed
(value)
plugins/tasks/hailuo/plugin.js:70
↓ 14 callers
Function
useCopyToClipboard
(options?: UseCopyToClipboardOptions)
web/src/hooks/use-copy-to-clipboard.ts:36
↓ 13 callers
Function
ComputeTieredQuota
ComputeTieredQuota runs the Expr from a frozen BillingSnapshot against actual token counts and returns the settlement result.
pkg/billingexpr/settle.go:20
↓ 13 callers
Function
DecodePluginProtocolEventResult
DecodePluginProtocolEventResult converts an exported JS value into the deliberately small semantic event contract. Unknown fields are rejected so plug
relay/plugin_protocol.go:131
↓ 13 callers
Method
Error
Error records a soft error. The stream continues processing. Can be called multiple times per chunk.
relay/helper/stream_result.go:21
↓ 13 callers
Method
GetBillingModelName
GetBillingModelName returns the effective pricing identity without changing either the client-visible model or the model sent to the selected channel.
relay/common/relay_info.go:781
↓ 13 callers
Method
GetContentString
()
relaykit/dto/openai_response.go:105
↓ 13 callers
Function
GetGeneralSetting
()
setting/operation_setting/general_setting.go:40
↓ 13 callers
Function
GetPasskeyByUserID
(userID int)
model/passkey.go:123
↓ 13 callers
Function
GetPricing
()
model/pricing.go:70
↓ 13 callers
Method
LookupEndpoint
(method, path, model string)
pkg/jsplugin/routing.go:453
↓ 13 callers
Function
SendEmail
(subject string, receiver string, content string)
common/email.go:78
↓ 13 callers
Function
Unregister
Unregister removes a provider from the registry
oauth/registry.go:46
↓ 13 callers
Function
UserAuth
()
middleware/auth.go:100
↓ 13 callers
Function
ValidatePasswordAndHash
(password string, hash string)
common/crypto.go:30
↓ 13 callers
Function
WalletQuotaFromDecimalStrict
WalletQuotaFromDecimalStrict converts wallet and top-up values within the JavaScript-safe integer range, which is also exactly representable by float6
common/quota_math.go:172
↓ 13 callers
Method
cacheEntry
()
model/user_session.go:87
↓ 13 callers
Function
requireSuccess
(response: ApiResponse<T>)
web/src/features/task-plugins/api.ts:57
↓ 13 callers
Function
seedChargedAccounting
(t *testing.T, userID, channelID, tokenID, quota, requestCount int)
service/task_billing_test.go:125
↓ 13 callers
Function
splitBillingExprAndRequestRules
(expr: string)
web/src/features/pricing/lib/billing-expr.ts:901
↓ 13 callers
Function
useMediaQuery
(query: string)
web/src/hooks/use-media-query.ts:26
↓ 13 callers
Function
writeUserSessionCache
writeUserSessionCache writes a bounded Session snapshot. Active snapshots must carry a deadline captured immediately before their authoritative databa
model/user_session.go:284
↓ 12 callers
Function
ApplyUpstreamBodyMetadata
ApplyUpstreamBodyMetadata restores metadata that net/http cannot infer from a ReplayableBody. Callers must pass the original body because NewRequest h
relay/channel/api_request.go:31
↓ 12 callers
Method
CallPath
CallPath invokes a function nested below an exported object. It is used for protocol hooks such as protocols.openai_responses.renderEvents.
pkg/jsplugin/engine.go:313
↓ 12 callers
Method
Error
Error implements the error interface
pkg/ionet/types.go:274
↓ 12 callers
Function
FormatQuota
(quota int)
logger/logger.go:152
↓ 12 callers
Method
GetErrorCode
()
relaykit/types/error.go:109
↓ 12 callers
Function
GetRandomString
(length int)
common/str.go:32
↓ 12 callers
Method
HasStrength
()
relaykit/relayconvert/reasoning/intent.go:85
↓ 12 callers
Method
IsEmpty
()
relaykit/relayconvert/reasoning/intent.go:89
↓ 12 callers
Function
NewResponseStreamState
(from types.RelayFormat, target types.RelayFormat, options ResponseStreamOptions)
relaykit/relayconvert/response_registry.go:297
← previous
next →
201–300 of 11,918, ranked by callers