MCPcopy Create free account

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

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

↓ 6 callersMethodGetCacheCreation5mTokens
()
relaykit/dto/claude.go:705
↓ 6 callersMethodGetChannelName
()
relay/channel/adapter.go:32
↓ 6 callersFunctionGetCompletionRatio
(name string)
setting/ratio_setting/model_ratio.go:436
↓ 6 callersFunctionGetEpayClient
()
controller/topup.go:138
↓ 6 callersMethodGetIdentifier
()
relaykit/types/file_source.go:15
↓ 6 callersFunctionGetRandomSatisfiedChannel
( group string, model string, retry int, filters []dto.ChannelFilter, )
model/channel_cache.go:123
↓ 6 callersMethodGetRetry
()
service/channel_select.go:58
↓ 6 callersFunctionGetSubscriptionPlanById
(id int)
model/subscription.go:397
↓ 6 callersFunctionGetTaskPluginOptions
(c *gin.Context)
controller/task_plugin.go:947
↓ 6 callersFunctionGetTaskPluginSyncSnapshot
GetTaskPluginSyncSnapshot returns the enabled override set together with a deterministic revision of every active database override. Nodes can compare
model/task_plugin.go:195
↓ 6 callersFunctionGetToolPriceForModel
GetToolPriceForModel returns the price ($/1K calls) for a tool given a model name. Lookup: longest prefix match → tool default → 0.
setting/operation_setting/tools.go:254
↓ 6 callersMethodGetTools
GetTools 获取工具列表
relaykit/dto/claude.go:462
↓ 6 callersFunctionGetTopupGroupRatio
(name string)
common/topup-ratio.go:32
↓ 6 callersFunctionGetUserAccessToken
(userID, id int)
model/user_access_token.go:100
↓ 6 callersFunctionGetUserAccessTokenStatus
GetUserAccessTokenStatus reads last use of the legacy token from the access audit. Deprecated: 旧版面板访问令牌,仅在升级后的过渡期内使用;删除 users.access_token 列时一并移除。
model/audit_log.go:220
↓ 6 callersFunctionGetUserUsableGroups
(userGroup string)
service/group.go:14
↓ 6 callersFunctionGetUsernameById
GetUsernameById gets username from Redis first, falls back to DB if needed
model/user.go:1506
↓ 6 callersFunctionHandleClaudeResponseData
(c *gin.Context, info *relaycommon.RelayInfo, claudeInfo *ClaudeResponseInfo, httpResp *http.Response, data []
relay/channel/claude/relay-claude.go:358
↓ 6 callersFunctionHandleOAuth
HandleOAuth handles OAuth callback for all standard OAuth providers
controller/oauth.go:146
↓ 6 callersFunctionHeaderNavModulePublicOrUserAuth
(module string)
middleware/header_nav.go:130
↓ 6 callersFunctionIncreaseTokenQuota
(tokenId int, key string, quota int)
model/token.go:382
↓ 6 callersMethodInsert
()
model/topup.go:55
↓ 6 callersMethodInsert
()
model/midjourney.go:164
↓ 6 callersMethodIsStringSystem
()
relaykit/dto/claude.go:588
↓ 6 callersFunctionListTaskPluginVersions
(key string)
model/task_plugin.go:145
↓ 6 callersMethodLookupDeclaredRoutes
LookupDeclaredRoutes returns every binding of a path shape, in ascending key order.
pkg/jsplugin/routing.go:202
↓ 6 callersFunctionMidjourneyErrorWrapper
(code int, desc string)
service/error.go:21
↓ 6 callersFunctionMigrateRetiredFrontendOptions
MigrateRetiredFrontendOptions normalizes options that belonged to the removed dashboard frontend. Each legacy console setting is migrated in its own t
model/frontend_option_migration.go:20
↓ 6 callersFunctionObjectMember
ObjectMember returns a member of a JSON object exactly as written, or nil when the member is missing or null or data is not an object. A decoded map e
relaykit/relayconvert/kitutil/json.go:131
↓ 6 callersFunctionOpenaiImageHandler
OpenaiImageHandler handles non-streaming OpenAI image responses (generations/edits), returning the parsed usage for billing.
relay/channel/openai/relay_image.go:25
↓ 6 callersMethodOverridePlugins
()
pkg/jsplugin/registry.go:260
↓ 6 callersFunctionParseAccessTokenSessionID
(sid string)
model/user_access_token.go:239
↓ 6 callersFunctionParseDashboardAccessToken
ParseDashboardAccessToken distinguishes new-api dashboard JWTs from opaque credentials. A token carrying the dashboard issuer, audience and a known to
service/auth_token.go:107
↓ 6 callersMethodPluginsByChannelType
(channelType int)
pkg/jsplugin/registry.go:141
↓ 6 callersFunctionPrepareResponsesRequest
PrepareResponsesRequest applies the same model, conversion and channel rules for HTTP and WebSocket requests. The caller closes closer after the attem
relay/responses_request.go:25
↓ 6 callersFunctionPrepareTaskPluginSubmit
()
middleware/task_plugin.go:1799
↓ 6 callersMethodPreservesJSONOrder
PreservesJSONOrder reports whether the plugin declared json-order@1: its hooks receive JSON request bodies with members in the order the client sent t
pluginkit/meta.go:393
↓ 6 callersFunctionQuotaRound
QuotaRound converts a float64 quota value to int using half-away-from-zero rounding with int32 saturation. Every tiered billing path (pre-consume, set
pkg/billingexpr/round.go:12
↓ 6 callersFunctionRecordChannelAffinity
(c *gin.Context, channelID int)
service/channel_affinity.go:729
↓ 6 callersFunctionRecordOperationAuditLog
RecordOperationAuditLog writes new operation/security events to the audit table. logUserId 为日志归属者,管理审计日志应归属实际操作者;目标资源/用户放入 action params。username 内部按
model/log.go:230
↓ 6 callersFunctionRecordRelayErrorLog
RecordRelayErrorLog writes the error log of a failed relay request when error logs are on. channelId is 0 for a request that reached no channel.
service/relay_error.go:81
↓ 6 callersFunctionRefreshExpiringPluginCredentials
RefreshExpiringPluginCredentials runs one background refresh scan.
service/provider_plugin.go:483
↓ 6 callersFunctionResponseChunkData
(c *gin.Context, resp dto.ResponsesStreamResponse, data string)
relay/helper/common.go:240
↓ 6 callersFunctionSanitizeURLForLog
(rawURL string)
relay/common/relay_utils.go:40
↓ 6 callersFunctionSetApiRouter
(router *gin.Engine)
router/api-router.go:17
↓ 6 callersMethodSetModelName
(modelName string)
relaykit/dto/request_common.go:11
↓ 6 callersMethodSetScopes
(scopes []string)
model/user_access_token.go:71
↓ 6 callersFunctionSetUpLogger
(server *gin.Engine)
middleware/logger.go:21
↓ 6 callersFunctionSetVideoRouter
(router *gin.Engine)
router/video-router.go:10
↓ 6 callersFunctionSettleMidjourneyTaskBilling
SettleMidjourneyTaskBilling charges a persisted legacy task and records the applied stages.
service/midjourney.go:63
↓ 6 callersMethodSupportedEndpointTypesForModel
(model string)
relaykit/dto/channel_settings.go:339
↓ 6 callersFunctionSyncTaskType
SyncTaskType is the system task type of a topic's sync tasks.
model/system_sync_task.go:29
↓ 6 callersFunctionTaskArtifactContent
(c *gin.Context)
controller/task.go:319
↓ 6 callersMethodToBaseUser
()
model/user.go:117
↓ 6 callersMethodToResponse
()
model/system_task.go:572
↓ 6 callersFunctionTryUserAuth
()
middleware/auth.go:98
↓ 6 callersMethodUnwrap
()
pluginkit/engine.go:72
↓ 6 callersFunctionUpdateAbilityStatus
(channelId int, status bool)
model/ability.go:354
↓ 6 callersFunctionUpdateChannelLocked
UpdateChannelLocked lets update change a channel's key while no other node or goroutine can: MySQL and PostgreSQL hold the channel row lock across upd
model/channel_plugin_credential.go:55
↓ 6 callersFunctionUpdateModelPricing
(changes []ModelPricingChange)
model/model_pricing_config.go:630
↓ 6 callersFunctionUpdateScheduledChannelLocked
UpdateScheduledChannelLocked persists a completed scheduled result. update only compares the prepared key and applies validated data to the current ro
model/channel_plugin_credential.go:242
↓ 6 callersFunctionUsageFromChatUsage
(src *dto.Usage)
relaykit/relayconvert/response_compat.go:156
↓ 6 callersFunctionUsedUsageKeys
UsedUsageKeys returns literal keys referenced by u("...") calls. Calls with dynamic arguments are intentionally omitted because they cannot be validat
pkg/billingexpr/compile.go:340
↓ 6 callersFunctionValidateAccessToken
ValidateAccessToken resolves a legacy plaintext access token. After the transition deadline it rejects every value without querying the database. Dep
model/user.go:1248
↓ 6 callersMethodValidateNetworkTarget
ValidateNetworkTarget validates the host and port before dialing.
common/ssrf_protection.go:286
↓ 6 callersMethodWriteHeaderNow
()
relay/requestplugin/reply.go:824
↓ 6 callersMethodacquire
( pluginKey string, userID int, tokenID int, )
controller/plugin_protocol_limiter.go:65
↓ 6 callersFunctionauditContentEN
auditContentEN 按 action 模板渲染英文兜底文本;未登记的 action 退回 action 本身。
controller/audit.go:106
↓ 6 callersFunctionauditOperatorInfo
auditOperatorInfo 从上下文构建操作者身份信息(管理员 id/用户名/角色)。
controller/audit.go:120
↓ 6 callersFunctionauthRotationData
authRotationData is empty when the change came through an access token, which has no browser session to rotate.
controller/auth_session.go:184
↓ 6 callersFunctioncacheGetUserBase
(userId int)
model/user_cache.go:129
↓ 6 callersFunctioncancel
()
web/src/features/channels/hooks/use-channel-priority-drag.ts:744
↓ 6 callersFunctioncanonicalUsageFromResponse
(response any)
relaykit/relayconvert/response_registry.go:844
↓ 6 callersFunctionclearAuthentication
( synchronizeTabs = true, bootstrapState: AuthBootstrapState = 'complete' )
web/src/lib/auth-session.ts:187
↓ 6 callersFunctionconfirmPaymentComplianceForTest
(t *testing.T)
controller/payment_webhook_availability_test.go:26
↓ 6 callersFunctioncreateAppQueryClient
( onInternalServerError?: () => void )
web/src/lib/query-client.ts:36
↓ 6 callersFunctioncreateEpayTestOrder
(t *testing.T, userId int, tradeNo string, provider string, status string)
model/payment_method_guard_test.go:177
↓ 6 callersFunctioncreateLog
(log *Log)
model/log.go:100
↓ 6 callersFunctioncreateOAuthFlow
( provider: string, intent: 'login' | 'bind' | 'verify', operation?: VerificationOperation, signal?: A
web/src/features/auth/api.ts:216
↓ 6 callersFunctioncreateQuotaTestOperator
(t *testing.T, db *gorm.DB, role int)
controller/user_manage_test.go:231
↓ 6 callersFunctiondataURI
(mime string, data []byte)
relay/requestplugin/attachments_test.go:73
↓ 6 callersFunctiondiagnosticCodes
(diagnostics []types.ConversionDiagnostic)
relaykit/relayconvert/reasoning/intent_test.go:219
↓ 6 callersMethodencode
(out *bytes.Buffer)
pkg/requestpatch/patch.go:494
↓ 6 callersMethodensureStart
()
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:158
↓ 6 callersFunctionfetchInferenceStatus
fetchInferenceStatus reads only fixed paths on an operator-configured channel. Each endpoint can fail independently; upstream errors never echo creden
controller/channel_inference.go:83
↓ 6 callersFunctionfetchLogs
( endpoint: string, params: T, isAdmin: boolean )
web/src/features/usage-logs/api.ts:44
↓ 6 callersFunctionfinishSystemTaskHandler
(task *model.SystemTask, runnerID string, status model.SystemTaskStatus, result any, runErr error)
controller/system_task_handlers.go:204
↓ 6 callersFunctionformatBytes
( bytes: number, locales?: Intl.LocalesArgument )
web/src/lib/format.ts:45
↓ 6 callersFunctionformatTaskUsageUnitPrice
( valuePerUnit: number, options: DynamicPriceOptions )
web/src/features/pricing/lib/dynamic-price.ts:233
↓ 6 callersFunctionformatTimestampRelative
( timestamp?: number, unit: 'seconds' | 'milliseconds' = 'seconds', locales?: Intl.LocalesArgument )
web/src/lib/format.ts:200
↓ 6 callersFunctionformatTokens
(value: number)
web/src/features/rankings/lib/format.ts:24
↓ 6 callersFunctionformatUserLogs
(logs []*Log, startIdx int)
model/log.go:115
↓ 6 callersFunctiongetAuthenticatedUser
(c *gin.Context)
controller/passkey.go:627
↓ 6 callersFunctiongetCurrentVersion
(message: Message)
web/src/features/playground/lib/message/message-utils.ts:42
↓ 6 callersFunctiongetDynamicPricingSummary
( model: PricingModel, options: DynamicPriceOptions )
web/src/features/pricing/lib/dynamic-price.ts:389
↓ 6 callersFunctiongetPaymentErrorTranslation
( response: unknown )
web/src/features/wallet/lib/payment.ts:38
↓ 6 callersFunctiongetRouteIncomingPath
(route: AdvancedCustomRoute)
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:169
↓ 6 callersFunctiongetSuccessRateTextClass
(rate: number)
web/src/features/performance-metrics/lib/format.ts:88
↓ 6 callersFunctiongetUpstreamDisplayName
( sourceName: string, t: (key: string) => string )
web/src/features/system-settings/models/upstream-ratio-sync-helpers.ts:52
↓ 6 callersFunctionhasDiagnosticCode
(diagnostics []types.ConversionDiagnostic, code string)
relaykit/relayconvert/internal/toolconv/policy_test.go:26
← previousnext →1,101–1,200 of 15,592, ranked by callers