MCPcopy Create free account

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

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

↓ 2 callersFunctionResponsesWebSocketHelper
(c *gin.Context, client *websocket.Conn, runner ResponsesWSRequestRunner)
relay/responses_websocket.go:130
↓ 2 callersFunctionRouteTaskPluginEndpoint
RouteTaskPluginEndpoint selects between ordinary relay and plugin channels before a plugin can validate or rewrite the client's request. Plugin calls
middleware/task_plugin.go:517
↓ 2 callersMethodSafetySettingFor
(category string)
relaykit/relayconvert/convmeta/options.go:112
↓ 2 callersMethodScan
Scan implements sql.Scanner interface
model/channel.go:191
↓ 2 callersFunctionSearchModels
(keyword string, vendor string, status string, syncOfficial string, offset int, limit int)
model/model_meta.go:486
↓ 2 callersFunctionSearchRedemptions
(keyword string, status string, startIdx int, num int)
model/redemption.go:62
↓ 2 callersFunctionSearchUsers
(keyword string, group string, role *int, status *int, startIdx int, num int, sortOptions ...UserSortOptions)
model/user.go:438
↓ 2 callersFunctionSecureVerificationRequired
SecureVerificationRequired protects channel key disclosure. Other sensitive operations validate their narrower proof scopes in their controller.
middleware/secure_verification.go:17
↓ 2 callersMethodServe
(c *gin.Context, task *model.Task, ref *StoredArtifactRef)
service/task_artifact_store.go:30
↓ 2 callersFunctionServeFrontendFiles
ServeFrontendFiles serves files from the embedded frontend build. The build never changes while the process runs, so each file is gzip-compressed once
middleware/frontend_static.go:34
↓ 2 callersMethodServesResponsesWebSocket
ServesResponsesWebSocket reports whether a Responses WebSocket session for model may run on the relay routes: the /v1/responses route serving it has n
pluginkit/meta.go:326
↓ 2 callersMethodSetAudit
(key string, value any)
model/log_other.go:128
↓ 2 callersFunctionSetCodec
SetCodec installs the JSON engine behind every kitutil JSON helper, which also covers the custom (Un)MarshalJSON methods on relaykit DTOs. Like SetLog
relaykit/relayconvert/kitutil/json.go:51
↓ 2 callersMethodSetContent
(content any)
relaykit/dto/claude.go:106
↓ 2 callersFunctionSetExposeRatioEnabled
(enabled bool)
setting/ratio_setting/expose_ratio.go:11
↓ 2 callersMethodSetIndex
(i int)
relaykit/dto/openai_response.go:135
↓ 2 callersFunctionSetLogLanguage
SetLogLanguage selects the language of server log lines. A language that starts with "zh" prints the Chinese text; anything else prints English.
common/log_text.go:20
↓ 2 callersFunctionSetLogging
(info LogFunc, errorFn LogFunc)
relaykit/relayconvert/kitutil/log.go:21
↓ 2 callersFunctionSetMediaResolver
(resolver MediaResolver)
relaykit/relayconvert/media.go:7
↓ 2 callersMethodSetResponsesToolState
SetResponsesToolState replaces that record; nil clears it. Request conversion calls it on every attempt so retries never inherit a record from another
relaykit/relayconvert/convmeta/meta.go:52
↓ 2 callersFunctionSetSyncTopicErrors
SetSyncTopicErrors records the items of topic this node failed to load, by key; nil or empty clears them.
service/node_sync.go:66
↓ 2 callersFunctionSetSystemErrorLogging
SetSystemErrorLogging configures the hook for internal converter failures.
relaykit/relayconvert/kitutil/log.go:31
↓ 2 callersFunctionSetTaskPluginDisabledFactoryKeysOption
(keys []string)
setting/task_plugin.go:111
↓ 2 callersFunctionSetTaskPluginStatus
(c *gin.Context)
controller/task_plugin.go:712
↓ 2 callersFunctionSetUserLangLoader
SetUserLangLoader sets the function to load user language (called from model package)
i18n/i18n.go:124
↓ 2 callersFunctionSetWebRouter
(router *gin.Engine, assets WebAssets, pluginDispatcher gin.HandlerFunc)
router/web-router.go:21
↓ 2 callersMethodSettle
Settle 根据实际消耗额度进行结算,计算 delta = actualQuota - preConsumedQuota, 同时调整资金来源(钱包/订阅)和令牌额度。
relay/common/billing.go:10
↓ 2 callersMethodSetupRequestHeader
(c *gin.Context, header *http.Header, info *relaycommon.RelayInfo)
relay/channel/providerplugin/adaptor.go:106
↓ 2 callersMethodSharedModel
SharedModel reports whether multiple plugins declare a model without copying its provider list on the relay hot path.
pkg/jsplugin/routing.go:171
↓ 2 callersFunctionShouldAttachThoughtSignature
(opts *convmeta.Options)
relaykit/relayconvert/internal/shared/gemini/request.go:66
↓ 2 callersFunctionShouldChatCompletionsUseResponsesGlobal
(channelID int, channelType int, model string)
service/openai_chat_responses_mode.go:47
↓ 2 callersFunctionShouldDisableByStatusCode
(code int)
setting/operation_setting/status_code_ranges.go:53
↓ 2 callersMethodStart
(server *smtp.ServerInfo)
common/email_ntlm_auth.go:21
↓ 2 callersMethodStartHostedTool
(start HostedToolStreamStart)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:139
↓ 2 callersFunctionStartOAuthVerification
(identity AuthIdentity, operation VerificationOperation, provider string)
service/oauth_verification.go:15
↓ 2 callersFunctionStartRealtime
StartRealtime takes the execution plan of a Realtime session. Its instances run on the session's events once the session knows its channel (NewRealtim
relay/requestplugin/socket.go:164
↓ 2 callersFunctionStopReasonClaudeToOpenAI
(reason string)
relaykit/relayconvert/internal/claude_messages/to_oai_chat_resp.go:31
↓ 2 callersMethodStopped
Stopped returns the error the client gets for a response an instance stopped, and nil for any other.
relay/requestplugin/socket.go:151
↓ 2 callersFunctionStreamResponseClaude2OpenAI
(claudeResponse *dto.ClaudeResponse)
relaykit/relayconvert/response_compat.go:50
↓ 2 callersFunctionStreamResponseGeminiChat2OpenAI
(geminiResponse *dto.GeminiChatResponse)
relaykit/relayconvert/response_compat.go:144
↓ 2 callersFunctionStreamResponseOpenAI2Claude
(openAIResponse *dto.ChatCompletionsStreamResponse, info *relaycommon.RelayInfo)
service/convert.go:13
↓ 2 callersFunctionStreamResponseOpenAI2Gemini
(openAIResponse *dto.ChatCompletionsStreamResponse, info *relaycommon.RelayInfo)
service/convert.go:25
↓ 2 callersFunctionStreamResponseOpenAI2Gemini
(openAIResponse *dto.ChatCompletionsStreamResponse, info convmeta.Meta)
relaykit/relayconvert/response_compat.go:132
↓ 2 callersFunctionString2Int
(str string)
common/str.go:77
↓ 2 callersFunctionStringsContains
(strs []string, str string)
common/str.go:85
↓ 2 callersFunctionSumUsedQuota
(logType int, startTimestamp int64, endTimestamp int64, modelName string, username string, tokenName string, c
model/log.go:693
↓ 2 callersMethodSupportsImagineModel
(modelName string)
relaykit/relayconvert/convmeta/options.go:104
↓ 2 callersMethodSupportsPassThroughBody
SupportsPassThroughBody reports whether the route converter leaves the request body untouched.
relaykit/dto/channel_settings.go:215
↓ 2 callersFunctionSyncTopicLoadFailed
SyncTopicLoadFailed records that this node's startup load of topic failed: StartNodeSync then leaves the topic unapplied, so the first tick loads it a
service/node_sync.go:112
↓ 2 callersFunctionTaskCreated
TaskCreated marks a submission whose task is stored: the task reports at its final state, so the submission does not report.
relay/requestplugin/task_report.go:116
↓ 2 callersFunctionTaskEgress
TaskEgress runs the egress stage on the upstream body a task submission attempt built, before it is sent. It changes nothing; an instance can only sto
relay/requestplugin/relay.go:172
↓ 2 callersFunctionTaskError
TaskError is the task error of a request plugin's rejection or failure: a local error, which never counts against the channel.
relay/requestplugin/relay.go:205
↓ 2 callersFunctionTaskExecutionSnapshotFromContext
TaskExecutionSnapshotFromContext captures immutable request and plugin provenance at submission time. It never copies plugin source or payloads.
service/task_plugin_audit.go:12
↓ 2 callersFunctionTaskGetAllTasks
(startIdx int, num int, queryParams SyncTaskQueryParams)
model/task.go:357
↓ 2 callersFunctionTaskPlatformUnavailableError
TaskPlatformUnavailableError explains why no adaptor serves the platform: the task-plugin system is switched off, the resolved plugin is disabled, or
relay/relay_adaptor.go:175
↓ 2 callersFunctionTaskPluginMarketplaceSourceKind
TaskPluginMarketplaceSourceKind returns the kind of the source at indexURL: the built-in official addresses are official, the built-in community addre
setting/task_plugin.go:33
↓ 2 callersFunctionTaskReport
TaskReport is what a task submission keeps for the report at the task's final state: the report instances in scope, the request as the record shows it
relay/requestplugin/task_report.go:59
↓ 2 callersMethodTimeoutResponse
TimeoutResponse is the documented non-stream polling timeout shape. Unlike a live stream timeout, its top-level state remains queued so clients know t
relay/plugin_protocol.go:645
↓ 2 callersMethodToMap
()
relaykit/dto/openai_request.go:304
↓ 2 callersMethodToSetting
()
types/price_data.go:119
↓ 2 callersMethodToWebAuthnCredential
()
model/passkey.go:75
↓ 2 callersFunctionTokenOperationAudit
TokenOperationAudit runs after UserAuth and before endpoint rate limits. Handlers add only allowlisted metadata; neither bodies nor raw errors are per
middleware/audit.go:210
↓ 2 callersFunctionUTF16Len
UTF16Len is the length of text in UTF-16 code units, as JavaScript counts a string.
pluginkit/transform.go:669
↓ 2 callersFunctionUnbindAccountOAuth
(identity AuthIdentity, providerID int)
service/account_security.go:15
↓ 2 callersFunctionUnmarshalNoCopy
UnmarshalNoCopy lets supporting codecs borrow strings and raw JSON from data. Keep data and borrowed raw JSON immutable while decoded values are in us
relaykit/relayconvert/kitutil/json.go:65
↓ 2 callersFunctionUnmarshalNoCopy
UnmarshalNoCopy borrows strings and raw JSON from data. Keep data and borrowed raw JSON immutable while decoded values are in use.
common/json.go:53
↓ 2 callersMethodUnmarshalNoCopy
(data []byte, v any)
common/json.go:31
↓ 2 callersMethodUnwrap
()
pluginkit/engine.go:54
↓ 2 callersMethodUnwrap
()
relay/helper/common.go:34
↓ 2 callersMethodUpdate
()
model/topup.go:120
↓ 2 callersMethodUpdate
Update 更新供应商记录
model/vendor_meta.go:57
↓ 2 callersMethodUpdate
Update Make sure your token's fields is completed, because this will update non-zero values
model/token.go:314
↓ 2 callersFunctionUpdateAbilityStatusByTag
(tag string, status bool)
model/ability.go:358
↓ 2 callersFunctionUpdateAudioCompletionRatioByJSONString
(jsonStr string)
setting/ratio_setting/model_ratio.go:680
↓ 2 callersFunctionUpdateAudioRatioByJSONString
(jsonStr string)
setting/ratio_setting/model_ratio.go:672
↓ 2 callersMethodUpdateBillingState
()
model/midjourney.go:176
↓ 2 callersFunctionUpdateCreateCacheRatioByJSONString
UpdateCreateCacheRatioByJSONString updates the create cache ratio map from a JSON string
setting/ratio_setting/cache_ratio.go:159
↓ 2 callersFunctionUpdateCustomOAuthProvider
UpdateCustomOAuthProvider updates an existing custom OAuth provider, with its sync topic bump in the same transaction.
model/custom_oauth_provider.go:126
↓ 2 callersFunctionUpdateImageRatioByJSONString
(jsonStr string)
setting/ratio_setting/model_ratio.go:654
↓ 2 callersFunctionUpdateModelPricingOptions
UpdateModelPricingOptions keeps legacy single-option callers on the same locking, validation and transaction path as the model-level API.
model/model_pricing_config.go:666
↓ 2 callersFunctionUpdatePluginKeyBalances
UpdatePluginKeyBalances merges results into the channel's per-key balance records and updates the USD balance when the results have one.
service/provider_plugin_balance.go:36
↓ 2 callersMethodUpdateQuota
()
model/task.go:578
↓ 2 callersFunctionUpdateRequestPluginInstances
UpdateRequestPluginInstances replaces the instance list whole, in the order given. Each config is saved as the plugin validated it, with its defaults.
controller/request_plugin.go:61
↓ 2 callersMethodUpdateResponseTime
(responseTime int64)
model/channel.go:667
↓ 2 callersFunctionUpdateTaskPluginMarketplaceSources
(c *gin.Context)
controller/task_plugin.go:878
↓ 2 callersFunctionUpdateUserAccessToken
UpdateUserAccessToken renames one token owned by userID and, when scopes is not nil, replaces its grant.
model/user_access_token.go:147
↓ 2 callersFunctionUpdateUserBindColumnForSessionWithTx
(tx *gorm.DB, identity AuthSessionIdentity, column, value string)
model/account_security.go:115
↓ 2 callersFunctionUpsertPerfMetric
(metric *PerfMetric)
model/perf_metric.go:29
↓ 2 callersFunctionUpstreamAddresses
UpstreamAddresses returns the addresses masked in errors shown to users: the upstream the admin configured for the selected channel and the proxies it
common/gin.go:225
↓ 2 callersFunctionUsageFromClaudeAPIUsage
(usage *dto.ClaudeUsage)
relaykit/relayconvert/response_compat.go:104
↓ 2 callersFunctionUsageFromClaudeUsage
(usage *dto.Usage)
relaykit/relayconvert/response_compat.go:108
↓ 2 callersMethodUsageText
()
relaykit/relayconvert/response_registry.go:451
↓ 2 callersFunctionUsesFormRequest
UsesFormRequest reports a request whose body is multipart form data.
relay/channel/advancedcustom/adaptor.go:319
↓ 2 callersFunctionValidateAccessTokenIdentity
ValidateAccessTokenIdentity checks a token-bound step-up identity without taking locks, for use before issuing a verification proof.
model/user_access_token.go:253
↓ 2 callersFunctionValidateBackupCode
ValidateBackupCode 验证并使用备用码
model/twofa.go:197
↓ 2 callersFunctionValidateBackupCode
ValidateBackupCode 验证备用码格式
common/totp.go:83
↓ 2 callersMethodValidateChannelConfig
ValidateChannelConfig checks the plugin config an administrator saves on a channel against meta.channelConfig and returns what the channel stores: the
pluginkit/config_schema.go:219
↓ 2 callersFunctionValidateClaudeDefaultMaxTokens
ValidateClaudeDefaultMaxTokens validates the JSON persisted by the option API. Zero stays allowed — the current Messages API accepts max_tokens: 0 as
setting/model_setting/claude.go:97
↓ 2 callersFunctionValidateGeminiSafetySettings
ValidateGeminiSafetySettings validates the JSON persisted by the option API. Empty values remain valid because read-time fallback returns the default.
setting/model_setting/gemini.go:84
↓ 2 callersMethodValidateHTTPTransport
ValidateHTTPTransport validates save-time HTTP transport channel settings.
relaykit/dto/channel_settings.go:76
← previousnext →3,501–3,600 of 15,592, ranked by callers