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
↓ 3 callers
Function
Valid
Valid reports whether data is a syntactically valid JSON document.
relaykit/relayconvert/kitutil/json.go:85
↓ 3 callers
Function
ValidUsage
(usage *dto.Usage)
service/usage_helpr.go:32
↓ 3 callers
Method
ValidateAndFill
ValidateAndFill check password & user status
model/user.go:1058
↓ 3 callers
Function
ValidateChannelTestConcurrency
(value string)
setting/operation_setting/monitor_setting.go:75
↓ 3 callers
Function
ValidateRequestHeaders
ValidateRequestHeaders rejects plugin-chosen headers that the host transport owns or that change how a request is framed or proxied, and bounds their
pkg/jsplugin/request.go:58
↓ 3 callers
Function
ValidateRequestURL
ValidateRequestURL prevents plugins from directing a channel credential to hosts other than the configured base URL or an administrator-approved host.
pkg/jsplugin/request.go:14
↓ 3 callers
Method
ValidateResolvedIP
ValidateResolvedIP validates a domain's resolved IP immediately before dialing it.
common/ssrf_protection.go:315
↓ 3 callers
Function
ValidateStepUpIdentity
ValidateStepUpIdentity checks that the identity requesting or consuming a proof is still live: a browser session or a scoped access token.
service/auth_session.go:154
↓ 3 callers
Function
ValidateTOTPCode
ValidateTOTPCode 验证TOTP验证码
common/totp.go:38
↓ 3 callers
Function
ValidateTaskArtifactBaseURL
ValidateTaskArtifactBaseURL validates configuration syntax only. It deliberately performs no DNS lookup or reachability probe.
service/task_artifact_access.go:70
↓ 3 callers
Function
ValidateToolPricesJSON
ValidateToolPricesJSON validates an operator-supplied complete price map. A numeric zero is valid and intentionally disables the matching rule.
setting/operation_setting/tools.go:191
↓ 3 callers
Function
ValidateURLWithFetchSetting
ValidateURLWithFetchSetting 使用FetchSetting配置验证URL
common/ssrf_protection.go:376
↓ 3 callers
Function
VerifyTwoFactorCode
VerifyTwoFactorCode classifies the input before verification so one failed submission cannot increment the failure counter for both TOTP and backup co
service/security_verification.go:621
↓ 3 callers
Function
WithClaudeError
(claudeError ClaudeError, statusCode int, ops ...NewAPIErrorOptions)
relaykit/types/error.go:357
↓ 3 callers
Function
WithCollector
(ctx context.Context)
relaykit/relayconvert/internal/convdiag/collector.go:16
↓ 3 callers
Method
WithDefaults
(serverAddress string)
setting/system_setting/passkey.go:154
↓ 3 callers
Method
WithSkippedRoutes
WithSkippedRoutes returns a shallow immutable copy that leaves the given routes out of RouteGroups. Callers use it before publication.
pkg/jsplugin/routing.go:704
↓ 3 callers
Method
Write
(data []byte)
router/plugin-router.go:553
↓ 3 callers
Function
WriteNativeReply
WriteNativeReply writes what a native presenter returned. A value is the JSON body of a reply with the given status (200 for submit and query presente
middleware/task_plugin.go:1574
↓ 3 callers
Function
abortTaskPluginRouteError
(c *gin.Context, status int)
middleware/task_plugin.go:1702
↓ 3 callers
Function
accessTokenMutationEndpoints
accessTokenMutationEndpoints lists every proof-guarded access token operation for one scoped token of the test user.
controller/security_enrollment_test.go:159
↓ 3 callers
Function
actionFor
(req)
plugins/tasks/vidu/plugin.js:305
↓ 3 callers
Function
actionForImageCount
(imageCount)
plugins/tasks/jimeng/plugin.js:114
↓ 3 callers
Function
actionName
(ctx)
plugins/tasks/sunoapi/plugin.js:74
↓ 3 callers
Function
activateTaskPlugin
(key: string, version: string)
web/src/features/task-plugins/api.ts:157
↓ 3 callers
Method
add
add keeps steps and record entries for the session's log and its next report, within their bounds: entries past the bound are counted in a last {trunc
relay/requestplugin/socket.go:413
↓ 3 callers
Function
affinityTestKeys
(t *testing.T)
service/channel_affinity_usage_cache_test.go:17
↓ 3 callers
Function
apiKeyHeaderAuth
()
web/src/features/channels/lib/advanced-custom.ts:226
↓ 3 callers
Function
apiRoot
(ctx)
plugins/tasks/kling/plugin.js:173
↓ 3 callers
Function
appendEncodedWebSearch
appendEncodedWebSearch runs the host encoder for a Responses, Claude, or Gemini target. When the encoder handled the definition, its diagnostics and t
relaykit/relayconvert/internal/toolconv/encode.go:205
↓ 3 callers
Function
appendToolSurchargeLogInfo
(other *model.LogOther, items []ToolSurchargeItem)
service/text_quota.go:31
↓ 3 callers
Function
applyAuthTemplate
(template string, apiKey string)
relay/channel/advancedcustom/adaptor.go:560
↓ 3 callers
Function
applyPriceSyncSelections
( options: PricingOptions, selections: Record<string, Record<string, number | string>> )
web/src/features/model-pricing/pricing.ts:364
↓ 3 callers
Function
applyStartupSyncRevisions
applyStartupSyncRevisions records the revisions read before the startup loads as applied. A topic whose startup load failed, or every topic when that
service/node_sync.go:140
↓ 3 callers
Method
applyStepHeaders
applyStepHeaders sets the headers a hook gave a request. They cannot touch the route auth header, the credential's headers or the content type, which
relay/channel/providerplugin/chain.go:188
↓ 3 callers
Function
artifactData
(ctx)
plugins/tasks/sunoapi/plugin.js:183
↓ 3 callers
Function
artifactKey
(type, song)
plugins/tasks/sunoapi/plugin.js:192
↓ 3 callers
Function
asClaudeResponse
(response any)
relaykit/relayconvert/response_registry.go:1302
↓ 3 callers
Function
asGeminiChatResponse
(response any)
relaykit/relayconvert/response_registry.go:1313
↓ 3 callers
Function
asOAIChatResponse
(response any)
relaykit/relayconvert/response_registry.go:1258
↓ 3 callers
Function
assertAccessTokensUnchanged
assertAccessTokensUnchanged checks that the seeded scoped token keeps its name and grant and that the legacy token still authenticates.
controller/security_enrollment_test.go:170
↓ 3 callers
Function
assignDisplayLogIds
(logs []*Log, startIdx int)
model/log.go:109
↓ 3 callers
Function
auditResponseSuccess
auditResponseSuccess 依据 HTTP 状态码与响应体推断操作是否成功。 优先解析响应 JSON 中的 success 字段;无法解析时退回到状态码判断。
middleware/audit.go:190
↓ 3 callers
Function
authFlowTokenHash
(token string)
model/auth_flow.go:144
↓ 3 callers
Function
authHelper
(c *gin.Context, minRole int)
middleware/auth.go:52
↓ 3 callers
Function
authorizationToken
(header string)
middleware/auth.go:345
↓ 3 callers
Function
avg
(sum int64, count int64)
pkg/perf_metrics/metrics.go:549
↓ 3 callers
Function
avgTps
(value counters)
pkg/perf_metrics/metrics.go:563
↓ 3 callers
Function
awsStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, a *Adaptor)
relay/channel/aws/relay-aws.go:266
↓ 3 callers
Method
base64URL
(value: string)
docs/plugin-api/v1.d.ts:23
↓ 3 callers
Method
base64URLDecode
(value: string)
docs/plugin-api/v1.d.ts:24
↓ 3 callers
Method
batchQueryContext
(key, baseURL, proxy string, tasks []map[string]any)
relay/channel/task/jsplugin/adaptor.go:1500
↓ 3 callers
Function
bodyHash
bodyHash is the hex SHA-256 of a request body, which signRequest gets.
relay/channel/providerplugin/chain.go:105
↓ 3 callers
Function
bodySHA256
(body []byte)
relay/channel/task/jsplugin/credential.go:170
↓ 3 callers
Function
boolPtr
(v bool)
relaykit/relayconvert/reasoning/intent_test.go:215
↓ 3 callers
Function
boxHeader
(bytes, offset, end)
plugins/tasks/xai/plugin.js:597
↓ 3 callers
Function
buildApiParams
(config: { page: number pageSize: number searchParams: Record<string, unknown> columnFilters?: Array<{
web/src/features/usage-logs/lib/utils.ts:157
↓ 3 callers
Function
buildApiPath
(endpoint: string, isAdmin: boolean)
web/src/features/usage-logs/api.ts:40
↓ 3 callers
Function
buildAuditDetails
( entry: AuditLog, t: TFunction, options: AuditDetailOptions = {} )
web/src/features/usage-logs/audit/lib/audit-details.ts:389
↓ 3 callers
Function
buildChannelAffinityStatsContextForTest
(ruleName, usingGroup, keyFP string)
service/channel_affinity_usage_cache_test.go:23
↓ 3 callers
Function
buildDashboardFlowData
( rows: FlowQuotaDataItem[], metric: FlowMetric = 'quota', options: FlowBuildOptions = {} )
web/src/features/dashboard/lib/flow.ts:976
↓ 3 callers
Function
buildEstimatorTokens
( promptTokens: number, completionTokens: number, extraTokenValues: ExtraTokenValues, exprStr: string
web/src/features/pricing/lib/tier-expr.ts:320
↓ 3 callers
Function
buildFlowSankeySpec
( flow: DashboardFlowGraph, title: string, valueFormatter: (value: number) => string = formatNumber, l
web/src/features/dashboard/lib/flow.ts:1122
↓ 3 callers
Function
buildFormDefaults
(defaults: FlatOAuthDefaults)
web/src/features/system-settings/auth/oauth-section.tsx:178
↓ 3 callers
Function
buildLogLikeCondition
(column string, value string)
model/log.go:32
↓ 3 callers
Function
buildOAuthCallbackUrl
( serverAddress: string, callbackPath: string, fallback: string )
web/src/features/system-settings/auth/oauth-callback-url.ts:27
↓ 3 callers
Function
buildOpenAIModel
(modelName string, ownerByModel map[string]string)
controller/model.go:163
↓ 3 callers
Function
buildPreviewRows
( values: ModelPricingFormValues, mode: PricingMode, billingExpr: string, requestRuleExpr: string, p
web/src/features/system-settings/models/model-pricing-core.ts:261
↓ 3 callers
Function
buildPricingChanges
( snapshot: ModelPricingConfig, before: PricingOptions, after: PricingOptions )
web/src/features/model-pricing/api.ts:179
↓ 3 callers
Function
buildQueryParams
( params: Record<string, unknown> )
web/src/features/usage-logs/lib/query-params.ts:19
↓ 3 callers
Function
buildQuotaAuditOperation
( action: string, params: Record<string, unknown>, success: boolean, t: Translate )
web/src/features/usage-logs/lib/quota-audit-operation.ts:46
↓ 3 callers
Function
buildResponsesWSCreateEvent
(jsonData []byte, generate common.RawMessage, streamID string)
relay/responses_websocket.go:1013
↓ 3 callers
Function
buildResponsesWSCreatePayload
(c *gin.Context, info *relaycommon.RelayInfo, req dto.OpenAIResponsesRequest, generate common.RawMessage, stre
relay/responses_websocket.go:767
↓ 3 callers
Function
buildRoutingGeneration
(factory, override map[string]*LoadedPlugin, number uint64)
pkg/jsplugin/routing.go:1027
↓ 3 callers
Function
buildRoutingGenerationFromPlugins
(effective map[string]*LoadedPlugin, number uint64)
pkg/jsplugin/routing.go:1112
↓ 3 callers
Function
buildSelfUserData
buildSelfUserData is the single safe dashboard-user DTO used by GetSelf, login and refresh. It intentionally excludes password, management PAT and adm
controller/user.go:494
↓ 3 callers
Function
buildUsageFromGeminiResponse
(c *gin.Context, info *relaycommon.RelayInfo, response *dto.GeminiChatResponse)
relay/channel/gemini/relay-gemini.go:148
↓ 3 callers
Function
bumpSyncTopic
bumpSyncTopic adds the sync task on tx, inside the transaction of a write: the write and its task commit or fail together. It first locks the newest t
model/system_sync_task.go:58
↓ 3 callers
Function
cacheApplyUserQuotaDelta
(userID int, delta int64)
model/quota_reserve.go:87
↓ 3 callers
Method
cacheKeyPart
()
service/http_transport_policy.go:88
↓ 3 callers
Function
calculateAudioQuota
(info QuotaInfo)
service/quota.go:49
↓ 3 callers
Function
calculateTokenPrice
( model: PricingModel, type: PriceType, ratio: number )
web/src/features/pricing/lib/price.ts:63
↓ 3 callers
Method
call
(node: Extract<ExpressionNode, { kind: 'call' }>)
web/src/features/pricing/lib/billing-expression/runtime.ts:422
↓ 3 callers
Function
callKeywords
(t *testing.T, plugin *LoadedPlugin, config []byte, body string)
pkg/jsplugin/keywords_test.go:31
↓ 3 callers
Function
capSyncMessage
(message string)
service/node_sync.go:210
↓ 3 callers
Function
channelCloseTopic
(database int)
pkg/wsmanager/wsmanager.go:150
↓ 3 callers
Function
channelsRevision
channelsRevision is the id of the newest channels sync task, 0 without one.
model/channel_status_test.go:19
↓ 3 callers
Function
chargedFailure
(data)
plugins/tasks/xai/plugin.js:328
↓ 3 callers
Function
chartRecordValue
(value: unknown)
web/src/features/dashboard/components/flow/flow-charts.tsx:179
↓ 3 callers
Function
check
(ctx, req, attachments)
plugins/tasks/request-filter/plugin.js:384
↓ 3 callers
Method
check
check refuses a patched view whose fields are not those of before, each a string or an array of as many strings, or whose values hold the form boundar
relay/requestplugin/form.go:161
↓ 3 callers
Function
checkAndPersistChannelUpstreamModelUpdates
( channel *model.Channel, settings *dto.ChannelOtherSettings, force bool, allowAutoApply bool, )
controller/channel_upstream_update.go:594
↓ 3 callers
Function
checkPDF
checkPDF returns "" for a file the library may read, otherwise the unchecked reason: too_large past a bound, unreadable when the file is not a PDF, is
relay/requestplugin/pdf.go:900
↓ 3 callers
Function
choiceFromString
(value string)
relaykit/relayconvert/internal/toolconv/decode.go:832
↓ 3 callers
Function
choiceIndex
(choice gjson.Result, position int)
relay/requestplugin/reply.go:652
↓ 3 callers
Function
clamp
(v: number)
web/src/features/channels/components/numeric-spinner-input.tsx:59
↓ 3 callers
Function
clampSize
( size: FloatingWindowSize, limits: { minWidth: number; minHeight: number } )
web/src/components/floating-window.tsx:151
↓ 3 callers
Method
classify
classify sets the class of a failed hook call from its error.
pkg/jsplugin/transform.go:318
↓ 3 callers
Function
claudeHostedResultFailure
(blockType string, content json.RawMessage, explicitError *bool, explicitCode string)
relaykit/relayconvert/internal/toolconv/hosted_values.go:142
↓ 3 callers
Function
claudeMCPContentFromResponsesString
(raw json.RawMessage)
relaykit/relayconvert/internal/toolconv/hosted_values.go:131
← previous
next →
2,401–2,500 of 15,409, ranked by callers