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
↓ 2 callers
Function
normalizeResolution
(value)
plugins/tasks/doubao/plugin.js:386
↓ 2 callers
Function
normalizeResponsesReasoningReplay
DeepSeek's stateless Responses API requires plaintext reasoning before an assistant tool step, including a step resumed after a tool result. Reproduce
relay/channel/deepseek/responses_reasoning.go:46
↓ 2 callers
Function
normalizeResponsesWSCreateEvent
normalizeResponsesWSCreateEvent builds the HTTP-shaped request body from a response.create whose envelope the read loop already parsed and validated.
relay/responses_websocket.go:973
↓ 2 callers
Function
normalizeSyncValue
(field string, value any)
controller/ratio_sync.go:125
↓ 2 callers
Function
normalizeTaskMediaHost
(scheme, host string)
controller/video_proxy.go:555
↓ 2 callers
Function
normalizeTaskVisualConfig
( config: TaskVisualConfig | null | undefined, schema: BillingUsageSchema )
web/src/features/pricing/lib/task-expr.ts:307
↓ 2 callers
Function
normalizeUserSettings
( setting?: string )
web/src/features/profile/lib/user-settings.ts:36
↓ 2 callers
Function
normalizeV1Meta
(meta *Meta)
pkg/jsplugin/registry.go:1573
↓ 2 callers
Function
noteTaskQuotaClamp
noteTaskQuotaClamp records the first quota saturation event onto the task's RelayInfo so LogTaskConsumption can surface it on the submit log's admin_i
relay/relay_task.go:466
↓ 2 callers
Function
notifyAdmins
notifyAdmins sends a notice to each enabled administrator for whom receives returns true, and returns how many notices it sent.
service/user_notify.go:42
↓ 2 callers
Function
notifySystemTaskRunner
notifySystemTaskRunner wakes the runner without blocking. If a wakeup is already pending it is a no-op, which is fine since one pass drains all work.
service/system_task.go:116
↓ 2 callers
Method
numeric
(node: ExpressionNode)
web/src/features/pricing/lib/billing-expression/runtime.ts:313
↓ 2 callers
Function
objectMembers
(data json.RawMessage, subject string)
pkg/requestpatch/patch.go:246
↓ 2 callers
Function
objectStreamData
objectStreamData is the data of an object stream holding objects under numbers, and the offset of the first object in it.
relay/requestplugin/pdf_test.go:107
↓ 2 callers
Function
observeStreamChoices
observeStreamChoices collects billable function call names and records the finish reason facts used by health sampling from one parsed chunk.
relay/channel/openai/relay-openai.go:203
↓ 2 callers
Method
offSlot
offSlot runs work, which waits or computes in Go, with the call's JavaScript clock stopped and its execution slot lent to other calls. It returns the
pkg/jsplugin/media.go:217
↓ 2 callers
Function
ollamaChatHandler
non-stream handler for chat/generate
relay/channel/ollama/stream.go:224
↓ 2 callers
Function
ollamaStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/ollama/stream.go:143
↓ 2 callers
Function
ollamaToolCallsToOpenAI
(toolCalls []OllamaToolCall, startIndex int, includeIndex bool)
relay/channel/ollama/stream.go:45
↓ 2 callers
Function
omitTrailingAssistantText
omitTrailingAssistantText drops the assistant turns without tool calls that end the converted conversation after a user turn or tool result. In Respon
relaykit/relayconvert/internal/oai_responses/req_helpers.go:70
↓ 2 callers
Function
omniDuration
(req)
plugins/tasks/vertex-ai/plugin.js:155
↓ 2 callers
Function
omniResolution
(req)
plugins/tasks/vertex-ai/plugin.js:147
↓ 2 callers
Function
omniUsageFacts
(seconds, resolution)
plugins/tasks/vertex-ai/plugin.js:27
↓ 2 callers
Function
onPaginationChange
(updater)
web/src/hooks/use-table-url-state.ts:169
↓ 2 callers
Function
onlyMembers
(members map[string]json.RawMessage, subject string, allowed ...string)
pkg/requestpatch/patch.go:254
↓ 2 callers
Function
openAIImageRuleFor
(model, detail string)
tokenkit/image.go:96
↓ 2 callers
Function
openTokenControllerExternalDB
(t *testing.T, dialect string, dsn string)
controller/token_test.go:123
↓ 2 callers
Function
openTokenControllerTestDB
(t *testing.T)
controller/token_test.go:82
↓ 2 callers
Function
openaiImageDataHasField
openaiImageDataHasField reports whether an image data entry carries a non-empty string value for field.
relay/channel/openai/relay_image.go:87
↓ 2 callers
Function
openaiImageResponseCount
openaiImageResponseCount counts billable images in an OpenAI-format image response body. An object-shaped data is one image when it carries url or b64
relay/channel/openai/relay_image.go:61
↓ 2 callers
Function
optionsKeyIsUnique
(db *gorm.DB)
model/option_primary_key_migration.go:46
↓ 2 callers
Function
optionsRevision
(t *testing.T)
model/sensitive_word_migration_test.go:14
↓ 2 callers
Function
orderCardCells
( cells: Cell<TData, unknown>[] )
web/src/components/data-table/layout/card-row-content.tsx:26
↓ 2 callers
Function
orderProtocolSupports
(protocol string, supports []string)
pkg/jsplugin/routing.go:154
↓ 2 callers
Function
originKey
(req *http.Request)
service/http_transport_sharded.go:40
↓ 2 callers
Function
originTaskTestContext
(userID int)
middleware/task_plugin_origin_task_test.go:73
↓ 2 callers
Function
originsForRPID
(origins []string, rpID string)
service/passkey/service.go:138
↓ 2 callers
Function
outboundDuration
(req)
plugins/tasks/hailuo/plugin.js:217
↓ 2 callers
Function
outboundDuration
(req)
plugins/tasks/kling/plugin.js:242
↓ 2 callers
Function
outboundSeconds
(req, reqKey)
plugins/tasks/jimeng/plugin.js:225
↓ 2 callers
Method
outputStatus
()
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:845
↓ 2 callers
Function
overrideKey
overrideKey is the value {api_key} stands for in header overrides: a credential line is no API key.
relay/channel/task/jsplugin/credential.go:121
↓ 2 callers
Method
paramOverride
new-api only: outbound hooks only, runs the new-api channel parameter override language on body, with conditions reading ctx. A return_error operation
docs/plugin-api/v1.d.ts:29
↓ 2 callers
Function
parseAdvancedCustomRouteModels
(value: string)
web/src/features/channels/lib/advanced-custom.ts:592
↓ 2 callers
Function
parseAudio
(audioBase64 string, format string)
service/audio.go:10
↓ 2 callers
Function
parseConditionOperations
(raw any)
relay/common/override.go:2037
↓ 2 callers
Function
parseContentUrl
(value: unknown)
web/src/features/usage-logs/lib/task-artifacts.ts:56
↓ 2 callers
Function
parseDocument
(body []byte)
pkg/requestpatch/patch.go:409
↓ 2 callers
Function
parseFlowQuotaTimeRange
(c *gin.Context)
controller/usedata.go:13
↓ 2 callers
Function
parseHEIFDimensions
parseHEIFDimensions parses ISOBMFF box tree to find the ispe box and extract image width/height. Returns (width, height, ok).
service/file_service.go:517
↓ 2 callers
Function
parseHeaderNavBoolean
( raw: unknown, fallback: boolean )
web/src/lib/nav-modules.ts:59
↓ 2 callers
Function
parseHeaderNavModulesFromStatus
( status: Record<string, unknown> | null )
web/src/lib/nav-modules.ts:141
↓ 2 callers
Function
parseHeaderOverrideObject
( headerOverride: string | undefined )
web/src/features/channels/lib/header-passthrough.ts:29
↓ 2 callers
Function
parseHeaderReplacementTokens
(value any)
relay/common/override.go:1334
↓ 2 callers
Function
parseInferenceMetrics
(raw string, prefix string)
controller/channel_inference.go:211
↓ 2 callers
Function
parseJsonEditorConfig
()
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:585
↓ 2 callers
Function
parseJsonRows
(json: string)
web/src/components/json-editor.tsx:46
↓ 2 callers
Function
parseLegacyAudioClips
(data: unknown)
web/src/features/usage-logs/lib/task-artifacts.ts:143
↓ 2 callers
Function
parseMarketplaceDescription
( value: unknown )
web/src/features/task-plugins/lib/marketplace.ts:270
↓ 2 callers
Function
parseModelStatusFilter
parseModelStatusFilter maps UI/API status values to the models.status column. Returns ok=false when no status filter should be applied.
model/model_meta.go:518
↓ 2 callers
Function
parseModelSyncFilter
parseModelSyncFilter maps UI/API sync values to the models.sync_official column. Returns ok=false when no sync filter should be applied.
model/model_meta.go:537
↓ 2 callers
Function
parseModelsList
(models: string)
web/src/features/channels/lib/channel-utils.ts:226
↓ 2 callers
Function
parseNestedRatioMap
( value: string )
web/src/features/system-settings/models/group-ratio-visual-editor.tsx:150
↓ 2 callers
Function
parseNode
(value gjson.Result, depth int)
pkg/requestpatch/patch.go:423
↓ 2 callers
Function
parseNonNegativeNumber
(value: string)
web/src/features/pricing/lib/billing-expression/visual.ts:249
↓ 2 callers
Function
parsePluginChangelog
( text: string, identity: ChangelogIdentity, sourceUrl: string )
web/src/features/task-plugins/lib/plugin-changelog.ts:167
↓ 2 callers
Function
parsePluginReadme
( text: string, locale: string, sourceUrl: string )
web/src/features/task-plugins/lib/plugin-readme.ts:86
↓ 2 callers
Function
parseProviderModelSuffix
parseProviderModelSuffix recognises a provider family's naked model-name aliases. allowSuffixAlias gates all of them, including effort tails, so a dis
relaykit/relayconvert/reasoning/suffix.go:226
↓ 2 callers
Function
parseProxyURL
(rawProxyURL string, allowLegacySuffix bool)
common/proxy_url.go:23
↓ 2 callers
Function
parsePruneObjectsDraft
(valueText: string)
web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:789
↓ 2 callers
Function
parseRequestModelName
(name string, opts *convmeta.Options)
relay/helper/reasoning_suffix.go:162
↓ 2 callers
Function
parseResponsesWSEnvelope
Stream identity belongs to the WebSocket envelope. For the legacy wrapped input, the top-level field takes precedence over response.stream_id.
relay/responses_websocket.go:934
↓ 2 callers
Function
parseRoutePattern
(routePath string)
router/plugin-router.go:629
↓ 2 callers
Function
parseSidebarConfig
* Parse backend SidebarModulesAdmin configuration
web/src/hooks/use-sidebar-config.ts:128
↓ 2 callers
Function
parseStatusCodeKey
(rawKey: string)
web/src/features/channels/lib/status-code-risk-guard.ts:21
↓ 2 callers
Function
parseStatusCodeMappingTarget
(rawValue: unknown)
web/src/features/channels/lib/status-code-risk-guard.ts:27
↓ 2 callers
Function
parseStatusFilter
(statusParam string)
controller/channel.go:61
↓ 2 callers
Function
parseStreamMessageUpdates
(data: string)
web/src/features/playground/lib/streaming/stream-utils.ts:67
↓ 2 callers
Function
parseStringItems
(items: PrefillGroup['items'])
web/src/features/models/components/prefill-group-shared.ts:69
↓ 2 callers
Function
parseTaskArtifactsResponse
( response: TaskArtifactsResponse )
web/src/features/usage-logs/lib/task-artifacts.ts:163
↓ 2 callers
Function
parseTelegramBindCallback
( search: TelegramBindCallbackSearch )
web/src/features/auth/lib/oauth-bind-window.ts:56
↓ 2 callers
Function
parseToUnicode
parseToUnicode reads the code space ranges, at most maxPDFCodespaceRanges, and the bfchar and bfrange entries of a ToUnicode CMap. Ranges walk at most
relay/requestplugin/pdf.go:400
↓ 2 callers
Function
parseToolPrice
(value: string)
web/src/features/system-settings/models/tool-price-settings.tsx:73
↓ 2 callers
Function
parseUserSidebarConfig
* Parse user-level sidebar_modules. Returns null when the value is empty, * invalid, or otherwise unusable — the caller treats null as "do not narrow
web/src/hooks/use-sidebar-config.ts:151
↓ 2 callers
Function
parseVolcengineAuth
(apiKey string)
relay/channel/volcengine/tts.go:110
↓ 2 callers
Function
parseWaffoPayMethods
(value: string)
web/src/features/system-settings/integrations/payment-settings-section.tsx:221
↓ 2 callers
Function
patchGeminiZeroCompletionUsage
patchGeminiZeroCompletionUsage estimates completion tokens locally when upstream usageMetadata was billable but reported zero completion tokens even t
relay/channel/gemini/relay-gemini.go:47
↓ 2 callers
Function
patchSource
Reuse untouched source spans instead of rewriting whitespace, labels or price order.
web/src/features/pricing/lib/billing-expression/visual.ts:232
↓ 2 callers
Method
pickShard
(origin string)
service/http_transport_sharded.go:47
↓ 2 callers
Function
pinTaskPluginFormModel
pinTaskPluginFormModel sets the model field of a form body to the model the endpoint was pinned to.
middleware/task_plugin.go:1043
↓ 2 callers
Function
pinnedCandidatePlugins
pinnedCandidatePlugins returns the plugins a pinned shared host endpoint, or a native route several plugins declare, may execute, in ascending key ord
middleware/distributor.go:194
↓ 2 callers
Function
pinnedEndpointCandidateForChannel
pinnedEndpointCandidateForChannel returns the index, among pinnedCandidatePlugins, of the candidate that executes on channel.
middleware/distributor.go:225
↓ 2 callers
Function
plainObject
(value)
plugins/tasks/hailuo/plugin.js:175
↓ 2 callers
Function
planChannelPriorityMove
Equal-priority channels remain together. Opening a slot shifts the shorter contiguous run of occupied integer priorities, measured by affected channel
model/channel_priority.go:113
↓ 2 callers
Function
pluginExpressionsEqual
( left: Record<string, string> = {}, right: Record<string, string> = {} )
web/src/features/pricing/lib/plugin-pricing.ts:108
↓ 2 callers
Function
pluginLoginFieldsSchema
(fields: PluginLoginField[])
web/src/features/channels/lib/plugin-login.ts:266
↓ 2 callers
Function
pluginProtocolTickDelay
(taskID string, tick uint64, base, jitter time.Duration)
controller/plugin_protocol.go:1198
↓ 2 callers
Function
pluginReportsBalance
pluginReportsBalance reports whether a plugin exports the balance hooks.
controller/channel_balance.go:80
↓ 2 callers
Function
pluginResponseMap
(response *dto.PluginResponsesResponse)
relay/plugin_protocol.go:842
↓ 2 callers
Function
pluginTokenKey
(plugin *jsplugin.LoadedPlugin, channelID int, line string, config json.RawMessage, baseURL string)
service/provider_plugin.go:313
← previous
next →
4,401–4,500 of 15,409, ranked by callers