MCPcopy Create free account

hub / github.com/QuantumNous/new-api / functions

Functions15,592 in github.com/QuantumNous/new-api

↓ 3 callersMethodSuppressesRetry
()
dto/channel_constraints.go:118
↓ 3 callersFunctionSyncTaskPluginsOnce
()
controller/task_plugin.go:1213
↓ 3 callersFunctionSyncTaskTopic
SyncTaskTopic returns the topic of a sync task type.
model/system_sync_task.go:34
↓ 3 callersFunctionTaskAttempt
TaskAttempt runs the late ingress hooks of a task or Midjourney submission attempt on the client body, before the attempt validates and prices it: tho
relay/requestplugin/relay.go:127
↓ 3 callersFunctionTaskBulkUpdateByID
TaskBulkUpdateByID performs an unconditional bulk UPDATE by primary key IDs. WARNING: This function has NO CAS (Compare-And-Swap) guard — it will over
model/task.go:604
↓ 3 callersFunctionTaskExprCompatible
TaskExprCompatible checks the schema contract even for usage references in branches that the current request would not evaluate. Chat request quantiti
setting/billing_setting/tiered_billing.go:136
↓ 3 callersFunctionTaskGetAllUserTask
(userId int, startIdx int, num int, queryParams SyncTaskQueryParams)
model/task.go:319
↓ 3 callersMethodTaskIDInQuery
TaskIDInQuery reports whether a query route reads its task id from the query string, as the MiniMax v1 query does (?task_id=): the route's path has no
pluginkit/routing.go:543
↓ 3 callersFunctionTaskModel2Dto
(task *model.Task)
relay/relay_task.go:695
↓ 3 callersMethodTaskPluginBindings
TaskPluginBindings returns the sorted, de-duplicated set of task plugins the channel binds through either field, so callers can compare bindings as a
relaykit/dto/channel_settings.go:55
↓ 3 callersFunctionTaskPluginEndpointOnly
TaskPluginEndpointOnly applies middleware only after a shared endpoint has been claimed. This preserves the original middleware chain for unclaimed vi
middleware/task_plugin.go:742
↓ 3 callersMethodTerminal
Terminal checks the event that ends the response and returns it as the client gets it, for the session to send; the events released before it go out f
relay/requestplugin/socket.go:108
↓ 3 callersMethodToString
()
relay/common/relay_info.go:378
↓ 3 callersFunctionTokenOrTaskArtifactAccessAuth
TokenOrTaskArtifactAccessAuth accepts the normal relay API Bearer token or a route-bound capability. Capabilities are verified before any database rea
middleware/task_artifact_access.go:174
↓ 3 callersFunctionTopupGroupRatio2JSONString
()
common/topup-ratio.go:15
↓ 3 callersMethodTryLock
()
controller/user.go:1258
↓ 3 callersMethodUpdate
()
model/model_meta.go:261
↓ 3 callersFunctionUpdateAuthFlowPayload
UpdateAuthFlowPayload replaces the payload of an unconsumed, unexpired flow only while it still holds expected, so of two concurrent submits of one st
model/auth_flow.go:293
↓ 3 callersFunctionUpdateChannel
(c *gin.Context)
controller/channel.go:1218
↓ 3 callersFunctionUpdateChannelBalanceDetail
UpdateChannelBalanceDetail stores a balance query of a channel. update gets the stored detail, nil before the first query, and returns the detail to s
model/channel_balance.go:45
↓ 3 callersFunctionUpdateChannelOtherInfo
UpdateChannelOtherInfo runs update on the stored channel and writes the other_info it leaves, with the columns update returns, only while the stored o
model/channel.go:381
↓ 3 callersFunctionUpdateCompletionRatioByJSONString
(jsonStr string)
setting/ratio_setting/model_ratio.go:432
↓ 3 callersFunctionUpdatePendingTopUpStatus
(tradeNo string, expectedPaymentProvider string, targetStatus string)
model/topup.go:146
↓ 3 callersFunctionUpdateRequestPolicyOptions
UpdateRequestPolicyOptions validates the entire resulting policy before any write. Unknown JSON rule fields stay in the original option string.
model/request_policy.go:211
↓ 3 callersFunctionUpdateToken
(c *gin.Context)
controller/token.go:402
↓ 3 callersFunctionUpdateTopupGroupRatioByJSONString
(jsonStr string)
common/topup-ratio.go:25
↓ 3 callersFunctionUpdateUserBindColumn
UpdateUserBindColumn 第三方账号绑定字段的专用更新。 绑定操作必须只写绑定列:若改为“读取完整用户 → 改一个字段 → 整体更新”, 读快照期间并发发生的封禁、降权或分组变更会被旧快照覆盖恢复。 角色、状态、分组只允许通过各自带锁/CAS 的专用方法修改。
model/user.go:214
↓ 3 callersMethodUpdateWithTx
(tx *gorm.DB, updatePassword bool)
model/user.go:809
↓ 3 callersFunctionUpsertSystemInstance
(nodeName string, info any, startedAt int64, lastSeenAt int64)
model/system_instance.go:46
↓ 3 callersFunctionUsageFromResponsesUsage
(src *dto.Usage)
relaykit/relayconvert/response_compat.go:180
↓ 3 callersFunctionValidUsage
(usage *dto.Usage)
service/usage_helpr.go:32
↓ 3 callersFunctionValidateChannelTestConcurrency
(value string)
setting/operation_setting/monitor_setting.go:75
↓ 3 callersMethodValidateResolvedIP
ValidateResolvedIP validates a domain's resolved IP immediately before dialing it.
common/ssrf_protection.go:315
↓ 3 callersFunctionValidateStepUpIdentity
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 callersFunctionValidateTOTPCode
ValidateTOTPCode 验证TOTP验证码
common/totp.go:38
↓ 3 callersFunctionValidateTaskArtifactBaseURL
ValidateTaskArtifactBaseURL validates configuration syntax only. It deliberately performs no DNS lookup or reachability probe.
service/task_artifact_access.go:70
↓ 3 callersFunctionValidateToolPricesJSON
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 callersFunctionValidateURLWithFetchSetting
ValidateURLWithFetchSetting 使用FetchSetting配置验证URL
common/ssrf_protection.go:376
↓ 3 callersFunctionVerifyTwoFactorCode
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 callersFunctionWithClaudeError
(claudeError ClaudeError, statusCode int, ops ...NewAPIErrorOptions)
relaykit/types/error.go:357
↓ 3 callersFunctionWithCollector
(ctx context.Context)
relaykit/relayconvert/internal/convdiag/collector.go:16
↓ 3 callersMethodWithDefaults
(serverAddress string)
setting/system_setting/passkey.go:154
↓ 3 callersMethodWithSkippedRoutes
WithSkippedRoutes returns a shallow immutable copy that leaves the given routes out of RouteGroups. Callers use it before publication.
pkg/jsplugin/routing.go:338
↓ 3 callersMethodWrite
(data []byte)
router/plugin-router.go:553
↓ 3 callersFunctionWriteNativeReply
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:1567
↓ 3 callersFunctionabortTaskPluginRouteError
(c *gin.Context, status int)
middleware/task_plugin.go:1695
↓ 3 callersFunctionaccessTokenMutationEndpoints
accessTokenMutationEndpoints lists every proof-guarded access token operation for one scoped token of the test user.
controller/security_enrollment_test.go:159
↓ 3 callersFunctionactionFor
(req)
plugins/tasks/vidu/plugin.js:305
↓ 3 callersFunctionactionForImageCount
(imageCount)
plugins/tasks/jimeng/plugin.js:114
↓ 3 callersFunctionactionName
(ctx)
plugins/tasks/sunoapi/plugin.js:74
↓ 3 callersFunctionactivateTaskPlugin
(key: string, version: string)
web/src/features/task-plugins/api.ts:157
↓ 3 callersMethodadd
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 callersFunctionaffinityTestKeys
(t *testing.T)
service/channel_affinity_usage_cache_test.go:17
↓ 3 callersFunctionapiKeyHeaderAuth
()
web/src/features/channels/lib/advanced-custom.ts:231
↓ 3 callersFunctionapiRoot
(ctx)
plugins/tasks/kling/plugin.js:173
↓ 3 callersFunctionappendEncodedWebSearch
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 callersFunctionappendToolSurchargeLogInfo
(other *model.LogOther, items []ToolSurchargeItem)
service/text_quota.go:31
↓ 3 callersFunctionapplyAuthTemplate
(template string, apiKey string)
relay/channel/advancedcustom/adaptor.go:572
↓ 3 callersFunctionapplyPriceSyncSelections
( options: PricingOptions, selections: Record<string, Record<string, number | string>> )
web/src/features/model-pricing/pricing.ts:364
↓ 3 callersFunctionapplyRankingQuotaTimeRange
(query *gorm.DB, startTime int64, endTime int64)
model/usedata_rankings.go:77
↓ 3 callersFunctionapplyStartupSyncRevisions
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 callersMethodapplyStepHeaders
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 callersFunctionartifactData
(ctx)
plugins/tasks/sunoapi/plugin.js:183
↓ 3 callersFunctionartifactKey
(type, song)
plugins/tasks/sunoapi/plugin.js:192
↓ 3 callersFunctionasClaudeResponse
(response any)
relaykit/relayconvert/response_registry.go:1302
↓ 3 callersFunctionasGeminiChatResponse
(response any)
relaykit/relayconvert/response_registry.go:1313
↓ 3 callersFunctionasOAIChatResponse
(response any)
relaykit/relayconvert/response_registry.go:1258
↓ 3 callersFunctionassertAccessTokensUnchanged
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 callersFunctionassignDisplayLogIds
(logs []*Log, startIdx int)
model/log.go:109
↓ 3 callersFunctionattachedFunctions
attachedFunctions returns the function declarations and the tool choice that AttachRequest wrote into a Chat, Claude, or Gemini request, decoded from
relaykit/relayconvert/internal/toolconv/policy_test.go:141
↓ 3 callersFunctionauditResponseSuccess
auditResponseSuccess 依据 HTTP 状态码与响应体推断操作是否成功。 优先解析响应 JSON 中的 success 字段;无法解析时退回到状态码判断。
middleware/audit.go:190
↓ 3 callersFunctionauthFlowTokenHash
(token string)
model/auth_flow.go:144
↓ 3 callersFunctionauthHelper
(c *gin.Context, minRole int)
middleware/auth.go:52
↓ 3 callersFunctionauthorizationToken
(header string)
middleware/auth.go:345
↓ 3 callersFunctionavg
(sum int64, count int64)
pkg/perf_metrics/metrics.go:549
↓ 3 callersFunctionavgTps
(value counters)
pkg/perf_metrics/metrics.go:563
↓ 3 callersFunctionawsStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, a *Adaptor)
relay/channel/aws/relay-aws.go:266
↓ 3 callersMethodbase64URL
(value: string)
pluginkit/v1.d.ts:23
↓ 3 callersMethodbase64URLDecode
(value: string)
pluginkit/v1.d.ts:24
↓ 3 callersMethodbatchQueryContext
(key, baseURL, proxy string, tasks []map[string]any)
relay/channel/task/jsplugin/adaptor.go:1337
↓ 3 callersFunctionbodyHash
bodyHash is the hex SHA-256 of a request body, which signRequest gets.
relay/channel/providerplugin/chain.go:105
↓ 3 callersFunctionbodySHA256
(body []byte)
relay/channel/task/jsplugin/credential.go:170
↓ 3 callersFunctionboolPtr
(v bool)
relaykit/relayconvert/reasoning/intent_test.go:215
↓ 3 callersFunctionboxHeader
(bytes, offset, end)
plugins/tasks/xai/plugin.js:597
↓ 3 callersFunctionbuildApiParams
(config: { page: number pageSize: number searchParams: Record<string, unknown> columnFilters?: Array<{
web/src/features/usage-logs/lib/utils.ts:157
↓ 3 callersFunctionbuildApiPath
(endpoint: string, isAdmin: boolean)
web/src/features/usage-logs/api.ts:40
↓ 3 callersFunctionbuildAuditDetails
( entry: AuditLog, t: TFunction, options: AuditDetailOptions = {} )
web/src/features/usage-logs/audit/lib/audit-details.ts:389
↓ 3 callersFunctionbuildChannelAffinityStatsContextForTest
(ruleName, usingGroup, keyFP string)
service/channel_affinity_usage_cache_test.go:23
↓ 3 callersFunctionbuildDashboardFlowData
( rows: FlowQuotaDataItem[], metric: FlowMetric = 'quota', options: FlowBuildOptions = {} )
web/src/features/dashboard/lib/flow.ts:976
↓ 3 callersFunctionbuildEstimatorTokens
( promptTokens: number, completionTokens: number, extraTokenValues: ExtraTokenValues, exprStr: string
web/src/features/pricing/lib/tier-expr.ts:320
↓ 3 callersFunctionbuildFlowSankeySpec
( flow: DashboardFlowGraph, title: string, valueFormatter: (value: number) => string = formatNumber, l
web/src/features/dashboard/lib/flow.ts:1122
↓ 3 callersFunctionbuildFormDefaults
(defaults: FlatOAuthDefaults)
web/src/features/system-settings/auth/oauth-section.tsx:178
↓ 3 callersFunctionbuildLogLikeCondition
(column string, value string)
model/log.go:32
↓ 3 callersFunctionbuildOAuthCallbackUrl
( serverAddress: string, callbackPath: string, fallback: string )
web/src/features/system-settings/auth/oauth-callback-url.ts:27
↓ 3 callersFunctionbuildOpenAIModel
(modelName string, ownerByModel map[string]string)
controller/model.go:178
↓ 3 callersFunctionbuildPreviewRows
( values: ModelPricingFormValues, mode: PricingMode, billingExpr: string, requestRuleExpr: string, p
web/src/features/system-settings/models/model-pricing-core.ts:261
↓ 3 callersFunctionbuildPricingChanges
( snapshot: ModelPricingConfig, before: PricingOptions, after: PricingOptions )
web/src/features/model-pricing/api.ts:179
↓ 3 callersFunctionbuildQueryParams
( params: Record<string, unknown> )
web/src/features/usage-logs/lib/query-params.ts:19
↓ 3 callersFunctionbuildQuotaAuditOperation
( action: string, params: Record<string, unknown>, success: boolean, t: Translate )
web/src/features/usage-logs/lib/quota-audit-operation.ts:46
↓ 3 callersFunctionbuildResponsesWSCreateEvent
(jsonData []byte, generate common.RawMessage, streamID string)
relay/responses_websocket.go:1013
← previousnext →2,401–2,500 of 15,592, ranked by callers