MCPcopy Create free account

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

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

↓ 1 callersMethodSetResponsesToolState
(state *convmeta.ResponsesToolState)
relay/common/relay_info.go:959
↓ 1 callersMethodSetRetry
(retry int)
service/channel_select.go:65
↓ 1 callersFunctionSetRouter
(router *gin.Engine, assets WebAssets)
router/main.go:15
↓ 1 callersMethodSetStreamUsage
(*dto.Usage)
relaykit/relayconvert/response_registry.go:113
↓ 1 callersMethodSetStringSystem
(system string)
relaykit/dto/claude.go:600
↓ 1 callersMethodSetSystemFingerprint
(s string)
relaykit/dto/openai_response.go:212
↓ 1 callersMethodSetTransports
(list []protocol.AuthenticatorTransport)
model/passkey.go:59
↓ 1 callersMethodSetUsage
(usage *dto.Usage)
relaykit/relayconvert/internal/oai_chat/to_gemini_chat_resp.go:386
↓ 1 callersMethodSetUsage
(usage *dto.Usage)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:65
↓ 1 callersMethodSettle
Settle 根据实际消耗额度进行结算。 资金来源和令牌额度分两步提交:若资金来源已提交但令牌调整失败, 会标记 fundingSettled 防止 Refund 对已提交的资金来源执行退款。
service/billing_session.go:47
↓ 1 callersFunctionSha1Raw
(data []byte)
common/hash.go:16
↓ 1 callersFunctionShouldChatCompletionsUseResponsesPolicy
(policy model_setting.ChatCompletionsToResponsesPolicy, channelID int, channelType int, model string)
service/openai_chat_responses_mode.go:40
↓ 1 callersFunctionShouldEnableChannel
(newAPIError *types.NewAPIError, status int)
service/channel.go:87
↓ 1 callersFunctionShouldKeepChannelAffinityOnChannelDisabled
()
service/channel_affinity.go:675
↓ 1 callersFunctionShouldUseDiskCache
ShouldUseDiskCache 判断是否应该使用磁盘缓存
common/disk_cache.go:167
↓ 1 callersFunctionSign
(c *gin.Context, req *http.Request, apiKey string)
relay/channel/jimeng/sign.go:59
↓ 1 callersMethodSignUpstreamRequest
(c *gin.Context, info *common.RelayInfo, method string, target *url.URL, header http.Header)
relay/channel/api_request.go:363
↓ 1 callersFunctionSoraSizeRatio
(size string)
setting/task_pricing_setting/config.go:31
↓ 1 callersFunctionStartAuthArtifactCleanup
StartAuthArtifactCleanup removes expired dashboard Sessions, old one-time authentication flows and access tokens that expired beyond the revoked sessi
service/auth_cleanup.go:15
↓ 1 callersFunctionStartCodexCredentialAutoRefreshTask
()
service/codex_credential_refresh_task.go:34
↓ 1 callersFunctionStartEmailBinding
(identity AuthIdentity, authorization *model.AuthFlowAuthorization, email string, lang string)
service/email_binding.go:57
↓ 1 callersFunctionStartLogCleanupTask
(targetTimestamp int64)
service/system_task.go:169
↓ 1 callersFunctionStartNodeSync
StartNodeSync records the revisions read at startup as applied, then every 3 seconds reloads each registered topic that has a newer sync task and writ
service/node_sync.go:123
↓ 1 callersFunctionStartPluginCredentialRefreshTask
StartPluginCredentialRefreshTask makes the master node refresh, every minute, the plugin credentials that expire within max(10 minutes, three channel
service/provider_plugin.go:467
↓ 1 callersFunctionStartPluginLogin
StartPluginLogin opens a plugin login flow on a channel.
controller/provider_plugin.go:70
↓ 1 callersFunctionStartPolicySync
StartPolicySync periodically reloads the authorization policy from the database. The enforcer keeps an in-memory snapshot, and permission changes are
service/authz/enforcer.go:84
↓ 1 callersFunctionStartPyroScope
()
common/pyro.go:9
↓ 1 callersFunctionStartSubscriber
(ctx context.Context)
pkg/wsmanager/wsmanager.go:113
↓ 1 callersFunctionStartSubscriptionQuotaResetTask
()
service/subscription_reset_task.go:28
↓ 1 callersFunctionStartSystemInstanceReporter
()
service/system_instance.go:71
↓ 1 callersFunctionStartSystemMonitor
StartSystemMonitor 启动系统监控
common/system_monitor.go:64
↓ 1 callersFunctionStartSystemTaskRunner
()
service/system_task.go:123
↓ 1 callersFunctionStatsMiddleware
StatsMiddleware 统计中间件
middleware/stats.go:17
↓ 1 callersFunctionStopReasonClaudeToOpenAI
(reason string)
relaykit/relayconvert/response_compat.go:46
↓ 1 callersFunctionStreamAllLogs
StreamAllLogs calls fn with each log matching filter, newest first, as an administrator with role sees it. Rows are read one at a time, so an export n
model/log.go:623
↓ 1 callersFunctionStreamResponseClaude2OpenAI
(claudeResponse *dto.ClaudeResponse)
relaykit/relayconvert/internal/claude_messages/to_oai_chat_resp.go:35
↓ 1 callersFunctionStreamResponseGeminiChat2OpenAI
(geminiResponse *dto.GeminiChatResponse)
relaykit/relayconvert/internal/gemini_chat/to_oai_chat_resp.go:188
↓ 1 callersFunctionStreamResponseOpenAI2Gemini
StreamResponseOpenAI2Gemini 将 OpenAI 流式响应转换为 Gemini 格式
relaykit/relayconvert/internal/oai_chat/to_gemini_chat_resp.go:127
↓ 1 callersMethodStreamUsage
()
relaykit/relayconvert/response_registry.go:112
↓ 1 callersFunctionStreamUserLogs
StreamUserLogs is StreamAllLogs for one user's own logs, shaped like the user log list.
model/log.go:651
↓ 1 callersMethodStricter
(other PinRetryMode)
dto/channel_constraints.go:22
↓ 1 callersFunctionString2Int
(str string)
relaykit/relayconvert/kitutil/value.go:36
↓ 1 callersFunctionStringToByteSlice
(s string)
relaykit/relayconvert/kitutil/json.go:143
↓ 1 callersMethodSummary
Summary returns the credential without its data, headers and query.
pkg/jsplugin/provider.go:128
↓ 1 callersFunctionSundaySearch
(text string, pattern string)
service/str.go:14
↓ 1 callersFunctionSupportsHostProtocol
SupportsHostProtocol reports whether the current host release has a concrete wire/state machine for an otherwise valid manifest endpoint.
pkg/jsplugin/routing.go:417
↓ 1 callersMethodSupportsPath
SupportsPath reports whether any route matches requestPath.
relaykit/dto/channel_settings.go:322
↓ 1 callersMethodSupportsPathForModel
SupportsPathForModel reports whether any route matches requestPath and model.
relaykit/dto/channel_settings.go:328
↓ 1 callersFunctionSyncChannelCache
(frequency int)
model/channel_cache.go:115
↓ 1 callersFunctionSyncOptions
(frequency int)
model/option.go:229
↓ 1 callersFunctionSyncTaskPlugins
SyncTaskPlugins reloads the plugins every 30 seconds after the startup sync, for changes that did not bump the plugins sync topic.
controller/task_plugin.go:1196
↓ 1 callersFunctionTaskCountAllTasks
TaskCountAllTasks returns total tasks that match the given query params (admin usage)
model/task.go:618
↓ 1 callersFunctionTaskCountAllUserTask
TaskCountAllUserTask returns total tasks for given user
model/task.go:653
↓ 1 callersFunctionTaskErrorFromAPIError
TaskErrorFromAPIError 将 PreConsumeBilling 返回的 NewAPIError 转换为 TaskError。
service/error.go:222
↓ 1 callersFunctionTaskPluginMarketplaceSources2JsonString
()
setting/task_plugin.go:78
↓ 1 callersFunctionTestAllChannels
TestAllChannels enqueues a channel_test system task instead of running the test loop inline. If any channel_test task is already active, the manual ru
controller/channel-test.go:1183
↓ 1 callersFunctionTextHelper
(c *gin.Context, info *relaycommon.RelayInfo)
relay/compatible_handler.go:26
↓ 1 callersMethodTimeoutEvent
(taskStatus ...string)
relay/plugin_protocol.go:547
↓ 1 callersMethodToFileSource
()
relaykit/dto/claude.go:115
↓ 1 callersMethodToFileSource
()
relaykit/dto/openai_request.go:589
↓ 1 callersFunctionToJSONString
(v interface{})
relaykit/relayconvert/internal/jsonutil/stringify.go:9
↓ 1 callersMethodToMessage
()
relaykit/dto/error.go:52
↓ 1 callersMethodToVideoStatus
()
model/task.go:20
↓ 1 callersFunctionTouchUserAccessToken
TouchUserAccessToken records the last use at most once per interval per token.
model/user_access_token.go:192
↓ 1 callersMethodTransferAffQuotaToQuota
(quota int)
model/user.go:587
↓ 1 callersMethodTransportList
()
model/passkey.go:44
↓ 1 callersMethodTryToOpenAIError
()
relaykit/dto/error.go:41
↓ 1 callersFunctionTurnstileCheck
()
middleware/turnstile-check.go:15
↓ 1 callersFunctionUnbindTaskPlugin
UnbindTaskPlugin removes one plugin from a channel's bindings and reports whether the channel changed. A New API gateway channel keeps serving its oth
model/task_plugin.go:45
↓ 1 callersFunctionUnbindUserOAuthForSession
(identity AuthSessionIdentity, providerID int, enabled AccountLoginMethods)
model/account_security.go:70
↓ 1 callersMethodUnmarshal
(data []byte)
relay/channel/volcengine/protocols.go:306
↓ 1 callersMethodUnwrap
()
pkg/jsplugin/engine.go:63
↓ 1 callersMethodUpdate
Update 更新组
model/prefill_group.go:108
↓ 1 callersMethodUpdate
()
model/midjourney.go:170
↓ 1 callersFunctionUpdateAbilityByTag
(tag string, newTag *string, priority *int64, weight *uint)
model/ability.go:350
↓ 1 callersFunctionUpdateAndSync
UpdateAndSync 更新配置并同步到 common 包 当配置从数据库加载后,需要调用此函数同步
setting/performance_setting/config.go:73
↓ 1 callersFunctionUpdateCacheRatioByJSONString
UpdateCacheRatioByJSONString updates the cache ratio map from a JSON string
setting/ratio_setting/cache_ratio.go:154
↓ 1 callersFunctionUpdateChatsByJsonString
(jsonString string)
setting/chat.go:45
↓ 1 callersMethodUpdateClusterName
UpdateClusterName updates the name of an existing cluster/deployment
pkg/ionet/deployment.go:352
↓ 1 callersMethodUpdateDeployment
UpdateDeployment updates the configuration of an existing deployment
pkg/ionet/deployment.go:111
↓ 1 callersFunctionUpdateGroupGroupRatioByJSONString
(jsonStr string)
setting/ratio_setting/group_ratio.go:104
↓ 1 callersFunctionUpdateModelRequestRateLimitGroupByJSONString
(jsonStr string)
setting/rate_limit.go:39
↓ 1 callersFunctionUpdatePayMethodsByJsonString
(jsonString string)
setting/operation_setting/payment_setting_old.go:39
↓ 1 callersFunctionUpdateQuotaData
()
model/usedata.go:45
↓ 1 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
↓ 1 callersFunctionUpdateSyncTaskProgress
UpdateSyncTaskProgress records on a pending sync task how many nodes have applied it and why the others have not. It writes nothing when both are unch
model/system_sync_task.go:133
↓ 1 callersFunctionUpdateTaskPluginChannelLocked
UpdateTaskPluginChannelLocked runs update on a task plugin channel while every other task plugin channel is locked too, so a check across channels, su
model/channel_plugin_credential.go:143
↓ 1 callersFunctionUpdateUserLastLoginAt
func GetRootUserEmail() (email string) { DB.Model(&User{}).Where("role = ?", common.RoleRootUser).Select("email").Find(&email) return email }
model/user.go:1428
↓ 1 callersFunctionUpdateUserOAuthBindingForSessionWithTx
(tx *gorm.DB, identity AuthSessionIdentity, providerID int, subject string)
model/account_security.go:134
↓ 1 callersFunctionUpdateUserSetting
(c *gin.Context)
controller/user.go:1338
↓ 1 callersFunctionUpsertPasskeyCredentialWithAuthVersion
UpsertPasskeyCredentialWithAuthVersion is reserved for enrollment changes; assertion sign-count updates must use UpdatePasskeyAssertionState.
model/passkey.go:224
↓ 1 callersMethodUsage
()
relaykit/relayconvert/internal/oai_chat/to_gemini_chat_resp.go:379
↓ 1 callersFunctionUsageFromClaudeAPIUsage
(usage *dto.ClaudeUsage)
relaykit/relayconvert/response_compat.go:104
↓ 1 callersFunctionUsageFromClaudeUsage
(usage *dto.Usage)
relaykit/relayconvert/internal/claude_messages/to_oai_chat_resp.go:313
↓ 1 callersFunctionUsageFromGeminiMetadata
(metadata *dto.GeminiUsageMetadata, fallbackPromptTokens int)
relaykit/relayconvert/internal/gemini_chat/to_oai_chat_resp.go:14
↓ 1 callersMethodUseUpstreamPath
UseUpstreamPath sends the request to path, a path a provider plugin chose, in place of the route's upstream_path. The caller has checked that it start
relay/channel/advancedcustom/adaptor.go:184
↓ 1 callersMethodUseUpstreamURL
UseUpstreamURL sends the request to target, an absolute http(s) address a provider plugin chose, in place of the route's; the route auth query still a
relay/channel/advancedcustom/adaptor.go:191
↓ 1 callersFunctionUserActiveSubscriptionsAllowWalletOverflow
UserActiveSubscriptionsAllowWalletOverflow returns whether wallet balance may be used after the user's subscription quota is exhausted. A single activ
model/subscription.go:900
↓ 1 callersFunctionUserCheckin
UserCheckin 执行用户签到 MySQL 和 PostgreSQL 使用事务保证原子性 SQLite 不支持嵌套事务,使用顺序操作 + 手动回滚
model/checkin.go:54
↓ 1 callersFunctionUserCriticalRateLimit
(scope string)
middleware/rate-limit.go:197
← previousnext →5,601–5,700 of 15,409, ranked by callers