Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
15,409 in github.com/QuantumNous/new-api
⨍
Functions
15,409
◇
Types & classes
2,241
↓ 12 callers
Function
RecordAuditLog
RecordAuditLog captures safe request metadata only; raw URLs, query strings, credentials and response/request bodies must never enter this table.
model/audit_log.go:74
↓ 12 callers
Method
SetContentString
(s string)
relaykit/dto/openai_response.go:101
↓ 12 callers
Method
SetDisabledFactoryKeys
(keys []string)
pkg/jsplugin/registry.go:892
↓ 12 callers
Method
SetOtherInfo
(otherInfo map[string]any)
model/channel.go:338
↓ 12 callers
Function
SetToolPriceForTest
SetToolPriceForTest injects a tool price and rebuilds the lookup index. Tests only.
setting/operation_setting/tools.go:284
↓ 12 callers
Method
UpdateWithStatus
UpdateWithStatus performs a conditional UPDATE guarded by fromStatus (CAS). Returns (true, nil) if this caller won the update, (false, nil) if another
model/task.go:590
↓ 12 callers
Function
UploadTaskPlugin
(c *gin.Context)
controller/task_plugin.go:106
↓ 12 callers
Function
advancedCustomGinContext
(path string)
relay/channel/advancedcustom/adaptor_test.go:1137
↓ 12 callers
Function
attemptCall
(c *gin.Context, info *relaycommon.RelayInfo)
relay/requestplugin/relay.go:423
↓ 12 callers
Function
callChannelAPI
callChannelAPI runs a channel handler as the root user signed in with a browser session.
controller/provider_plugin_test.go:92
↓ 12 callers
Function
combineBillingExpr
( baseExpr: string, requestRuleExpr: string )
web/src/features/pricing/lib/billing-expr.ts:651
↓ 12 callers
Function
decode
(t *testing.T, text string)
pkg/requestpatch/patch_test.go:15
↓ 12 callers
Function
decodeAPIResponse
(t *testing.T, recorder *httptest.ResponseRecorder)
controller/token_test.go:216
↓ 12 callers
Method
event
(eventType string, payload dto.ResponsesStreamResponse)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:998
↓ 12 callers
Function
genBaseRelayInfo
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:605
↓ 12 callers
Function
handler
()
web/src/features/models/hooks/use-model-deployment-settings.ts:174
↓ 12 callers
Function
hasPermission
( user: AuthUser | null | undefined, resource: string, action: string )
web/src/lib/admin-permissions.ts:78
↓ 12 callers
Function
makeRelayInfo
(expr string, groupRatio float64, estPrompt, estCompletion int)
service/tiered_settle_test.go:48
↓ 12 callers
Function
newAPIErrorFromParamOverride
(err error)
relay/param_override_error.go:8
↓ 12 callers
Function
newAwsTestContext
(writer http.ResponseWriter, requestContext context.Context)
relay/channel/aws/relay_aws_test.go:85
↓ 12 callers
Function
newImageTestContext
(t *testing.T, body, contentType string, isStream bool)
relay/channel/openai/image_stream_test.go:23
↓ 12 callers
Function
newPluginGenerationBuilder
(staticRoutes []gin.RouteInfo, trustedProxies []string, handlers pluginRouteHandlers)
router/plugin-router.go:86
↓ 12 callers
Method
record
record is the public record of the instances that masked, found or stopped something, or could not read the answer.
relay/requestplugin/reply.go:460
↓ 12 callers
Function
resultObject
(value any, subject string)
pkg/jsplugin/provider.go:1714
↓ 12 callers
Function
safeNumberFieldProps
(field: ControllerRenderProps<TFieldValues, TName>)
web/src/features/system-settings/utils/numeric-field.ts:76
↓ 12 callers
Function
securityPasskeyResponse
securityPasskeyResponse acts as a software authenticator at the browser boundary. The handlers still validate the real WebAuthn challenge, origin and
controller/security_enrollment_test.go:577
↓ 12 callers
Function
setupPasskeyDomainOptions
(t *testing.T)
controller/passkey_test.go:294
↓ 12 callers
Function
syncNodeTopics
syncNodeTopics runs the reload of each registered topic whose newest sync task is newer than the one this node applied, and reports whether any ran. A
service/node_sync.go:157
↓ 12 callers
Function
taskSubmissionTestContext
()
controller/relay_task_plugin_test.go:481
↓ 12 callers
Function
taskUsageUnitLabel
( definition: { unit?: string; unitLabel?: LocalizedTextValue } | undefined, language: string, fallback:
web/src/features/pricing/lib/task-price-display.ts:59
↓ 12 callers
Function
trimmed
(value)
plugins/tasks/alibaba/plugin.js:377
↓ 12 callers
Function
useRateLimitMiniRedis
(t *testing.T)
middleware/rate_limit_test.go:23
↓ 12 callers
Function
useTheme
()
web/src/context/theme-provider.tsx:138
↓ 12 callers
Function
withHeaderNavModules
(t *testing.T, raw string)
middleware/header_nav_test.go:19
↓ 11 callers
Function
AccessTokenAudit
AccessTokenAudit also captures public reads and rejections before route-level authentication (for example, rate limiting). It does not grant authentic
middleware/audit.go:265
↓ 11 callers
Function
AdminAuth
()
middleware/auth.go:138
↓ 11 callers
Function
AsClientError
(err error)
relaykit/relayconvert/reasoning/intent.go:39
↓ 11 callers
Function
CompletePluginLoginCallback
CompletePluginLoginCallback handles the redirect back from the vendor, which the callback page of the plugin posts.
service/provider_plugin_login.go:255
↓ 11 callers
Function
ContinuePluginLogin
ContinuePluginLogin submits the browser's input to the current step.
service/provider_plugin_login.go:201
↓ 11 callers
Function
Done
(c *gin.Context)
relay/helper/common.go:295
↓ 11 callers
Function
GetChannelBaseURL
(channelType int)
constant/channel.go:137
↓ 11 callers
Function
GetContextKeyInt
(c *gin.Context, key constant.ContextKey)
common/gin.go:247
↓ 11 callers
Function
GetContextKeyString
(c *gin.Context, key constant.ContextKey)
common/gin.go:186
↓ 11 callers
Function
GetDBTimestamp
GetDBTimestamp returns a UNIX timestamp from database time. Falls back to application time on error.
model/db_time.go:7
↓ 11 callers
Function
GetDiskCacheConfig
GetDiskCacheConfig 获取磁盘缓存配置
common/disk_cache_config.go:30
↓ 11 callers
Method
GetFinalRequestRelayFormat
()
relay/common/relay_info.go:807
↓ 11 callers
Method
GetRequestURL
(info *relaycommon.RelayInfo)
relay/channel/advancedcustom/adaptor.go:174
↓ 11 callers
Function
GetSystemTaskByTaskID
(taskID string)
model/system_task.go:131
↓ 11 callers
Function
GetTaskAdaptor
(platform constant.TaskPlatform)
relay/relay_adaptor.go:191
↓ 11 callers
Function
GetUUID
()
relaykit/relayconvert/kitutil/value.go:44
↓ 11 callers
Function
GetUserGroup
GetUserGroup gets group from Redis first, falls back to DB if needed
model/user.go:1275
↓ 11 callers
Function
GetUserQuota
GetUserQuota gets quota from Redis first, falls back to DB if needed
model/user.go:1252
↓ 11 callers
Method
HasStrength
()
relaykit/relayconvert/reasoning/intent.go:86
↓ 11 callers
Function
IncreaseUserQuota
(id int, quota int, db bool)
model/user.go:1340
↓ 11 callers
Function
InitDB
()
model/main.go:186
↓ 11 callers
Method
Insert
()
model/task.go:518
↓ 11 callers
Function
InvalidatePricingCache
()
model/pricing.go:98
↓ 11 callers
Method
IsNormalEnd
()
relay/common/stream_status.go:209
↓ 11 callers
Method
ListArtifacts
(task *model.Task)
relay/channel/adapter.go:112
↓ 11 callers
Method
LookupDeclaredRoute
LookupDeclaredRoute resolves a manifest path declaration, or its /{key} copy, to the first binding in ascending key order. It does not match an incomi
pkg/jsplugin/routing.go:558
↓ 11 callers
Function
NewOAuthErrorWithRaw
NewOAuthErrorWithRaw creates a new OAuth error with raw error message for logging
oauth/types.go:60
↓ 11 callers
Function
OaiResponsesHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay_responses.go:21
↓ 11 callers
Function
ParseEffort
(value string)
relaykit/relayconvert/reasoning/intent.go:124
↓ 11 callers
Method
Read
(p []byte)
common/body_storage.go:222
↓ 11 callers
Function
RefreshPricing
RefreshPricing 强制立即重新计算与定价相关的缓存。 该方法用于需要最新数据的内部管理 API, 因此会绕过默认的 1 分钟延迟刷新。
model/pricing_refresh.go:6
↓ 11 callers
Method
Render
(w http.ResponseWriter)
common/custom-event.go:75
↓ 11 callers
Function
Report
Report hands a finished relay request to the report hooks of its plan: once, after the client has the response and the request has settled, whether it
relay/requestplugin/report.go:228
↓ 11 callers
Method
SaveToDB
SaveToDB 将配置保存到数据库
setting/config/config.go:71
↓ 11 callers
Method
SetAdmin
(key string, value any)
model/log_other.go:94
↓ 11 callers
Function
SetDiskCacheConfig
SetDiskCacheConfig 设置磁盘缓存配置
common/disk_cache_config.go:37
↓ 11 callers
Function
SetMainDatabaseType
(databaseType DatabaseType)
common/database.go:25
↓ 11 callers
Method
Snapshot
()
pkg/jsplugin/registry.go:1193
↓ 11 callers
Function
StringData
(c *gin.Context, str string)
relay/helper/common.go:256
↓ 11 callers
Method
TotalErrorCount
()
relay/common/stream_status.go:200
↓ 11 callers
Method
TransformHooks
TransformHooks returns the stage hooks the plugin exports, in TransformStages order, then ReplyHook and ReportHook when it exports them; nil when it h
pkg/jsplugin/transform.go:55
↓ 11 callers
Method
Type
()
service/system_task.go:35
↓ 11 callers
Function
UpdateChannelUsedQuota
(id int, quota int)
model/channel.go:1072
↓ 11 callers
Function
UsingLogDatabase
(databaseType DatabaseType)
common/database.go:42
↓ 11 callers
Method
Value
Value returns the final ordinary JSON tree and verifies the incremental byte accounting against the configured codec before callers can persist it.
pkg/jsplugin/json_state.go:416
↓ 11 callers
Function
VerifySecurityInput
(identity AuthIdentity, input VerificationInput)
service/security_verification.go:573
↓ 11 callers
Function
buildSSEBody
(n int)
relay/helper/stream_scanner_test.go:124
↓ 11 callers
Method
close
()
common/email_test.go:97
↓ 11 callers
Function
createSectionRegistry
(config: SectionRegistryConfig<TSectionId, TSettings, TExtraArgs>)
web/src/features/system-settings/utils/section-registry.ts:49
↓ 11 callers
Function
insertPluginChannel
(t *testing.T, pluginKey, baseURL, key string, multiKey bool)
controller/provider_plugin_test.go:121
↓ 11 callers
Function
modelManagementDB
(t *testing.T, kind, dsn string)
controller/model_management_test.go:33
↓ 11 callers
Function
newFakeAuthServer
(t *testing.T)
service/provider_plugin_test.go:115
↓ 11 callers
Function
newSecurityLoginPasskey
(t *testing.T, userID int)
controller/auth_flow_test.go:33
↓ 11 callers
Method
next
()
relay/requestplugin/pdf.go:570
↓ 11 callers
Function
normalizeIntent
normalizeIntent canonicalizes one intent. Only unknown effort or mode values are errors; contradictions between mode, effort, and budget are resolved
relaykit/relayconvert/reasoning/intent.go:153
↓ 11 callers
Function
parseQuotaFromDollars
(amount: number)
web/src/lib/format.ts:100
↓ 11 callers
Function
registerTestPlugin
(registry *Registry, version string, factory bool)
pkg/jsplugin/registry_test.go:559
↓ 11 callers
Function
requirePaymentCompliance
(c *gin.Context)
controller/payment_compliance.go:20
↓ 11 callers
Function
responseSemanticLoss
(path string, code string, message string)
relaykit/relayconvert/internal/toolconv/response.go:509
↓ 11 callers
Method
run
()
relay/requestplugin/pdf.go:912
↓ 11 callers
Method
scan
scan examines a plugin-channel snapshot. Workers exist only while a hook is running; a busy key waits for the next scan.
service/provider_plugin_scheduled.go:70
↓ 11 callers
Function
setupManageUserTestDB
(t *testing.T)
controller/user_manage_test.go:32
↓ 11 callers
Function
sideDrawerFooterClassName
(className?: string)
web/src/components/drawer-layout.ts:42
↓ 11 callers
Method
submitContext
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/task/jsplugin/adaptor.go:1814
↓ 11 callers
Function
taskPriceLabel
( description: LocalizedTextValue | undefined, field: string, language: string )
web/src/features/pricing/lib/task-price-display.ts:39
↓ 11 callers
Function
trimmed
(value)
plugins/tasks/kling/plugin.js:98
← previous
next →
501–600 of 15,409, ranked by callers