MCPcopy Create free account

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

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

↓ 1 callersMethodCallJSONInto
CallJSONInto is CallInto with the semantics of JSON.stringify's text of the result instead of the host codec's encoding: objects keep their member ord
pluginkit/engine.go:348
↓ 1 callersMethodCallListArtifacts
CallListArtifacts runs listArtifacts with the artifact context of a task and validates the list. An invalid list is a *ResultError; other errors are t
pluginkit/task.go:338
↓ 1 callersMethodCallParseBalance
CallParseBalance runs parseBalance(ctx, {status, headers, body}). A returned {error} is an error with the plugin's message.
pluginkit/provider.go:1984
↓ 1 callersMethodCallParseBatchResult
CallParseBatchResult runs parseBatchResult with the batch query context, the upstream body and HookHTTPResponse. A result of the wrong shape is a *Res
pluginkit/task.go:239
↓ 1 callersMethodCallParseSubmitResponse
CallParseSubmitResponse runs parseSubmitResponse with the driver context. A result of the wrong shape, without a taskId or with clientResponse (ErrSub
pluginkit/task.go:163
↓ 1 callersMethodCallParseTaskResult
CallParseTaskResult runs parseTaskResult with the task query context, the upstream body (parsed JSON, else text) and HookHTTPResponse. A result of the
pluginkit/task.go:207
↓ 1 callersMethodCallPathInto
CallPathInto is CallInto for a function nested below an exported object.
pluginkit/engine.go:368
↓ 1 callersMethodCallPathJSONInto
CallPathJSONInto is CallJSONInto for a function nested below an exported object, such as native.render: objects keep their member order.
pluginkit/engine.go:375
↓ 1 callersMethodCallSubmitEvent
CallSubmitEvent runs hook, parseSubmitEvent or parseSubmitEventDelta (see UsesSubmitEventDelta), on one event with the previous state, and checks the
pluginkit/task.go:292
↓ 1 callersMethodCapacity
()
pkg/cachex/hybrid_cache.go:273
↓ 1 callersMethodChannelConfigSchemaJSON
ChannelConfigSchemaJSON returns meta.channelConfig as normalized JSON text, nil when the plugin declares none.
pluginkit/config_schema.go:207
↓ 1 callersFunctionChannelConfigURL
ChannelConfigURL returns the url property name of a channel plugin config, empty when it has no value.
pluginkit/config_schema.go:294
↓ 1 callersFunctionChannelTypeOf
(m Meta)
relaykit/relayconvert/convmeta/meta.go:307
↓ 1 callersFunctionChargeViolationFeeIfNeeded
ChargeViolationFeeIfNeeded charges an additional fee after the normal flow finishes (including refund). It uses Grok fee settings as the fee policy.
service/violation_fee.go:103
↓ 1 callersFunctionChatCompletionsRequestToResponsesRequest
(req *dto.GeneralOpenAIRequest)
relaykit/relayconvert/request_compat.go:60
↓ 1 callersFunctionChatCompletionsResponseToResponsesResponse
(resp *dto.OpenAITextResponse, id string)
relaykit/relayconvert/response_compat.go:148
↓ 1 callersFunctionChatCompletionsStreamChunkToResponsesEvents
(chunk *dto.ChatCompletionsStreamResponse, state *ChatToResponsesStreamState)
relaykit/relayconvert/response_compat.go:164
↓ 1 callersFunctionChatCompletionsStreamChunkToResponsesEvents
(chunk *dto.ChatCompletionsStreamResponse, state *ChatToResponsesStreamState)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:329
↓ 1 callersFunctionChats2JsonString
()
setting/chat.go:50
↓ 1 callersFunctionCheckGroupRatio
(jsonStr string)
setting/ratio_setting/group_ratio.go:108
↓ 1 callersFunctionCheckModelRequestRateLimitGroup
(jsonStr string)
setting/rate_limit.go:62
↓ 1 callersFunctionCheckSetup
()
model/main.go:93
↓ 1 callersFunctionClaudeChunkData
(c *gin.Context, resp dto.ClaudeResponse, data string)
relay/helper/common.go:230
↓ 1 callersFunctionClaudeDefaultEffort
ClaudeDefaultEffort is the effort the model runs at when a request sets none.
relaykit/relayconvert/reasoning/claude.go:422
↓ 1 callersFunctionClaudeErrorWrapper
OpenAIErrorWrapper wraps an error into an OpenAIErrorWithStatusCode func OpenAIErrorWrapper(err error, code string, statusCode int) *dto.OpenAIErrorWi
service/error.go:62
↓ 1 callersFunctionClaudeHelper
(c *gin.Context, info *relaycommon.RelayInfo)
relay/claude_handler.go:23
↓ 1 callersFunctionClaudeStopReasonToOpenAIFinishReason
(stopReason string)
relaykit/reasonmap/reasonmap.go:9
↓ 1 callersFunctionClaudeUsesManualThinking
ClaudeUsesManualThinking reports whether an exact numeric budget is rendered as legacy extended thinking rather than being reduced to adaptive effort.
relaykit/relayconvert/reasoning/claude.go:411
↓ 1 callersFunctionCleanupFileSources
CleanupFileSources 清理请求中所有注册的 FileSource 应在请求结束时调用(通常由中间件自动调用)
service/file_service.go:144
↓ 1 callersFunctionCleanupOldCacheFiles
CleanupOldCacheFiles 清理旧的缓存文件(用于启动时清理残留)
common/body_storage.go:443
↓ 1 callersFunctionCleanupSubscriptionPreConsumeRecords
CleanupSubscriptionPreConsumeRecords removes old idempotency records to keep table small.
model/subscription.go:1489
↓ 1 callersFunctionClearChannelAffinityCacheAll
()
service/channel_affinity.go:200
↓ 1 callersFunctionClearChannelAffinityCacheByRuleName
(ruleName string)
service/channel_affinity.go:215
↓ 1 callersMethodClearToolCalls
()
relaykit/dto/openai_response.go:178
↓ 1 callersFunctionClearUserAuthorization
(userID int)
service/authz/override.go:93
↓ 1 callersFunctionClearUserPermissions
(userID int)
service/authz/override.go:70
↓ 1 callersFunctionClearUserPermissionsInTx
(tx *gorm.DB, userID int)
service/authz/override.go:84
↓ 1 callersFunctionClientRequestHeaders
ClientRequestHeaders is the client's request headers as decoders and driver hooks receive them: the first value of each under its canonical name, with
pluginkit/task.go:411
↓ 1 callersFunctionClientRequestHeaders
ClientRequestHeaders is the client's request headers as decoders and driver hooks receive them.
relay/channel/task/jsplugin/adaptor.go:43
↓ 1 callersFunctionCloneUsageExamples
CloneUsageExamples copies example facts for independent readers.
pluginkit/meta.go:906
↓ 1 callersFunctionCloneUsageSchema
CloneUsageSchema copies schema fields and localized metadata for independent readers.
pluginkit/meta.go:880
↓ 1 callersMethodClose
()
relaykit/types/file_source.go:209
↓ 1 callersMethodClose
()
relay/channel/openai/relay_responses_billing_test.go:55
↓ 1 callersFunctionCloseActiveWebSocketsForChannels
(channelIDs []int, reason string)
service/ws_close.go:11
↓ 1 callersFunctionCloseDB
()
model/main.go:709
↓ 1 callersMethodCloseIdleConnections
()
service/http_transport_sharded.go:83
↓ 1 callersMethodComplete
Complete releases the reservation. A successful outcome records the request in the key's sliding window; a failed one only frees the slot.
common/rate-limit.go:194
↓ 1 callersFunctionCompleteEmailBinding
CompleteEmailBinding commits failed attempts even though verification fails. Successful confirmation consumes the flow in the same transaction as the
model/email_binding.go:101
↓ 1 callersMethodConvOptions
ConvOptions snapshots host settings for the converters. Rebuilt on each call site's first use; cached so one relay session sees one snapshot.
relay/common/relay_info.go:981
↓ 1 callersMethodConversionDiagnosticsTruncated
()
relay/common/conversion_diagnostics.go:69
↓ 1 callersMethodConvertChunk
(event *dto.ResponsesStreamResponse, estimatedInputTokens int)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:82
↓ 1 callersMethodConvertChunk
(claudeResponse *dto.ClaudeResponse)
relaykit/relayconvert/internal/claude_messages/to_oai_chat_resp.go:140
↓ 1 callersMethodConvertClaudeRequest
(c *gin.Context, info *relaycommon.RelayInfo, req *dto.ClaudeRequest)
relay/channel/ali/adaptor.go:54
↓ 1 callersMethodConvertClaudeRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.ClaudeRequest)
relay/channel/openai/adaptor.go:62
↓ 1 callersMethodConvertClaudeRequest
(*gin.Context, *relaycommon.RelayInfo, *dto.ClaudeRequest)
relay/channel/submodel/adaptor.go:24
↓ 1 callersMethodConvertClaudeRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.ClaudeRequest)
relay/channel/advancedcustom/adaptor.go:75
↓ 1 callersMethodConvertGeminiRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeminiChatRequest)
relay/channel/advancedcustom/adaptor.go:93
↓ 1 callersMethodConvertImageRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.ImageRequest)
relay/channel/minimax/adaptor.go:80
↓ 1 callersMethodConvertImageRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.ImageRequest)
relay/channel/vertex/adaptor.go:115
↓ 1 callersMethodConvertOpenAIRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeneralOpenAIRequest)
relay/channel/ali/adaptor.go:132
↓ 1 callersMethodConvertOpenAIRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeneralOpenAIRequest)
relay/channel/zhipu_4v/adaptor.go:98
↓ 1 callersMethodConvertOpenAIResponsesRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.OpenAIResponsesRequest)
relay/channel/codex/adaptor.go:55
↓ 1 callersFunctionConvertRerankRequest
(request dto.RerankRequest)
relay/channel/ali/rerank.go:16
↓ 1 callersMethodConvertRerankRequest
(c *gin.Context, relayMode int, request dto.RerankRequest)
relay/channel/advancedcustom/adaptor.go:179
↓ 1 callersFunctionConvertResponseByID
(c context.Context, info convmeta.Meta, converter string, response any)
relaykit/relayconvert/response_registry.go:256
↓ 1 callersFunctionCountAllTasks
CountAllTasks returns total midjourney tasks for admin query
model/midjourney.go:215
↓ 1 callersFunctionCountAllUserTask
CountAllUserTask returns total midjourney tasks for user
model/midjourney.go:235
↓ 1 callersFunctionCountAudioTokenInput
(audioBase64 string, audioFormat string)
service/token_counter.go:248
↓ 1 callersFunctionCountAudioTokenOutput
(audioBase64 string, audioFormat string)
service/token_counter.go:260
↓ 1 callersFunctionCountTokenInput
(input any, model string)
service/token_counter.go:228
↓ 1 callersFunctionCountTokenRealtime
(info *relaycommon.RelayInfo, request dto.RealtimeEvent, model string)
service/token_counter.go:174
↓ 1 callersFunctionCountUsersByEmail
(email string)
model/user.go:322
↓ 1 callersMethodCovers
Covers reports whether the scope holds a request for model, whose name without its @ modifiers is base, sent through a channel of channelType; 0 befor
setting/request_plugin_setting/config.go:93
↓ 1 callersFunctionCreateBodyStorageFromReader
CreateBodyStorageFromReader 从 Reader 创建存储(用于大请求的流式处理)
common/body_storage.go:334
↓ 1 callersFunctionCreateEmailBinding
(identity AuthSessionIdentity, state EmailBindingState)
model/email_binding.go:36
↓ 1 callersFunctionCreateUserOAuthBinding
CreateUserOAuthBinding creates a new OAuth binding
model/user_oauth_binding.go:64
↓ 1 callersFunctionCreateUserSessionFromLoginFlow
CreateUserSessionFromLoginFlow commits the one-time login authorization and the resulting session together. The user lock serializes credential change
model/login_verification.go:52
↓ 1 callersFunctionCreateWaffoPancakePrimaryPair
CreateWaffoPancakePrimaryPair mints a Store + OnetimeProduct in one round-trip — the canonical "+ Create" entry point. Nothing is persisted to setting
service/waffo_pancake.go:372
↓ 1 callersFunctionCreateWaffoPancakePrimaryProduct
CreateWaffoPancakePrimaryProduct mints (and publishes) the wallet-top-up OnetimeProduct under storeID. Per-checkout price overrides via PriceSnapshot
service/waffo_pancake.go:328
↓ 1 callersFunctionCreateWaffoPancakePrimaryStore
CreateWaffoPancakePrimaryStore creates a Pancake Store using in-flight (not-yet-persisted) credentials and returns the new store ID.
service/waffo_pancake.go:266
↓ 1 callersFunctionCreateWaffoPancakeProductForPlan
CreateWaffoPancakeProductForPlan mints (and publishes) a Pancake OnetimeProduct priced at `amount` USD, used as a subscription plan's SubscriptionPlan
service/waffo_pancake.go:287
↓ 1 callersFunctionDecodeIconDataURI
DecodeIconDataURI parses a plugin logo shipped as a sidecar icon.svg or icon.png file and re-encoded by the uploader as data:image/png;base64,... or d
pluginkit/icon.go:28
↓ 1 callersFunctionDecodeJsonWithValidation
DecodeJsonWithValidation decodes JSON and applies Gin's configured binding-tag validator, including binding:"required" and any registered custom valid
common/json.go:84
↓ 1 callersMethodDecodeState
(v any)
model/system_task.go:568
↓ 1 callersFunctionDecrementMemoryBuffers
DecrementMemoryBuffers 减少内存缓存计数
common/disk_cache_config.go:131
↓ 1 callersFunctionDefaultModelRatio2JSONString
()
setting/ratio_setting/model_ratio.go:395
↓ 1 callersMethodDefaultValue
()
model/migration_dialector.go:51
↓ 1 callersMethodDelete
Delete rejects referenced vendors rather than leaving orphaned model records.
model/vendor_meta.go:80
↓ 1 callersMethodDeleteAbilities
()
model/ability.go:278
↓ 1 callersMethodDeleteByPrefix
(prefix string)
pkg/cachex/hybrid_cache.go:176
↓ 1 callersFunctionDeleteChannel
(c *gin.Context)
controller/channel.go:976
↓ 1 callersFunctionDeleteChannelBatch
(c *gin.Context)
controller/channel.go:1169
↓ 1 callersMethodDeleteDeployment
DeleteDeployment deletes an active deployment
pkg/ionet/deployment.go:164
↓ 1 callersFunctionDeleteDisabledChannel
()
model/channel.go:1092
↓ 1 callersFunctionDeleteExpiredAuthFlows
(now time.Time)
model/auth_flow.go:306
↓ 1 callersFunctionDeleteExpiredUserAccessTokens
DeleteExpiredUserAccessTokens removes tokens that expired before the cutoff. Tokens that never expire are kept.
model/user_access_token.go:203
↓ 1 callersFunctionDeleteInvalidRedemptions
()
model/redemption.go:236
↓ 1 callersFunctionDeleteKey
(key string, purpose string)
common/verification.go:80
↓ 1 callersFunctionDeleteModelMeta
DeleteModelMeta 删除模型
controller/model_meta.go:193
↓ 1 callersFunctionDeleteOllamaModel
删除 Ollama 模型
relay/channel/ollama/relay-ollama.go:499
← previousnext →5,101–5,200 of 15,592, ranked by callers