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
↓ 2 callers
Function
validateLocalizedTextNamed
(text LocalizedText, subject string, maxRunes int)
pluginkit/meta.go:2160
↓ 2 callers
Function
validateModelScope
validateModelScope enforces the shared rules for route.models and per-protocol models entries: non-empty canonical names, no duplicates.
pluginkit/routing.go:521
↓ 2 callers
Function
validateModelVendor
(tx *gorm.DB, id int)
model/vendor_management.go:35
↓ 2 callers
Function
validatePasskeyRPIDWithTx
(tx *gorm.DB, rpID string)
model/passkey_option.go:77
↓ 2 callers
Function
validateProjectedTaskArtifacts
(artifacts []relaychannel.TaskArtifact)
controller/task.go:186
↓ 2 callers
Function
validatePrompt
(prompt string)
relay/common/relay_utils.go:136
↓ 2 callers
Function
validateResponsesRequestChatUnsupportedFields
(req *dto.OpenAIResponsesRequest)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:122
↓ 2 callers
Function
validateTaskDurationBounds
(req TaskSubmitReq)
relay/common/relay_utils.go:148
↓ 2 callers
Function
validateTaskMediaURL
(rawURL, proxy string)
controller/video_proxy.go:548
↓ 2 callers
Function
validateTopUpQuota
(amount int64)
controller/topup.go:258
↓ 2 callers
Function
validateURL
(urlStr string, index int, messages itemMessages)
setting/console_setting/validation.go:59
↓ 2 callers
Function
validateURLWithCurrentFetchSetting
(urlStr string, applyDomainIPFilter bool)
service/http_client.go:66
↓ 2 callers
Function
validateUsageFieldSchema
(name string, field UsageFieldSchema)
pluginkit/meta.go:1654
↓ 2 callers
Function
validateUsageModeStep
()
web/src/features/setup/setup-wizard.tsx:248
↓ 2 callers
Function
validateUsageValue
(value any, schema pluginruntime.UsageFieldSchema)
relay/channel/task/jsplugin/adaptor.go:1780
↓ 2 callers
Method
validatedUsageRatios
validatedUsageRatios returns the normalized facts in a new map because the hook result may be a host value, such as the request body, that must stay u
relay/channel/task/jsplugin/adaptor.go:1688
↓ 2 callers
Function
value
(this: HTMLElement)
web/src/features/channels/components/__tests__/channel-configuration.test.tsx:2426
↓ 2 callers
Method
value
()
pluginkit/json_state.go:431
↓ 2 callers
Function
vendorImageCount
(body)
plugins/tasks/jimeng/plugin.js:110
↓ 2 callers
Function
verifyAuditJSONStorage
(t *testing.T)
controller/access_token_audit_test.go:919
↓ 2 callers
Function
verifyAuditRoleStorage
(t *testing.T)
controller/access_token_audit_test.go:891
↓ 2 callers
Function
verifyJSON
(text: string)
web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:486
↓ 2 callers
Function
verifyLogin
( input: VerificationInput, challenge: LoginChallenge, signal: AbortSignal, onDomains?: (domains: Pass
web/src/features/auth/secure-verification/api.ts:136
↓ 2 callers
Function
viaGateway
(ctx)
plugins/tasks/jimeng/plugin.js:102
↓ 2 callers
Function
viaGateway
(ctx)
plugins/tasks/vidu/plugin.js:169
↓ 2 callers
Function
viaGateway
(ctx)
plugins/tasks/kling/plugin.js:154
↓ 2 callers
Function
videoAction
(req)
plugins/tasks/alibaba/plugin.js:838
↓ 2 callers
Function
videoInputRequest
(action, source, identity)
plugins/tasks/xai/plugin.js:259
↓ 2 callers
Function
videoProxyError
videoProxyError returns a standardized OpenAI-style error response.
controller/video_proxy.go:55
↓ 2 callers
Function
videoResolution
(ctx)
plugins/tasks/doubao/plugin.js:437
↓ 2 callers
Function
walk
(dir, files = [])
web/scripts/format-with-protected-headers.mjs:59
↓ 2 callers
Function
wanVideoUsageSchema
(resolutions, audio)
plugins/tasks/alibaba/plugin.js:165
↓ 2 callers
Function
watchOAuthPopupClosed
( popup: Pick<Window, 'closed'>, onClosed: () => void, interval = 500, runtime: TimerRuntime = interva
web/src/features/auth/lib/oauth-bind-window.ts:116
↓ 2 callers
Method
whole
whole checks a non-stream answer: one call per instance with every output final. It returns the answer to send, nil when an instance stopped it; an an
relay/requestplugin/reply.go:680
↓ 2 callers
Function
withAccessTokenID
withAccessTokenID sets the :id route parameter the way the router would.
controller/security_enrollment_test.go:143
↓ 2 callers
Function
withDebugEnabled
(t *testing.T, enabled bool)
service/error_test.go:152
↓ 2 callers
Method
withDefaults
()
relay/plugin_protocol.go:59
↓ 2 callers
Function
withDeviceAvailability
( requirements: VerificationRequirements, passkeySupported: boolean )
web/src/features/auth/secure-verification/api.ts:70
↓ 2 callers
Function
withOrdinaryPricing
(model: PricingModel)
web/src/features/pricing/lib/plugin-pricing.ts:92
↓ 2 callers
Method
withProtocol
(value map[string]any)
pluginkit/routing.go:323
↓ 2 callers
Function
withSelfUseModeDisabled
(t *testing.T)
controller/model_list_test.go:126
↓ 2 callers
Function
withSelfUseModeEnabled
(t *testing.T)
controller/model_list_test.go:136
↓ 2 callers
Function
writeAwsStreamEvent
(writer io.Writer, data string)
relay/channel/aws/relay_aws_test.go:122
↓ 2 callers
Function
writeH2TestResponse
(framer *http2.Framer, streamID uint32)
relay/channel/api_request_getbody_test.go:313
↓ 2 callers
Function
writeLoginResponse
(c *gin.Context, user *model.User, bundle *service.AuthBundle)
controller/user.go:198
↓ 2 callers
Function
writePasskeyDomainSettingsError
(c *gin.Context, err error)
controller/option.go:171
↓ 2 callers
Function
writeRelayStreamError
(c *gin.Context, format types.RelayFormat, apiError *types.NewAPIError)
controller/relay.go:272
↓ 2 callers
Function
writeTaskArtifactProjectionError
(c *gin.Context, err error)
controller/task.go:291
↓ 2 callers
Function
writeTaskArtifacts
(c *gin.Context, task *model.Task, dashboard bool)
controller/task.go:94
↓ 2 callers
Function
writeTaskMediaBase64
writeTaskMediaBase64 answers with media the upstream delivered as base64, decoding it while it streams; HEAD gets the headers only. The media type def
controller/video_proxy.go:702
↓ 2 callers
Function
writeTaskMediaProxyError
(c *gin.Context, err error)
controller/video_proxy.go:663
↓ 2 callers
Function
writeTaskPluginProtocolFailureResponse
( c *gin.Context, machine *relay.PluginResponsesMachine, taskStatus string, )
controller/plugin_protocol.go:1129
↓ 2 callers
Function
writeTaskPluginProtocolHeartbeat
(c *gin.Context)
controller/plugin_protocol.go:1096
↓ 2 callers
Function
writeThemePreference
(key: string, value: string | null)
web/src/lib/theme-storage.ts:45
↓ 2 callers
Function
writeToDiskCache
writeToDiskCache 将数据写入磁盘缓存
service/file_service.go:244
↓ 2 callers
Function
writeVisualCondition
( node: VisualCondition, source: string, issues: VisualBillingIssue[] )
web/src/features/pricing/lib/billing-expression/visual.ts:257
↓ 2 callers
Function
writeWebSocketMessage
(session *websocket.Conn, message jsplugin.WebSocketMessage)
relay/channel/providerplugin/stream.go:450
↓ 2 callers
Function
xunfeiMakeRequest
(textRequest dto.GeneralOpenAIRequest, domain, authUrl, appId string)
relay/channel/xunfei/relay-xunfei.go:203
↓ 2 callers
Function
zImage
(ctx)
plugins/tasks/alibaba/plugin.js:486
↓ 1 callers
Function
AcSearch
(findText string, dict []string, stopImmediately bool)
service/str.go:132
↓ 1 callers
Method
AcceptsModel
AcceptsModel reports whether the route's Models list admits model, as MatchPathForModel matches it; an empty list admits every model.
relaykit/dto/channel_settings.go:257
↓ 1 callers
Function
AccessTokenRouteRuleKeys
AccessTokenRouteRuleKeys lists every declared route key, sorted.
middleware/access_token_routes.go:352
↓ 1 callers
Function
AccessTokenScopeDictionary
AccessTokenScopeDictionary lists every resource a token scope can name, whatever the viewer may grant, so stored grants keep their labels after the gr
service/access_token_scope.go:159
↓ 1 callers
Function
AddChannel
(c *gin.Context)
controller/channel.go:821
↓ 1 callers
Method
AdjustBillingOnComplete
AdjustBillingOnComplete 在任务到达终态(成功/失败)时由轮询循环调用。 返回正数触发差额结算(补扣/退还),返回 0 保持预扣费金额不变。
service/task_polling.go:35
↓ 1 callers
Method
AdjustBillingOnComplete
AdjustBillingOnComplete returns the actual quota when a task reaches a terminal state (success/failure) during polling. Called by the polling loop aft
relay/channel/adapter.go:70
↓ 1 callers
Function
AdminDeleteUserSubscription
AdminDeleteUserSubscription hard-deletes a user subscription.
model/subscription.go:990
↓ 1 callers
Function
AdminInvalidateUserSubscription
AdminInvalidateUserSubscription marks a user subscription as cancelled and ends it immediately.
model/subscription.go:945
↓ 1 callers
Function
AdvanceCurrentSessionSecurity
AdvanceCurrentSessionSecurity increments the user's global auth version, preserves only the current browser session at a new session version and retur
service/auth_session.go:189
↓ 1 callers
Function
AdvanceUserSessionAuthVersion
AdvanceUserSessionAuthVersion preserves one browser session across a user-level security-version change. Both old access JWTs and concurrent updates a
model/user_session.go:678
↓ 1 callers
Method
Algorithm
()
pkg/cachex/hybrid_cache.go:280
↓ 1 callers
Function
AlphaSearchHelper
(c *gin.Context, info *relaycommon.RelayInfo)
relay/alpha_search_handler.go:22
↓ 1 callers
Function
AnonymousRequestBodyLimit
()
middleware/request_body_limit.go:12
↓ 1 callers
Function
AppendChannelAffinityAdminInfo
(c *gin.Context, other *model.LogOther)
service/channel_affinity.go:711
↓ 1 callers
Function
AppendTaskPluginContextAuditInfo
AppendTaskPluginContextAuditInfo is used before a task row exists, such as an upstream submission error log.
service/task_plugin_audit.go:81
↓ 1 callers
Function
ApplyChannelPin
ApplyChannelPin copies plugin-declared origin-task facts from the prepare context onto RelayInfo and, when the resolved pin retries on the same channe
relay/relay_task.go:155
↓ 1 callers
Function
ApplyClaudeThinkingModel
(claudeRequest *dto.ClaudeRequest, info convmeta.Meta)
relaykit/relayconvert/request_compat.go:49
↓ 1 callers
Function
ApplyPluginParamOverride
ApplyPluginParamOverride runs the param override DSL for a request plugin's utils.paramOverride. The DSL header context starts from baseHeaders, never
relay/common/request_plugin.go:205
↓ 1 callers
Function
AttachThoughtSignatureBypass
(opts *convmeta.Options, part *dto.GeminiPart)
relaykit/relayconvert/internal/shared/gemini/request.go:70
↓ 1 callers
Method
Attachments
Attachments lists the request's attachments in body order.
pluginkit/media.go:23
↓ 1 callers
Function
AudioHelper
(c *gin.Context, info *relaycommon.RelayInfo)
relay/audio_handler.go:18
↓ 1 callers
Method
AuditMap
AuditMap renders the clamp as the marker stored under a log's admin_info.quota_saturation. Centralized here so every billing path (consume logs, task
common/quota_math.go:62
↓ 1 callers
Function
AuthLogout
(c *gin.Context)
controller/auth_session.go:47
↓ 1 callers
Function
AuthSessionErrorCode
(err error)
service/auth_session.go:484
↓ 1 callers
Method
AuthorizationURL
(state string)
oauth/telegram.go:69
↓ 1 callers
Function
AutoSMTPAuth
(username, password string)
common/email_ntlm_auth.go:17
↓ 1 callers
Function
AutomaticDisableKeywordsFromString
(s string)
setting/operation_setting/operation_setting.go:22
↓ 1 callers
Function
AutomaticDisableStatusCodesFromString
(s string)
setting/operation_setting/status_code_ranges.go:44
↓ 1 callers
Function
AutomaticRetryStatusCodesFromString
(s string)
setting/operation_setting/status_code_ranges.go:61
↓ 1 callers
Function
BatchDeleteModelMeta
(c *gin.Context)
controller/model_meta.go:223
↓ 1 callers
Function
BatchDeleteTokens
BatchDeleteTokens 删除指定用户的一组令牌,返回成功删除数量
model/token.go:450
↓ 1 callers
Function
BatchInsertChannels
(channels []Channel)
model/channel.go:505
↓ 1 callers
Function
BindTelegramForSessionWithTx
BindTelegramForSessionWithTx preserves single ownership and the session that started the binding. The caller consumes its OAuth flow in this transacti
model/external_identity_claim.go:87
↓ 1 callers
Function
BuildAnthropicModelURL
(baseURL, version, projectID, region, modelName, action string)
relay/channel/vertex/url_builder.go:78
↓ 1 callers
Function
BuildMessageDeltaPatchUsage
(claudeResponse *dto.ClaudeResponse, claudeInfo *ClaudeResponseInfo)
relaykit/relayconvert/response_compat.go:112
↓ 1 callers
Function
BuildOpenSourceChatCompletionsURL
(baseURL, projectID, region string)
relay/channel/vertex/url_builder.go:82
↓ 1 callers
Function
CacheGetChannelInfo
(id int)
model/channel_cache.go:239
↓ 1 callers
Method
CallBuildBalanceRequest
CallBuildBalanceRequest runs buildBalanceRequest(ctx): the first request of a balance query, with the state parseBalance starts from.
pluginkit/provider.go:1958
↓ 1 callers
Method
CallCheckKey
CallCheckKey runs checkKey(ctx, key) on a static key line an administrator saves. It returns nil for a good key, or the plugin's message for the admin
pluginkit/provider.go:1908
↓ 1 callers
Method
CallExchangeKey
CallExchangeKey runs exchangeKey(ctx) for a static key line: hookCtx has the base URL, the plugin config and the key. It returns the token or the erro
pluginkit/provider.go:1865
← previous
next →
5,001–5,100 of 15,592, ranked by callers