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
quotaUnitsToDisplayAmount
( units: number, quotaPerUnit: number, meta: ReturnType<typeof getCurrencyDisplay>['meta'] )
web/src/lib/format.ts:127
↓ 2 callers
Function
quotedJoin
(items []string, sep string)
pluginkit/meta.go:2220
↓ 2 callers
Function
qwenImage3
(ctx)
plugins/tasks/alibaba/plugin.js:482
↓ 2 callers
Function
randomIdentifier
()
web/src/lib/auth-session-sync.ts:30
↓ 2 callers
Function
rankingBucketLabel
(bucket int64, config rankingPeriodConfig)
service/rankings.go:528
↓ 2 callers
Function
rankingBucketTs
(bucket int64)
service/rankings.go:524
↓ 2 callers
Function
rankingGrowthPct
(current int64, previous int64)
service/rankings.go:563
↓ 2 callers
Function
ratioToPrice
(ratio?: string, denominator?: string)
web/src/features/system-settings/models/model-pricing-snapshots.ts:79
↓ 2 callers
Function
readCgroupStatValue
readCgroupStatValue 从 "key value" 逐行格式的 cgroup 统计文件(cpu.stat、memory.stat)中读取一项。
common/container_usage.go:160
↓ 2 callers
Method
readContent
readContent reads the text of contents, a content stream or an array of them, with the fonts and forms of resources.
relay/requestplugin/pdf.go:156
↓ 2 callers
Function
readDocument
readDocument reads a PDF or DOCX file: at most two at once in the process, each for at most documentTimeout.
relay/requestplugin/attachments.go:244
↓ 2 callers
Function
readFrontMatter
( text: string, location: PluginDocumentLocation, options: { required: boolean; keys: readonly string[]
web/src/features/task-plugins/lib/plugin-document.ts:238
↓ 2 callers
Function
readFrontMatterTranslations
( frontMatter: PluginDocumentFrontMatter, location: PluginDocumentLocation & { locale: string }, baseNam
web/src/features/task-plugins/lib/plugin-document.ts:311
↓ 2 callers
Function
readH2TestRequest
(framer *http2.Framer)
relay/channel/api_request_getbody_test.go:278
↓ 2 callers
Function
readLimited
(resp *http.Response, limit int64)
relay/channel/providerplugin/management.go:299
↓ 2 callers
Function
readPluginLoginFailure
( data: unknown, flow: string | null )
web/src/features/channels/lib/plugin-login.ts:208
↓ 2 callers
Function
readPluginLoginMessage
( data: unknown, channelId: number )
web/src/features/channels/lib/plugin-login.ts:190
↓ 2 callers
Function
readPluginLoginRedirect
(url: string)
web/src/features/channels/lib/plugin-login.ts:246
↓ 2 callers
Function
readPluginSourceParts
( source: string )
web/src/features/task-plugins/lib/plugin-meta-preview.ts:423
↓ 2 callers
Function
readStageBody
readStageBody reads the stored client body. A read error is cached, so parsing the request reports it next; a body the hooks cannot read is left to pa
relay/requestplugin/relay.go:231
↓ 2 callers
Function
readStaticString
Decode JavaScript string tokens without evaluating code, including JS-only escapes.
web/src/features/task-plugins/lib/plugin-meta-preview.ts:181
↓ 2 callers
Function
readStoredValue
(baseKey: string)
web/src/features/playground/lib/storage/storage.ts:60
↓ 2 callers
Method
readStream
readStream reads at most limit decompressed bytes of a stream; false when the library cannot decode it, or when its decoding would pass the filter or
relay/requestplugin/pdf.go:188
↓ 2 callers
Function
readTaskExtendPluginKeys
( channelType: number, setting: | Pick<ChannelSettings, 'task_plugin_key' | 'task_extend_plugin_keys'>
web/src/features/channels/lib/channel-plugin-extensions.ts:50
↓ 2 callers
Function
readText
readText reads a text file: UTF-8, or UTF-16 with a byte order mark. It stops at maxChars UTF-16 code units. A NUL character makes the file unreadable
relay/requestplugin/extract.go:68
↓ 2 callers
Function
readThemePreference
( key: string, allowed: ReadonlySet<T>, fallback: T )
web/src/lib/theme-storage.ts:28
↓ 2 callers
Function
readTimeTokenPricing
( source: string, now?: Date )
web/src/features/pricing/lib/billing-expression/display.ts:296
↓ 2 callers
Function
realtimeError
realtimeError is a Realtime error event for a client event the instances stopped, or for a response they stopped (eventID "").
relay/requestplugin/socket.go:384
↓ 2 callers
Method
realtimeFields
realtimeFields reads the text of a Realtime server event: the text of an answer, and the transcript of its audio, which is read only.
relay/requestplugin/reply.go:1260
↓ 2 callers
Function
realtimeText
realtimeText is the text member of a Realtime content part: its text, or the transcript of its audio, which is read only.
relay/requestplugin/reply.go:1307
↓ 2 callers
Method
reasoningDelta
(delta string)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:283
↓ 2 callers
Function
reasoningEffortFromRequest
(request dto.Request)
relay/common/relay_info.go:568
↓ 2 callers
Method
reasoningOutput
(status string)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:880
↓ 2 callers
Function
receiveChannelCloseEvents
(ctx context.Context, ch <-chan *redis.Message, origin string)
pkg/wsmanager/wsmanager.go:156
↓ 2 callers
Function
recentMetrics
( current: InferenceStatus, previous?: InferenceStatus )
web/src/features/channels/lib/inference-status.ts:92
↓ 2 callers
Function
recentSuccessSeries
(buckets map[int64]counters)
pkg/perf_metrics/metrics.go:379
↓ 2 callers
Function
recordClaudeServerToolUse
recordClaudeServerToolUse bills the server tool requests Anthropic reports in usage.server_tool_use. Searches and fetches use the channel's own keys w
relay/channel/claude/relay-claude.go:259
↓ 2 callers
Function
recordLegacyGitHubBindingAudit
recordLegacyGitHubBindingAudit records the outcome of a legacy GitHub binding rewrite as an account binding event. No session exists yet on the login
controller/oauth.go:585
↓ 2 callers
Method
recordOperation
(mode, path, from, to string, value any)
relay/common/override.go:402
↓ 2 callers
Function
recordPasskeyDomainAudit
(c *gin.Context, change *model.PasskeyDomainChange, confirmed bool, err error)
controller/audit.go:78
↓ 2 callers
Function
recordReasoningDiagnostics
recordReasoningDiagnostics attaches best-effort reasoning resolutions made while merging request fields with model-name effort tails to the request lo
relay/channel/openai/adaptor.go:834
↓ 2 callers
Function
recordRedisRequest
记录Redis请求
middleware/model-rate-limit.go:69
↓ 2 callers
Function
recorded
recorded reports an entry that changed the request or the answer, found something or stopped it, or looked at its attachments; the public record leave
relay/requestplugin/record.go:34
↓ 2 callers
Function
redact
(rules, text)
plugins/tasks/request-redact/plugin.js:394
↓ 2 callers
Function
redisBucketKey
(key bucketKey)
pkg/perf_metrics/metrics.go:616
↓ 2 callers
Function
redisRateLimitHandler
Redis限流处理器
middleware/model-rate-limit.go:82
↓ 2 callers
Function
redisUserRateLimitKey
(mark string, userID int)
middleware/rate-limit.go:49
↓ 2 callers
Method
reencode
reencode returns one result per effect, in the order the plugin supplied. Each request waits for only its next image so other requests can take a turn
relay/requestplugin/media.go:190
↓ 2 callers
Function
registerCustomLocked
registerCustomLocked registers a custom provider; the caller holds mu.
oauth/registry.go:38
↓ 2 callers
Function
registerFormPlugin
(t *testing.T)
relay/requestplugin/requestplugin_test.go:1835
↓ 2 callers
Function
registerSourcePlugin
(t *testing.T, key, source string)
service/provider_plugin_token_test.go:79
↓ 2 callers
Function
registeredSystemTaskHandlers
()
service/system_task.go:66
↓ 2 callers
Function
relayConfig
(relay []dto.AdvancedCustomRoute)
pluginkit/meta.go:182
↓ 2 callers
Function
relaysSubmitEvents
relaysSubmitEvents reports whether the submission came through a native route, whose client receives an SSE reply event by event.
relay/channel/task/jsplugin/adaptor.go:484
↓ 2 callers
Method
release
()
pluginkit/fetch.go:95
↓ 2 callers
Method
releaseOut
releaseOut writes the released text that no event carried in delta events of its own.
relay/requestplugin/reply.go:1424
↓ 2 callers
Method
released
released is a Realtime event with the text of each output the check read set to what the client got.
relay/requestplugin/socket.go:636
↓ 2 callers
Function
remove
(root *node, tokens []string)
pkg/requestpatch/patch.go:773
↓ 2 callers
Function
removeCookie
(name: string)
web/src/lib/cookies.ts:57
↓ 2 callers
Function
removeFunctionCallIDs
(request *dto.GeminiChatRequest)
relay/channel/vertex/adaptor.go:67
↓ 2 callers
Function
removeTag
(tagToRemove: string)
web/src/components/tag-input.tsx:55
↓ 2 callers
Function
renderCellContent
( cell: Cell<TData, unknown> )
web/src/components/data-table/layout/card-cell-utils.ts:39
↓ 2 callers
Function
renderGeminiTextParts
(t *testing.T, texts []string)
relaykit/relayconvert/internal/gemini_chat/to_oai_chat_resp_test.go:14
↓ 2 callers
Function
renderInstances
(language?: ReturnType<typeof createInstance>)
web/src/features/request-processing/__tests__/request-processing.test.tsx:194
↓ 2 callers
Function
renderMath
(source: string, displayMode: boolean)
web/src/components/ui/markdown.tsx:185
↓ 2 callers
Function
renderTableBody
( props: DataTableViewProps<TData>, rows: Row<TData>[], colSpan: number, getColumnClassName: DataTable
web/src/components/data-table/core/data-table-view.tsx:245
↓ 2 callers
Function
renderTaskPluginProtocolFinalResponse
( ctx context.Context, pinned pluginruntime.PinnedEndpoint, protocolRequest pluginruntime.ProtocolRequestCo
controller/plugin_protocol.go:852
↓ 2 callers
Function
renderTaskPluginQuery
( c *gin.Context, pinned pluginruntime.PinnedRoute, requestContext pluginruntime.RouteRequestContext, task
middleware/task_plugin.go:1427
↓ 2 callers
Function
renderWithQueryClient
(ui: ReactElement)
web/src/features/usage-logs/audit/__tests__/details.test.tsx:327
↓ 2 callers
Method
renewManagement
renewManagement is renew outside a relay request.
relay/channel/providerplugin/management.go:53
↓ 2 callers
Function
replaceBackupCodesWithAuthVersion
(userId int, codes []string, identity *AuthSessionIdentity)
model/twofa.go:170
↓ 2 callers
Function
replaceBackupCodesWithTx
(tx *gorm.DB, userId int, codes []string)
model/twofa.go:144
↓ 2 callers
Function
replaceFileMarkers
replaceFileMarkers replaces each $file marker of a JSON body with the content of the client file it names, as base64 or as a data URL, and keeps every
relay/channel/providerplugin/adaptor.go:416
↓ 2 callers
Function
replaceModelPricing
replaceModelPricing writes one complete model draft into the option maps. Plugin expressions are grouped in the draft and flattened only in storage.
model/model_pricing_config.go:152
↓ 2 callers
Function
replaceStoredBody
(c *gin.Context, body []byte)
relay/requestplugin/relay.go:286
↓ 2 callers
Function
reply
(ctx, res)
plugins/tasks/request-redact/plugin.js:534
↓ 2 callers
Function
replyAnswer
replyAnswer is a non-stream answer in format whose only output is text; nil for a format reply checks do not cover.
relay/requestplugin/relay.go:745
↓ 2 callers
Function
replyErrorBody
replyErrorBody is an error as the client's format writes it.
relay/requestplugin/reply.go:989
↓ 2 callers
Method
report
report queues the report of a finished response: the events the client got, its usage, its quota and the entries since the last report.
relay/requestplugin/socket.go:650
↓ 2 callers
Function
reportEvents
reportEvents reads an SSE response as its events, data parsed as JSON when it parses; [DONE], comments and events without data are left out. A truncat
relay/requestplugin/report.go:412
↓ 2 callers
Function
reportSystemInstanceWithLog
()
service/system_instance.go:135
↓ 2 callers
Function
requestBody
(config, input)
plugins/tasks/content-moderation/plugin.js:266
↓ 2 callers
Function
requestHeaders
(ctx, method, url, bodyText)
plugins/tasks/jimeng/plugin.js:147
↓ 2 callers
Function
requestHeaders
(ctx)
plugins/tasks/kling/plugin.js:181
↓ 2 callers
Function
requestOpenAI2Ali
(request dto.GeneralOpenAIRequest, upstreamModelName string)
relay/channel/ali/text.go:12
↓ 2 callers
Function
requestPaymentAmount
( topupAmount: number, paymentType: string, calculators: PaymentAmountCalculators = defaultPaymentAmount
web/src/features/wallet/hooks/use-payment.ts:62
↓ 2 callers
Function
requestPluginDryRunExample
(format: string, model: string)
web/src/features/task-plugins/lib/request-plugins.ts:526
↓ 2 callers
Function
requestPluginDryRunPath
(format: string, model: string)
web/src/features/task-plugins/lib/request-plugins.ts:515
↓ 2 callers
Function
requestPluginSampleBody
( value: unknown, format: string, image: string | null )
web/src/features/task-plugins/lib/request-plugin-samples.ts:74
↓ 2 callers
Function
requestPluginSampleHasImage
(value: unknown)
web/src/features/task-plugins/lib/request-plugin-samples.ts:99
↓ 2 callers
Function
requestPluginSampleTexts
( value: unknown, member = '', found: string[] = [] )
web/src/features/task-plugins/lib/request-plugin-samples.ts:123
↓ 2 callers
Function
requestPluginSamplesFor
( samples: RequestPluginSample[], language: string )
web/src/features/task-plugins/lib/request-plugin-samples.ts:34
↓ 2 callers
Function
requestToJSONString
(v any)
relaykit/relayconvert/internal/claude_messages/to_oai_chat_req.go:341
↓ 2 callers
Function
requireLoginVerificationMethod
(state *model.UserVerificationState, method string)
service/login_verification.go:113
↓ 2 callers
Function
requireSuccessfulFlowRows
( response: FlowResponse, fallbackMessage: string )
web/src/features/dashboard/lib/flow-selection.ts:33
↓ 2 callers
Method
reserve
(targetQuota int, requireAvailableQuota bool)
service/billing_session.go:167
↓ 2 callers
Function
resetUserSubscriptionTx
(tx *gorm.DB, sub *UserSubscription, plan *SubscriptionPlan, now int64, advanceResetTime bool)
model/subscription.go:1030
↓ 2 callers
Function
resolutionFor
(size, model)
plugins/tasks/hailuo/plugin.js:233
↓ 2 callers
Function
resolutionForSize
(size)
plugins/tasks/google/plugin.js:126
↓ 2 callers
Function
resolveAdvanceResetTime
(value *bool)
controller/subscription.go:410
← previous
next →
4,601–4,700 of 15,592, ranked by callers