Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
15,592 in github.com/QuantumNous/new-api
⨍
Functions
15,592
◇
Types & classes
2,267
↓ 2 callers
Function
ValidateMaxTokenAutoGroups
(value string)
setting/auto_group.go:51
↓ 2 callers
Function
ValidateModelEndpoints
ValidateModelEndpoints accepts the existing map form (custom paths) and type-array form (declared protocols), but never arbitrary JSON scalars.
model/model_metadata_sync.go:111
↓ 2 callers
Function
ValidateModelSquareOption
ValidateModelSquareOption rejects model square order values the square cannot use.
setting/operation_setting/model_square_setting.go:45
↓ 2 callers
Function
ValidateMultipartDirect
(c *gin.Context, info *RelayInfo)
relay/common/relay_utils.go:199
↓ 2 callers
Function
ValidateNewAccountPassword
ValidateNewAccountPassword applies only when a user chooses a new password. Authentication must continue to accept historical passwords without applyi
common/account_password.go:34
↓ 2 callers
Function
ValidateRedirectURL
ValidateRedirectURL validates that a redirect URL is safe to use. It checks that: - The URL is properly formatted - The scheme is either http or https
common/url_validator.go:19
↓ 2 callers
Function
ValidateRequestChatUnsupportedFields
(req *dto.OpenAIResponsesRequest)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:142
↓ 2 callers
Function
ValidateRequestHeaders
ValidateRequestHeaders rejects plugin-chosen headers that the host transport owns or that change how a request is framed or proxied, and bounds their
pluginkit/request.go:58
↓ 2 callers
Function
ValidateResendConfiguration
ValidateResendConfiguration is shared by provider activation and delivery. It checks local configuration only; saving settings never sends an email.
common/email_resend.go:22
↓ 2 callers
Function
ValidateTaskArtifactStoreConfig
ValidateTaskArtifactStoreConfig performs syntax checks only. It never resolves hosts, contacts an endpoint, or verifies credentials.
setting/system_setting/task_artifact_store.go:79
↓ 2 callers
Method
ValidateToolLossPolicy
ValidateToolLossPolicy validates the channel-level request-phase tool-loss policy. Empty keeps the default allow policy.
relaykit/dto/channel_settings.go:165
↓ 2 callers
Function
ValidateTopUpQuotaCapacity
ValidateTopUpQuotaCapacity performs the user-facing pre-payment check. The settlement path repeats the same invariant with an atomic conditional updat
model/topup.go:71
↓ 2 callers
Function
VerifyCodeWithKey
(key string, code string, purpose string)
common/verification.go:48
↓ 2 callers
Function
VertexResolutionRatio
(model, resolution string)
setting/task_pricing_setting/config.go:38
↓ 2 callers
Function
WithCapacity
(c int64)
common/limiter/limiter.go:95
↓ 2 callers
Function
WithRate
(r int64)
common/limiter/limiter.go:99
↓ 2 callers
Function
WithRequested
(n int64)
common/limiter/limiter.go:103
↓ 2 callers
Method
Write
(data []byte)
relay/helper/common.go:38
↓ 2 callers
Function
WriteRefreshCookie
(c *gin.Context, rawToken string)
service/auth_session.go:325
↓ 2 callers
Method
WriteString
(data string)
relay/helper/common.go:43
↓ 2 callers
Function
WssError
(c *gin.Context, ws *websocket.Conn, openaiError types.OpenAIError)
relay/helper/common.go:321
↓ 2 callers
Function
acceptH2TestConnection
(ln net.Listener)
relay/channel/api_request_getbody_test.go:252
↓ 2 callers
Function
accessTokenPermissionGroups
( catalog: AccessTokenCatalog )
web/src/features/security/lib/access-token-catalog.ts:31
↓ 2 callers
Function
accessTokenScopeRule
(scope string)
middleware/access_token_routes.go:35
↓ 2 callers
Method
acquire
(ip, taskID, artifactKey string)
middleware/task_artifact_access.go:79
↓ 2 callers
Function
actionHasRole
(action ActionDefinition, roleKey string)
service/authz/registry.go:71
↓ 2 callers
Function
activeSystemTaskStatuses
()
model/system_task.go:589
↓ 2 callers
Function
add
(value)
plugins/tasks/content-moderation/plugin.js:209
↓ 2 callers
Method
add
add appends upstream text to an output.
relay/requestplugin/reply.go:240
↓ 2 callers
Method
addFinding
addFinding counts a finding by rule and category, at most 64 of them.
relay/requestplugin/reply.go:426
↓ 2 callers
Method
addRange
(low, high, target pdfToken)
relay/requestplugin/pdf.go:459
↓ 2 callers
Method
addReference
(kind, mime, url, filename, pointer string)
relay/requestplugin/attachments.go:472
↓ 2 callers
Function
addSyncTask
addSyncTask inserts a pending sync task. Every write gets its own row, so no write is lost; the master marks the rows done once the nodes applied them
model/system_sync_task.go:68
↓ 2 callers
Function
addTag
(tag: string)
web/src/components/tag-input.tsx:47
↓ 2 callers
Method
addTools
addTools adds the tool calls of one hook result.
relay/channel/providerplugin/adaptor.go:294
↓ 2 callers
Function
adjustSyncPrice
( values: PricingSyncValues, mode: PriceAdjustment, rate: number | null )
web/src/features/system-settings/models/upstream-price-adjustment.ts:37
↓ 2 callers
Function
advanceCurrentSessionToVersion
(identity AuthIdentity, nextUserAuthVersion int64, reason string)
service/auth_session.go:211
↓ 2 callers
Function
allFormats
--------------------------------------------------------------------------- Tests --------------------------------------------------------------------
relaykit/relayconvert/golden_test.go:281
↓ 2 callers
Function
allowedGroupSet
(groups []string)
pkg/perf_metrics/metrics.go:414
↓ 2 callers
Function
analyzeError
(errorLogs)
electron/main.js:64
↓ 2 callers
Method
annotationDelta
(annotation any)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:235
↓ 2 callers
Method
announceTool
announceTool also allocates the output index, so a held tool never ends up behind items that were added to the stream before it.
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:583
↓ 2 callers
Function
apiCategoryOf
* Refine the broad PROFILE_BY_NAME bucket into an API-shape category. The * `image` bucket from `PROFILE_BY_NAME` lumps still-image and video models
web/src/features/pricing/lib/mock-stats.ts:774
↓ 2 callers
Function
apiKeyFromWebSocketSubprotocol
(protocols string)
middleware/auth.go:669
↓ 2 callers
Function
apiRoot
(ctx)
plugins/tasks/alibaba/plugin.js:432
↓ 2 callers
Function
apiRoot
(ctx)
plugins/tasks/doubao/plugin.js:363
↓ 2 callers
Function
apiRoot
(ctx)
plugins/tasks/xai/plugin.js:142
↓ 2 callers
Function
apiRoot
(ctx)
plugins/tasks/google/plugin.js:64
↓ 2 callers
Function
apiRoot
(ctx)
plugins/tasks/vidu/plugin.js:173
↓ 2 callers
Function
apiRoot
(ctx)
plugins/tasks/hailuo/plugin.js:220
↓ 2 callers
Method
appendAnnotations
(block *responsesClaudeStreamBlock, annotations []any, estimatedInputTokens int, snapshot bool)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:426
↓ 2 callers
Function
appendCapped
(record, entries []relaycommon.RequestPluginRecord)
relay/requestplugin/socket.go:426
↓ 2 callers
Function
appendGroundingAnnotations
( annotations []any, chunks []geminiGroundingChunk, support geminiGroundingSupport, start int, end int,
relaykit/relayconvert/internal/gemini_chat/grounding.go:281
↓ 2 callers
Function
appendMissing
(values []string, items ...string)
relaykit/relayconvert/internal/shared/claude/schema.go:191
↓ 2 callers
Function
appendRequestPath
(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, other *model.LogOther)
service/log_info_generate.go:49
↓ 2 callers
Function
appendTaskLogInfo
(task *model.Task, other *model.LogOther)
service/task_billing.go:219
↓ 2 callers
Function
appendUsageBillingPathForLog
(other *model.LogOther, isLocalCountTokens bool, usage *dto.Usage)
service/billing_usage.go:56
↓ 2 callers
Function
applyAuthRotation
(value: unknown)
web/src/lib/auth-session.ts:162
↓ 2 callers
Function
applyChannelUpstreamModelUpdates
( channel *model.Channel, addModelsInput []string, ignoreModelsInput []string, removeModelsInput []string,
controller/channel_upstream_update.go:1057
↓ 2 callers
Function
applyChatCompletionResponse
( message: Message, response: ChatCompletionResponse )
web/src/features/playground/lib/message/message-streaming-utils.ts:200
↓ 2 callers
Function
applyDeepSeekV4ClaudeThinkingSuffix
(info *relaycommon.RelayInfo, request *dto.ClaudeRequest)
relay/channel/deepseek/adaptor.go:154
↓ 2 callers
Function
applyEndpoints
( preset: (typeof OAUTH_PRESETS)[number], url: string )
web/src/features/system-settings/auth/custom-oauth/components/preset-selector.tsx:85
↓ 2 callers
Function
applyExplicitLogTextFilter
(tx *gorm.DB, column string, value string)
model/log.go:18
↓ 2 callers
Function
applyFaviconToDom
(url: string)
web/src/lib/dom-utils.ts:19
↓ 2 callers
Function
applyFlow
(next: EmailBindingFlow)
web/src/features/security/components/dialogs/email-bind-dialog.tsx:118
↓ 2 callers
Function
applyHTTPTransportPolicy
(transport *http.Transport, policy HTTPTransportPolicy)
service/http_transport_sharded.go:115
↓ 2 callers
Function
applyHeaderOverrideToRequest
(req *http.Request, headerOverride map[string]string)
relay/channel/api_request.go:346
↓ 2 callers
Function
applyJsonSmartEnter
( value: string, selectionStart: number, selectionEnd: number )
web/src/components/json-code-editor/json-code-editor-utils.ts:126
↓ 2 callers
Function
applyOpenAIChatReasoningThroughHandlerOrder
(t *testing.T, original dto.GeneralOpenAIRequest)
relay/channel/claude/relay_claude_test.go:407
↓ 2 callers
Method
applyOutputItem
(event *dto.ResponsesStreamResponse, estimatedInputTokens int, stop bool)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:378
↓ 2 callers
Function
applyPasskeyDomainOptions
(values map[string]string)
model/passkey_option.go:255
↓ 2 callers
Function
applyPreset
(kind: 'today' | '7d' | 'week' | '30d' | 'month')
web/src/features/usage-logs/components/compact-date-time-range-picker.tsx:92
↓ 2 callers
Function
applyPricingDraft
( options: PricingOptions, data: ModelRatioData, names: string[] = [data.name] )
web/src/features/model-pricing/pricing.ts:271
↓ 2 callers
Function
applyPricingValues
( options: PricingOptions, values: PricingValues, names: string[] )
web/src/features/model-pricing/pricing.ts:290
↓ 2 callers
Function
applyPriorityPreview
( channels: Channel[], order: PriorityOrder, desc: boolean )
web/src/features/channels/lib/channel-priority-order.ts:69
↓ 2 callers
Function
applyRechargeRate
( price: number, showWithRecharge: boolean, priceRate: number, usdExchangeRate: number )
web/src/features/pricing/lib/dynamic-price.ts:198
↓ 2 callers
Method
applyResponseMetadata
(response *dto.OpenAIResponsesResponse)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:182
↓ 2 callers
Function
applyRule
(text, rule)
plugins/tasks/request-redact/plugin.js:376
↓ 2 callers
Function
applySelectedModelChanges
(originModels []string, addModels []string, removeModels []string)
controller/channel_upstream_update.go:148
↓ 2 callers
Function
applyStreamingChunk
( message: Message, type: StreamChunkType, chunk: string )
web/src/features/playground/lib/message/message-streaming-utils.ts:81
↓ 2 callers
Function
applySystemPromptIfNeeded
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeneralOpenAIRequest)
relay/chat_completions_via_responses.go:23
↓ 2 callers
Function
applyTaskMediaRequestHeaders
(destination http.Header, headers map[string]string)
controller/video_proxy.go:499
↓ 2 callers
Function
applyTaskPluginModelPreview
applyTaskPluginModelPreview sets up an unsaved task plugin channel for a model list preview as the Advanced Custom preview does: the plugin's meta.bas
controller/channel.go:1668
↓ 2 callers
Function
applyVendorOperation
(operation VendorOperation)
model/vendor_management.go:213
↓ 2 callers
Function
arrayBufferToBase64Url
( buffer?: ArrayBuffer | ArrayBufferLike | null )
web/src/lib/passkey.ts:71
↓ 2 callers
Function
artifactData
(ctx)
plugins/tasks/jimeng/plugin.js:410
↓ 2 callers
Function
artifactData
(ctx)
plugins/tasks/hailuo/plugin.js:796
↓ 2 callers
Function
artifactFileID
(ctx)
plugins/tasks/hailuo/plugin.js:802
↓ 2 callers
Function
artifactVideoURL
(ctx)
plugins/tasks/google/plugin.js:309
↓ 2 callers
Function
artifactVideoURL
(ctx)
plugins/tasks/vidu/plugin.js:442
↓ 2 callers
Function
artifactVideoURL
(ctx)
plugins/tasks/kling/plugin.js:642
↓ 2 callers
Function
asFloat64
(value any)
controller/ratio_sync.go:107
↓ 2 callers
Function
asOAIResponsesResponse
(response any)
relaykit/relayconvert/response_registry.go:1280
↓ 2 callers
Function
asOAIResponsesStreamResponse
(response any)
relaykit/relayconvert/response_registry.go:1291
↓ 2 callers
Function
aspect
(size)
plugins/tasks/vertex-ai/plugin.js:308
↓ 2 callers
Function
aspectRatio
(dimensions, ratios)
plugins/tasks/kling/plugin.js:195
↓ 2 callers
Function
assertEpayCallbacksVerifyBeforeSettlement
assertEpayCallbacksVerifyBeforeSettlement sends each callback to the top-up and subscription endpoints by GET and POST. Only a valid pending callback
controller/payment_webhook_availability_test.go:249
↓ 2 callers
Function
assertIndependentReplayReaders
assertIndependentReplayReaders proves that readers handed out by getBody own independent cursors, per the http.Request.GetBody contract of returning a
relay/common/outbound_body_test.go:75
↓ 2 callers
Function
assertLimitError
( t *testing.T, err error, expectedScope string, expectedLimit int, )
controller/plugin_protocol_limiter_test.go:234
↓ 2 callers
Function
assessBaseUrlTrust
( value: string | undefined )
web/src/features/channels/lib/task-plugin-base-url.ts:51
← previous
next →
3,601–3,700 of 15,592, ranked by callers