Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
15,409 in github.com/QuantumNous/new-api
⨍
Functions
15,409
◇
Types & classes
2,241
↓ 1 callers
Method
DefaultValue
()
model/migration_dialector.go:51
↓ 1 callers
Method
Delete
Delete rejects referenced vendors rather than leaving orphaned model records.
model/vendor_meta.go:80
↓ 1 callers
Method
DeleteAbilities
()
model/ability.go:266
↓ 1 callers
Method
DeleteByPrefix
(prefix string)
pkg/cachex/hybrid_cache.go:176
↓ 1 callers
Function
DeleteChannel
(c *gin.Context)
controller/channel.go:972
↓ 1 callers
Function
DeleteChannelBatch
(c *gin.Context)
controller/channel.go:1165
↓ 1 callers
Method
DeleteDeployment
DeleteDeployment deletes an active deployment
pkg/ionet/deployment.go:164
↓ 1 callers
Function
DeleteDisabledChannel
()
model/channel.go:1092
↓ 1 callers
Function
DeleteExpiredAuthFlows
(now time.Time)
model/auth_flow.go:306
↓ 1 callers
Function
DeleteExpiredUserAccessTokens
DeleteExpiredUserAccessTokens removes tokens that expired before the cutoff. Tokens that never expire are kept.
model/user_access_token.go:203
↓ 1 callers
Function
DeleteInvalidRedemptions
()
model/redemption.go:236
↓ 1 callers
Function
DeleteKey
(key string, purpose string)
common/verification.go:58
↓ 1 callers
Function
DeleteModelMeta
DeleteModelMeta 删除模型
controller/model_meta.go:193
↓ 1 callers
Function
DeleteOllamaModel
删除 Ollama 模型
relay/channel/ollama/relay-ollama.go:499
↓ 1 callers
Function
DeletePasskeyForSession
(identity AuthSessionIdentity)
model/passkey.go:269
↓ 1 callers
Function
DeletePerfMetricsBefore
(cutoffTs int64)
model/perf_metric.go:137
↓ 1 callers
Function
DeletePrefillGroupByID
DeleteByID 根据 ID 删除组
model/prefill_group.go:114
↓ 1 callers
Function
DeleteRedemptionById
(id int)
model/redemption.go:224
↓ 1 callers
Function
DeleteStaleSystemInstance
(nodeName string, now int64)
model/system_instance.go:83
↓ 1 callers
Function
DeleteStaleSystemInstances
(now int64)
model/system_instance.go:78
↓ 1 callers
Function
DeleteUserOAuthBinding
DeleteUserOAuthBinding deletes an OAuth binding
model/user_oauth_binding.go:133
↓ 1 callers
Method
DeployContainer
DeployContainer deploys a new container with the specified configuration
pkg/ionet/deployment.go:12
↓ 1 callers
Function
DetectAllChannelUpstreamModelUpdates
DetectAllChannelUpstreamModelUpdates enqueues a model_update system task (manual variant) instead of scanning inline. Routing the manual trigger throu
controller/channel_upstream_update.go:1216
↓ 1 callers
Function
DetectFileType
DetectFileType 检测文件类型
service/file_service.go:451
↓ 1 callers
Function
DisableTwoFAForSession
(identity AuthSessionIdentity)
model/twofa.go:243
↓ 1 callers
Method
DoRequest
(c *gin.Context, info *relaycommon.RelayInfo, requestBody io.Reader)
relay/channel/advancedcustom/adaptor.go:284
↓ 1 callers
Method
DoResponse
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/aws/adaptor.go:159
↓ 1 callers
Method
DoResponse
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/minimax/adaptor.go:123
↓ 1 callers
Function
DryRunTaskPlugin
(c *gin.Context)
controller/task_plugin.go:546
↓ 1 callers
Function
ETagFor
ETagFor returns a weak ETag derived from the namespace and content.
common/etag.go:21
↓ 1 callers
Function
ETagMatches
ETagMatches reports whether an If-None-Match header matches etag under weak comparison (RFC 9110 §13.1.2): the W/ prefix is ignored on both sides, and
common/etag.go:35
↓ 1 callers
Function
EditChannelByTag
(tag string, newTag *string, modelMapping *string, models *string, group *string, priority *int64, weight *uin
model/channel.go:1015
↓ 1 callers
Function
EffectiveSessionMode
Rules explicitly inherit the global default or override it. Rules without a mode retain their legacy retry behavior until an administrator changes the
service/request_policy.go:149
↓ 1 callers
Function
EmbedFolder
(fsEmbed embed.FS, targetPath string)
common/embed-file-system.go:35
↓ 1 callers
Function
EmbeddingHelper
(c *gin.Context, info *relaycommon.RelayInfo)
relay/embedding_handler.go:20
↓ 1 callers
Method
Empty
()
relaykit/relayconvert/internal/toolconv/response_artifacts.go:55
↓ 1 callers
Function
EnableChannelByTag
(tag string)
model/channel.go:982
↓ 1 callers
Method
Enabled
()
service/system_task.go:44
↓ 1 callers
Function
EnsureDiskCacheDir
EnsureDiskCacheDir 确保缓存目录存在
common/disk_cache.go:34
↓ 1 callers
Function
EquivalentGeminiStrength
EquivalentGeminiStrength compares two controls after applying the target model's budget/level mapping. This accepts distinct canonical labels that are
relaykit/relayconvert/reasoning/gemini.go:461
↓ 1 callers
Function
ErrOptionWithHideErrMsg
(replaceStr string)
relaykit/types/error.go:407
↓ 1 callers
Method
Error
Error lets the same typed value serve both as the settlement audit marker and as the fail-fast error returned by strict pre-consume conversions.
common/quota_math.go:52
↓ 1 callers
Method
EstimateBillingValidated
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/task/jsplugin/adaptor.go:264
↓ 1 callers
Function
EstimateRequestToken
(c *gin.Context, meta *types.TokenCountMeta, info *relaycommon.RelayInfo)
service/token_counter.go:48
↓ 1 callers
Method
ExchangeToken
ExchangeToken exchanges the authorization code for an access token The gin.Context is passed for providers that need request info (e.g., for redirect_
oauth/provider.go:20
↓ 1 callers
Function
ExpireDueSubscriptions
ExpireDueSubscriptions marks expired subscriptions and handles group downgrade.
model/subscription.go:1158
↓ 1 callers
Function
ExplicitUserPermissions
ExplicitUserPermissions returns the effective permission matrix for the managed role plus any per-user overrides.
service/authz/override.go:103
↓ 1 callers
Method
ExtendDeployment
ExtendDeployment extends the duration of an existing deployment
pkg/ionet/deployment.go:137
↓ 1 callers
Function
ExtractCodexAccountIDFromJWT
(token string)
service/codex_oauth.go:108
↓ 1 callers
Function
ExtractEmailFromJWT
(token string)
service/codex_oauth.go:136
↓ 1 callers
Function
ExtractOutputTextFromResponses
(resp *dto.OpenAIResponsesResponse)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp.go:237
↓ 1 callers
Function
ExtractReasoningTextFromResponses
(resp *dto.OpenAIResponsesResponse)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp.go:275
↓ 1 callers
Method
ExtractUsageFacts
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/adapter.go:133
↓ 1 callers
Method
ExtractUsageFactsValidated
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/task/jsplugin/adaptor.go:279
↓ 1 callers
Method
FactoryKey
FactoryKey reports whether key belongs to a built-in plugin, whether or not an override or the disabled list replaces it in this generation.
pkg/jsplugin/routing.go:685
↓ 1 callers
Method
Fail
Fail emits a terminal Responses error using the same event allocator as the rest of the stream, so callers never have to append a JSON HTTP error to a
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:297
↓ 1 callers
Method
FetchBody
FetchBody returns body with each JSON string that equals a ref of the call replaced by that media's data URL, and its length; a nil reader when body n
pkg/jsplugin/media.go:33
↓ 1 callers
Function
FetchCodexChannelModels
(channel *model.Channel)
service/codex_channel_models.go:14
↓ 1 callers
Function
FetchCodexModels
( ctx context.Context, client *http.Client, baseURL string, oauthKey *CodexOAuthKey, clientVersion string
service/codex_models.go:95
↓ 1 callers
Function
FetchGeminiModels
(baseURL, apiKey string, setting dto.ChannelSettings)
relay/channel/gemini/relay-gemini.go:606
↓ 1 callers
Function
FetchOllamaModels
(baseURL, apiKey string)
relay/channel/ollama/relay-ollama.go:341
↓ 1 callers
Function
FetchOllamaVersion
(baseURL, apiKey string)
relay/channel/ollama/relay-ollama.go:536
↓ 1 callers
Function
FileReference
FileReference returns the opaque ref of the index-th uploaded file in a multipart field. The first file keeps the historical `request_file:<field>` sp
pkg/jsplugin/routing.go:297
↓ 1 callers
Function
FillModelSquareStates
FillModelSquareStates applies the same metadata policy as the public catalog to live routes, then aggregates concrete models for metadata rule rows.
model/model_meta.go:104
↓ 1 callers
Method
FillUserByDiscordId
()
model/user.go:1109
↓ 1 callers
Method
FillUserByLinuxDOId
()
model/user.go:1523
↓ 1 callers
Method
FillUserByOidcId
()
model/user.go:1117
↓ 1 callers
Method
FillUserByProviderID
FillUserByProviderID fills the user model by provider user ID
oauth/provider.go:29
↓ 1 callers
Method
FillUserByWeChatId
()
model/user.go:1125
↓ 1 callers
Function
FilterUserTokenAutoGroups
FilterUserTokenAutoGroups applies current permissions before the current per-token limit. It intentionally does not fall back to the global Auto list.
service/group.go:75
↓ 1 callers
Method
Finalize
(estimatedInputTokens int)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:175
↓ 1 callers
Function
FinalizeChatCompletionsStreamToResponses
(state *ChatToResponsesStreamState)
relaykit/relayconvert/response_compat.go:168
↓ 1 callers
Function
FinalizeClaudeStreamBillingUsage
(claudeInfo *ClaudeResponseInfo)
relaykit/relayconvert/response_compat.go:124
↓ 1 callers
Function
FinalizeClaudeStreamBillingUsage
FinalizeClaudeStreamBillingUsage refreshes only a locally synthesized snapshot after the host has applied its missing-usage fallback. A snapshot recei
relaykit/relayconvert/internal/claude_messages/to_oai_chat_resp.go:446
↓ 1 callers
Method
FinalizeOAuthUserCreation
FinalizeOAuthUserCreation performs post-transaction tasks for OAuth user creation. This should be called after the transaction commits successfully.
model/user.go:760
↓ 1 callers
Function
FinalizeResponsesToChatStream
(state *ResponsesToChatStreamState)
relaykit/relayconvert/response_compat.go:204
↓ 1 callers
Function
FinalizeResponsesToChatStream
(state *ResponsesToChatStreamState)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:133
↓ 1 callers
Method
Finish
Finish ends the check of a response that ended without its terminal event: the rest of the text is checked and the events waiting go out.
relay/requestplugin/socket.go:143
↓ 1 callers
Method
FinishInsert
(inviterId int)
model/user.go:733
↓ 1 callers
Function
FinishOAuthVerification
FinishOAuthVerification only verifies an existing binding. It deliberately never calls OAuth's login or find-or-create-user paths.
service/oauth_verification.go:32
↓ 1 callers
Function
FinishSyncTasks
FinishSyncTasks marks the pending sync tasks of taskType up to throughID as applied by every node, with their final state.
model/system_sync_task.go:115
↓ 1 callers
Method
Flush
()
relay/helper/common.go:58
↓ 1 callers
Method
FlushError
()
relay/channel/openai/relay_responses_billing_test.go:101
↓ 1 callers
Function
FormatClaudeResponseInfo
(claudeResponse *dto.ClaudeResponse, oaiResponse *dto.ChatCompletionsStreamResponse, claudeInfo *ClaudeRespons
relaykit/relayconvert/response_compat.go:120
↓ 1 callers
Function
FullClientRequest
(conn *websocket.Conn, payload []byte)
relay/channel/volcengine/protocols.go:522
↓ 1 callers
Function
GeminiEmbeddingHandler
(c *gin.Context, info *relaycommon.RelayInfo)
relay/gemini_handler.go:169
↓ 1 callers
Function
GeminiEmbeddingHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay-gemini.go:496
↓ 1 callers
Function
GeminiHelper
(c *gin.Context, info *relaycommon.RelayInfo)
relay/gemini_handler.go:23
↓ 1 callers
Function
GeminiResponseMap
(value any)
relaykit/relayconvert/internal/oai_responses/req_helpers.go:222
↓ 1 callers
Function
GenRelayInfoAlphaSearch
(c *gin.Context, request *dto.AlphaSearchRequest)
relay/common/relay_info.go:829
↓ 1 callers
Function
GenRelayInfoClaude
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:494
↓ 1 callers
Function
GenRelayInfoEmbedding
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:522
↓ 1 callers
Function
GenRelayInfoGemini
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:548
↓ 1 callers
Function
GenRelayInfoImage
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:556
↓ 1 callers
Function
GenRelayInfoOpenAI
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:562
↓ 1 callers
Function
GenRelayInfoOpenAIAudio
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:516
↓ 1 callers
Function
GenRelayInfoRerank
(c *gin.Context, request *dto.RerankRequest)
relay/common/relay_info.go:505
↓ 1 callers
Function
GenRelayInfoResponses
(c *gin.Context, request *dto.OpenAIResponsesRequest)
relay/common/relay_info.go:528
↓ 1 callers
Function
GenRelayInfoResponsesCompaction
(c *gin.Context, request *dto.OpenAIResponsesCompactionRequest)
relay/common/relay_info.go:820
↓ 1 callers
Function
GenRelayInfoWs
(c *gin.Context, ws *websocket.Conn)
relay/common/relay_info.go:484
← previous
next →
5,101–5,200 of 15,409, ranked by callers