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
Function
IsViolationFeeCode
(code types.ErrorCode)
service/violation_fee.go:26
↓ 1 callers
Function
JsonRawMessageToString
JsonRawMessageToString returns JSON strings as their decoded value and other JSON values as raw text.
common/json.go:111
↓ 1 callers
Method
LastRebuildError
()
pkg/jsplugin/registry.go:1016
↓ 1 callers
Method
LastRebuildOutcome
()
pkg/jsplugin/registry.go:1022
↓ 1 callers
Method
Len
()
types/set.go:26
↓ 1 callers
Function
ListActiveTaskPlugins
ListActiveTaskPlugins returns the enabled override rows without their source and icon payloads; see GetTaskPluginSyncSnapshot.
model/task_plugin.go:177
↓ 1 callers
Method
ListContainers
ListContainers retrieves all containers for a specific deployment
pkg/ionet/container.go:13
↓ 1 callers
Method
ListHardwareTypes
ListHardwareTypes retrieves available hardware types using the max GPUs endpoint
pkg/ionet/hardware.go:74
↓ 1 callers
Method
ListLocations
ListLocations retrieves available deployment locations (if supported by the API)
pkg/ionet/hardware.go:113
↓ 1 callers
Function
ListLoginSessions
(userID int, currentSID string)
service/auth_session.go:313
↓ 1 callers
Function
ListSystemTasks
(c *gin.Context)
controller/system_task.go:68
↓ 1 callers
Method
LoadPolicy
(m casbinmodel.Model)
service/authz/adapter.go:22
↓ 1 callers
Function
LogInfo
(message string)
relaykit/relayconvert/kitutil/log.go:37
↓ 1 callers
Method
LogMode
(logger.LogLevel)
model/user_session_migration_test.go:36
↓ 1 callers
Function
LogQuota
LogQuota formats a quota for a server log line.
logger/logger.go:125
↓ 1 callers
Function
LogStartupSuccess
(startTime time.Time, host, port string)
common/sys_log.go:63
↓ 1 callers
Function
LookupHostProtocolOperation
(method, path string)
pkg/jsplugin/routing.go:190
↓ 1 callers
Method
LookupIPAddr
(ctx context.Context, host string)
service/protected_fetch_client.go:18
↓ 1 callers
Function
LookupTextConverter
(converter string)
relaykit/relayconvert/text_converter_registry.go:260
↓ 1 callers
Function
ManageMultiKeys
ManageMultiKeys handles multi-key management operations
controller/channel.go:1910
↓ 1 callers
Function
ManualCompleteTopUp
ManualCompleteTopUp 管理员手动完成订单并给用户充值
model/topup.go:450
↓ 1 callers
Method
MarkCancelled
()
relay/common/stream_status.go:123
↓ 1 callers
Function
MarkChannelAffinityUsed
(c *gin.Context, selectedGroup string, channelID int)
service/channel_affinity.go:683
↓ 1 callers
Method
MarkRequestPluginHeaderOverrides
MarkRequestPluginHeaderOverrides marks the attempt's header changes to the lowercase names the channel's header override replaced.
relay/common/request_plugin.go:279
↓ 1 callers
Method
Marshal
()
relay/channel/volcengine/protocols.go:274
↓ 1 callers
Method
MarshalJSON
()
types/rw_map.go:21
↓ 1 callers
Method
MaskSensitiveError
MaskSensitiveError masks the upstream addresses of the channel that produced the error in the error text; see kitutil.MaskSensitiveInfo.
relaykit/types/error.go:153
↓ 1 callers
Function
MaskTokenKey
(key string)
model/token.go:67
↓ 1 callers
Method
MaxRangeSeconds
()
setting/operation_setting/log_setting.go:35
↓ 1 callers
Method
Media
Media describes the media ref names; false when ref is not one of the call's.
pkg/jsplugin/media.go:26
↓ 1 callers
Method
MediaText
MediaText reads the text of the media ref names, at most maxChars UTF-16 code units; false when ref is not one of the call's.
pkg/jsplugin/media.go:29
↓ 1 callers
Method
MergeAudit
(values map[string]any)
model/log_other.go:139
↓ 1 callers
Method
MergeRoot
(values map[string]any)
model/log_other.go:122
↓ 1 callers
Method
MigrateColumn
(value any, field *schema.Field, column gorm.ColumnType)
model/migration_dialector.go:24
↓ 1 callers
Function
MjBulkUpdate
(mjIds []string, params map[string]any)
model/midjourney.go:202
↓ 1 callers
Function
MjBulkUpdateByTaskIds
(taskIDs []int, params map[string]any)
model/midjourney.go:208
↓ 1 callers
Function
ModelModifierEffort
ModelModifierEffort is the reasoning effort the modifiers of a model name set, as a relay request reads them; "" when they set none or are invalid.
relay/helper/reasoning_suffix.go:154
↓ 1 callers
Function
ModelRequestRateLimitGroup2JSONString
()
setting/rate_limit.go:28
↓ 1 callers
Method
ModelUser
()
service/passkey/user.go:59
↓ 1 callers
Function
Monitor
Monitor 定时监控cpu使用率,超过阈值输出pprof文件
common/pprof.go:13
↓ 1 callers
Method
Mu
()
relaykit/types/file_source.go:26
↓ 1 callers
Function
MultimodalEmbeddingHandler
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/ali/embedding.go:129
↓ 1 callers
Function
NativeGeminiEmbeddingHandler
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/gemini/relay-gemini-native.go:57
↓ 1 callers
Function
NewBillingSession
--------------------------------------------------------------------------- NewBillingSession 工厂 — 根据计费偏好创建会话并处理回退 -----------------------------------
service/billing_session.go:389
↓ 1 callers
Function
NewChatToResponsesStreamState
(id string, model string)
relaykit/relayconvert/response_compat.go:160
↓ 1 callers
Function
NewClaudeHostedStreamBridge
()
relaykit/relayconvert/response_compat.go:58
↓ 1 callers
Function
NewClient
NewClient creates a new IO.NET API client targeting the public API base URL.
pkg/ionet/client.go:79
↓ 1 callers
Function
NewDefaultHTTPClient
NewDefaultHTTPClient creates a new default HTTP client
pkg/ionet/client.go:25
↓ 1 callers
Function
NewGeminiHostedStreamBridge
()
relaykit/relayconvert/response_compat.go:62
↓ 1 callers
Function
NewMessageFromBytes
(data []byte)
relay/channel/volcengine/protocols.go:226
↓ 1 callers
Function
NewOpenAIVideo
()
relaykit/dto/openai_video.go:43
↓ 1 callers
Function
NewPasskeyCredentialFromWebAuthn
(userID int, credential *webauthn.Credential)
model/passkey.go:102
↓ 1 callers
Method
NewPayload
()
service/system_task.go:46
↓ 1 callers
Function
NewResponsesBufferedAccumulator
()
relaykit/relayconvert/response_compat.go:208
↓ 1 callers
Function
NewResponsesToChatStreamState
(model string, includeUsage bool)
relaykit/relayconvert/response_compat.go:196
↓ 1 callers
Function
NewResponsesToChatStreamState
(model string, includeUsage bool)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:50
↓ 1 callers
Function
NewResponsesToClaudeStreamState
(id string, model string)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:44
↓ 1 callers
Function
NewTelegramOAuthFlow
()
oauth/telegram.go:53
↓ 1 callers
Function
NormalizeCacheCreationSplit
(totalTokens int, tokens5m int, tokens1h int)
service/convert.go:9
↓ 1 callers
Function
NormalizeCacheCreationSplit
(totalTokens int, tokens5m int, tokens1h int)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp.go:108
↓ 1 callers
Function
NormalizeCacheCreationSplit
(totalTokens int, tokens5m int, tokens1h int)
relaykit/relayconvert/internal/shared/claude/cache.go:3
↓ 1 callers
Method
NormalizeLegacyDalleImageRequest
NormalizeLegacyDalleImageRequest preserves the retired models' request validation and defaults. Other models, including aliases, are unchanged.
relaykit/dto/legacy_dalle_image.go:15
↓ 1 callers
Function
NormalizeProxyURL
NormalizeProxyURL validates a proxy URL using runtime-compatible rules and returns its canonical cache key.
service/http_client.go:196
↓ 1 callers
Function
NormalizeResponsesUsage
(src *dto.Usage)
relaykit/relayconvert/response_compat.go:184
↓ 1 callers
Function
NormalizeResponsesUsage
NormalizeResponsesUsage maps Responses usage into the shared accounting shape without creating a BillingUsage snapshot. Native Responses handlers use
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp.go:191
↓ 1 callers
Method
NormalizedEventType
NormalizedEventType returns the event type or empty string for a nil event.
service/waffo_pancake.go:68
↓ 1 callers
Function
NotifyUpstreamModelUpdateWatchers
NotifyUpstreamModelUpdateWatchers sends the upstream model update notice to every administrator who enabled it. render builds the subject and content
service/user_notify.go:33
↓ 1 callers
Function
OaiChatToResponsesHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/responses_via_chat.go:19
↓ 1 callers
Function
OaiResponsesToChatHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/chat_via_responses.go:23
↓ 1 callers
Method
Observe
(response *dto.GeminiChatResponse)
relaykit/relayconvert/response_compat.go:66
↓ 1 callers
Function
ObserveChannelAffinityUsageCacheFromContext
(c *gin.Context, usage *dto.Usage, cachedTokenRateMode string)
service/channel_affinity.go:801
↓ 1 callers
Function
OpenAIChatRequestToGeminiGenerateContent
(c context.Context, textRequest dto.GeneralOpenAIRequest, info convmeta.Meta)
relaykit/relayconvert/request_compat.go:28
↓ 1 callers
Function
OpenAIResponsesRequestFromAny
(request any)
relaykit/relayconvert/internal/oai_responses/req_helpers.go:28
↓ 1 callers
Function
OpenAIResponsesRequestToClaudeMessages
(c context.Context, info convmeta.Meta, req *dto.OpenAIResponsesRequest)
relaykit/relayconvert/request_compat.go:68
↓ 1 callers
Function
OpenAIResponsesRequestToClaudeMessages
(c context.Context, info convmeta.Meta, req *dto.OpenAIResponsesRequest)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_req.go:27
↓ 1 callers
Function
OpenAIResponsesRequestToGeminiChat
(c context.Context, req *dto.OpenAIResponsesRequest, info convmeta.Meta)
relaykit/relayconvert/request_compat.go:72
↓ 1 callers
Function
OpenaiRealtimeHandler
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/openai/relay_realtime.go:21
↓ 1 callers
Function
OpenaiSTTHandler
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo, responseFormat string)
relay/channel/openai/audio.go:117
↓ 1 callers
Function
OpenaiTTSHandler
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/openai/audio.go:20
↓ 1 callers
Method
OutboundImageCount
(body []byte)
relay/image_handler.go:29
↓ 1 callers
Function
ParallelToolCalls
(raw []byte)
relaykit/relayconvert/internal/oai_responses/req_helpers.go:237
↓ 1 callers
Function
ParamOverride
ParamOverride is utils.paramOverride(body, override): the channel param override DSL run on a stage hook's body, with a condition context built from t
relay/requestplugin/param_override.go:28
↓ 1 callers
Function
ParseFileReference
ParseFileReference resolves a ref produced by FileReference back to the multipart field and the zero-based file index within that field.
pkg/jsplugin/routing.go:306
↓ 1 callers
Method
ParseInput
()
relaykit/dto/openai_request.go:475
↓ 1 callers
Method
ParseInput
ParseInput parses the Responses API `input` field into a normalized slice of MediaInput. Reference implementation mirrors Message.ParseContent: - inpu
relaykit/dto/openai_request.go:1247
↓ 1 callers
Function
ParseKnownProviderModelSuffix
ParseKnownProviderModelSuffix extracts a canonical intent only when the origin identifies a provider family whose suffix vocabulary is defined by rela
relaykit/relayconvert/reasoning/suffix.go:195
↓ 1 callers
Function
ParseOpenAIReasoningEffortFromModelSuffix
ParseOpenAIReasoningEffortFromModelSuffix extracts an effort tail only from GPT and o-series model families. preserveEffortTail is consulted on the co
relaykit/relayconvert/reasoning/suffix.go:128
↓ 1 callers
Method
ParseTaskResult
(task *model.Task, resp *http.Response, body []byte)
service/task_polling.go:32
↓ 1 callers
Function
PasskeyRegisterBegin
(c *gin.Context)
controller/passkey.go:45
↓ 1 callers
Function
PatchClaudeMessageDeltaUsageData
(data string, usage *dto.ClaudeUsage)
relaykit/relayconvert/response_compat.go:116
↓ 1 callers
Function
Path2RelayMode
(path string)
relay/constant/relay_mode.go:57
↓ 1 callers
Function
Path2RelayModeMidjourney
(path string)
relay/constant/relay_mode.go:103
↓ 1 callers
Function
PayMethods2JsonString
()
setting/operation_setting/payment_setting_old.go:44
↓ 1 callers
Function
PendingSyncTaskTypes
PendingSyncTaskTypes returns the types that have sync tasks not every node has applied yet.
model/system_sync_task.go:102
↓ 1 callers
Function
PingDB
()
model/main.go:816
↓ 1 callers
Function
PluginCredentialPreview
PluginCredentialPreview names a credential line for key lists without its secrets: its label, or its account id.
service/provider_plugin.go:727
↓ 1 callers
Function
PluginLoginRedirectURI
PluginLoginRedirectURI is the callback address of a plugin's logins. Each plugin has its own, so a callback cannot reach another plugin's flow.
service/provider_plugin_login.go:105
↓ 1 callers
Function
PreConsumeUserSubscription
PreConsumeUserSubscription pre-consumes from any active subscription total quota.
model/subscription.go:1316
↓ 1 callers
Function
PreWssConsumeQuota
PreWssConsumeQuota charges the usage of one Realtime response and returns the quota it charged.
service/quota.go:90
↓ 1 callers
Method
PrepareWebSocket
(c *gin.Context, info *common.RelayInfo)
relay/channel/api_request.go:444
← previous
next →
5,401–5,500 of 15,409, ranked by callers