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
↓ 3 callers
Function
registeredSyncTopics
(sync: NodeSync, topics?: string[])
web/src/features/system-info/lib/node-sync.ts:48
↓ 3 callers
Function
rejectInvalidCreditedQuota
(c *gin.Context, userId int, quota decimal.Decimal)
controller/topup.go:282
↓ 3 callers
Function
rejectTaskPluginRoutingConflict
rejectTaskPluginRoutingConflict answers the request and returns true when the plugin about to serve key fails to compile or does not fit the live rout
controller/task_plugin.go:837
↓ 3 callers
Method
rejected
rejected reports an upstream rejection of the credential: a 401, or a non-2xx response credentialRejected accepts. The body it reads stays readable fo
relay/channel/providerplugin/adaptor.go:752
↓ 3 callers
Function
relaxNoticeDelivery
(t *testing.T, onNotice func(title string))
service/provider_plugin_test.go:527
↓ 3 callers
Function
rememberPasskeyRPID
(rpID?: string)
web/src/features/auth/passkey/assertion.ts:39
↓ 3 callers
Method
rememberUsage
(usage *dto.Usage)
relaykit/relayconvert/response_registry.go:667
↓ 3 callers
Function
removeTrailingSlash
(value: string)
web/src/features/system-settings/integrations/utils.ts:19
↓ 3 callers
Function
renderChildren
( nodes: ParsedNode[], fadeRun?: FadeRun )
web/src/components/ai-elements/response-renderer.tsx:62
↓ 3 callers
Function
renderQuotaCompat
(rawQuota: number, digits = 4)
web/src/features/dashboard/lib/charts.ts:53
↓ 3 callers
Method
renew
renew refreshes the request's credential, or drops its token and exchanges the key again, after the upstream rejected it.
relay/channel/providerplugin/adaptor.go:639
↓ 3 callers
Function
reportFailedTasks
reportFailedTasks reports tasks failed in one bulk update with reason.
service/task_polling.go:82
↓ 3 callers
Function
reportFinalTask
reportFinalTask reports a task once, after its final state is stored and settled. A task no instance may report costs nothing.
service/task_polling.go:75
↓ 3 callers
Function
requestAccessTokenLookup
(c *gin.Context)
middleware/auth.go:280
↓ 3 callers
Function
requestPasskeyAssertion
( begin: (rpID?: string) => Promise<PasskeyOptionsPayload>, signal?: AbortSignal, selection: PasskeySele
web/src/features/auth/passkey/assertion.ts:48
↓ 3 callers
Function
requestPluginConfigDefaults
( schema: RequestPluginConfigShape | undefined )
web/src/features/task-plugins/lib/request-plugins.ts:200
↓ 3 callers
Function
requestPluginModelValueShape
( field: RequestPluginConfigField )
web/src/features/task-plugins/lib/request-plugins.ts:113
↓ 3 callers
Function
requestRuleNumber
(node ast.Node)
pkg/billingexpr/compile.go:87
↓ 3 callers
Function
requestSettings
(req, action, model)
plugins/tasks/vidu/plugin.js:242
↓ 3 callers
Function
requestTarget
requestTarget reads the path or url member of a request result: path replaces the route's upstream path on its origin, url the whole address.
pluginkit/provider.go:806
↓ 3 callers
Function
resolution
(size)
plugins/tasks/vertex-ai/plugin.js:302
↓ 3 callers
Function
resolveAuthentication
()
web/src/lib/auth-session.ts:373
↓ 3 callers
Function
resolveChannelSortOptions
(idSort bool, sortOptions []ChannelSortOptions)
model/channel.go:138
↓ 3 callers
Function
resolveChannelTestUserID
(c *gin.Context)
controller/channel-test.go:86
↓ 3 callers
Function
resolvePluginMetaPreview
( plugin: MarketplacePlugin | undefined, version: MarketplaceIndexVersion | undefined, source: PluginMet
web/src/features/task-plugins/lib/plugin-meta-preview.ts:488
↓ 3 callers
Function
resolveVisibleStages
( role: FlowRole, visibleStages?: FlowNodeKind[] )
web/src/features/dashboard/lib/flow.ts:264
↓ 3 callers
Method
respond
respond primes the conversion and answers the client: the event stream, or the chunks or body of a non-streaming client. An error before the first out
relay/channel/providerplugin/stream.go:99
↓ 3 callers
Method
responseEvent
(eventType string)
relay/plugin_protocol.go:967
↓ 3 callers
Function
responseStreamResults
(state *ResponseStreamState, values []any, usage *dto.Usage, diagnostics []types.ConversionDiagnostic)
relaykit/relayconvert/response_registry.go:706
↓ 3 callers
Function
responsesCallID
(item map[string]any)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:581
↓ 3 callers
Function
responsesCustomToolChoice
responsesCustomToolChoice rewrites a Responses {"type":"custom"} tool choice into a named function choice when that custom tool was sent as a function
relaykit/relayconvert/internal/toolconv/encode.go:406
↓ 3 callers
Function
responsesJSONString
(raw json.RawMessage)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:696
↓ 3 callers
Function
responsesMCPArgumentsFromClaude
responsesMCPArgumentsFromClaude converts Claude's JSON-object input into the JSON string required by a Responses mcp_call.arguments field.
relaykit/relayconvert/internal/toolconv/hosted_values.go:52
↓ 3 callers
Function
responsesMCPErrorFromClaudeContent
(raw json.RawMessage, errorCode string)
relaykit/relayconvert/internal/toolconv/hosted_values.go:165
↓ 3 callers
Method
restoreConnectionContext
(c *gin.Context, model string)
relay/responses_websocket.go:652
↓ 3 callers
Method
result
(step PluginLoginStepView)
service/provider_plugin_login.go:326
↓ 3 callers
Function
resultUpstreamError
resultUpstreamError reads the error member of a convertResponse or convertStreamEvent result: nil when the result has none. A result with an error car
pluginkit/provider.go:1420
↓ 3 callers
Function
rewritable
rewritable reports inline media a media.text effect may rewrite: a text file. A PDF, a DOCX file or an image would have to be written anew, and a mult
relay/requestplugin/attachments.go:805
↓ 3 callers
Function
rewriteTaskPluginJSONModel
rewriteTaskPluginJSONModel patches the top-level JSON "model" field and replaces BodyStorage. Non-JSON bodies are left untouched.
middleware/task_plugin_model.go:15
↓ 3 callers
Function
routerPluginSource
(key, version, routes string)
router/plugin_router_test.go:1087
↓ 3 callers
Method
rows
rows are the cross-reference stream rows of the objects written in the file, and the free head of the list.
relay/requestplugin/pdf_test.go:37
↓ 3 callers
Function
runChannelTestWorkers
runChannelTestWorkers executes independent channel tests with bounded concurrency. Results and progress are reduced by the caller goroutine, so summar
controller/channel-test.go:1019
↓ 3 callers
Function
runResetOnFirstStreamServer
runResetOnFirstStreamServer speaks just enough raw HTTP/2 to emulate an upstream that accepts the first request, waits until the request body has been
relay/channel/api_request_getbody_test.go:346
↓ 3 callers
Function
runResponsesImageBillingStream
(t *testing.T, events ...string)
relay/channel/openai/relay_responses_billing_test.go:400
↓ 3 callers
Function
runSystemTaskClaimPass
runSystemTaskClaimPass tries to claim one pending task per registered type and dispatches each claimed task in its own goroutine so a long-running han
service/system_task.go:226
↓ 3 callers
Function
runSystemTaskScheduler
runSystemTaskScheduler creates a new task row for each enabled scheduled handler whose interval has elapsed since its last run and that has no active
service/system_task.go:264
↓ 3 callers
Function
runTaskPluginDryRun
(t *testing.T, body string)
controller/task_plugin_test.go:1340
↓ 3 callers
Function
runTokenMigrationCompatibilityTest
(t *testing.T, db *gorm.DB, dialect string, managedTokensTable *bool)
controller/token_test.go:312
↓ 3 callers
Function
sameTaskMediaOrigin
(left, right *url.URL)
controller/video_proxy.go:566
↓ 3 callers
Function
sanitizeAdvancedCustomRequestError
(err error, key string, requestURL string)
controller/channel_upstream_update.go:310
↓ 3 callers
Function
sanitizedTaskPluginError
(status int, detail string)
middleware/task_plugin.go:1716
↓ 3 callers
Function
saturateQuota
saturateQuota converts an already-rounded single-request quota to int. Whenever clamping (what would otherwise be an integer wraparound) or a NaN fall
common/quota_math.go:82
↓ 3 callers
Function
save
(onUpdate: () => void)
web/src/features/profile/__tests__/settings.test.tsx:233
↓ 3 callers
Function
saveMessages
(messages: Message[])
web/src/features/playground/lib/storage/storage.ts:392
↓ 3 callers
Method
scanKeys
(match string)
pkg/cachex/hybrid_cache.go:139
↓ 3 callers
Function
scheduledChannelEligible
(channel *model.Channel)
service/provider_plugin_scheduled.go:233
↓ 3 callers
Function
scheduledKeyEligible
(channel *model.Channel, plugin *jsplugin.LoadedPlugin, index int, line string)
service/provider_plugin_scheduled.go:247
↓ 3 callers
Function
scheduledKeyStatus
(channel *model.Channel, index int)
service/provider_plugin_scheduled.go:237
↓ 3 callers
Function
securityVerificationPolicy
securityVerificationPolicy is the only operation-to-method policy. Device support and disabled providers never turn an enrolled factor into an absent
service/security_verification.go:313
↓ 3 callers
Function
send
( payload: ChatCompletionRequest, callbacks: StreamRequestCallbacks )
web/src/features/playground/hooks/use-stream-request.ts:73
↓ 3 callers
Function
serializeRules
(rules: AffinityRule[])
web/src/features/system-settings/general/channel-affinity/index.tsx:73
↓ 3 callers
Function
serializeSidebarModulesAdmin
( config: SidebarModulesAdminConfig )
web/src/features/system-settings/maintenance/config.ts:240
↓ 3 callers
Function
servedTaskPluginParts
servedTaskPluginParts returns the parts of the plugin version meta describes, read from the runtime when it serves that version. A version it does not
controller/task_plugin.go:269
↓ 3 callers
Function
setChannelAffinityContext
(c *gin.Context, meta channelAffinityMeta)
service/channel_affinity.go:354
↓ 3 callers
Function
setCodexWhamRequestHeaders
(req *http.Request, accessToken string, accountID string)
service/codex_wham_usage.go:154
↓ 3 callers
Function
setDashboardAuthContext
(c *gin.Context, user *model.UserBase, identity service.AuthIdentity, useAccessToken bool)
middleware/auth.go:359
↓ 3 callers
Function
setFormValue
(field: keyof ModelPricingFormValues, value: string)
web/src/features/system-settings/models/model-pricing-sheet.tsx:441
↓ 3 callers
Function
setHeaderOverrideInContext
(context map[string]any, headerName string, value any, keepOrigin bool)
relay/common/override.go:1239
↓ 3 callers
Method
setPersistedTaskStatus
(taskStatus []string)
relay/plugin_protocol.go:986
↓ 3 callers
Function
setupAuthFlowControllerTest
(t *testing.T)
controller/auth_flow_test.go:654
↓ 3 callers
Function
setupChannelRoutingTestDB
(t *testing.T, dialect string)
middleware/task_plugin_test.go:2101
↓ 3 callers
Function
setupTaskPluginDisabledFactoryKeysTest
(t *testing.T)
setting/task_plugin_test.go:11
↓ 3 callers
Function
setupTaskPluginMarketplaceSourcesTest
(t *testing.T)
controller/task_plugin_test.go:1805
↓ 3 callers
Function
setupTaskPluginModelTest
(t *testing.T)
model/task_plugin_test.go:13
↓ 3 callers
Function
shouldUpdateRedis
(fromDB bool, err error)
model/utils.go:137
↓ 3 callers
Method
signTaskRequest
signTaskRequest runs the plugin's signRequest on a task request of a task plugin channel, after its header overrides.
relay/channel/task/jsplugin/credential.go:130
↓ 3 callers
Function
sleep
(ctx context.Context, delay time.Duration)
relay/channel/providerplugin/management.go:311
↓ 3 callers
Method
snapshot
()
pkg/perf_metrics/types.go:132
↓ 3 callers
Function
splitModelNamespace
(modelName string)
relaykit/relayconvert/reasoning/suffix.go:206
↓ 3 callers
Function
stableColorMap
( keys: string[], palette?: readonly string[] )
web/src/features/dashboard/lib/flow.ts:319
↓ 3 callers
Function
stageRun
(run: FadeRun)
web/src/components/ai-elements/response-fade.ts:151
↓ 3 callers
Method
startBlock
(block *responsesClaudeStreamBlock, estimatedInputTokens int)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:281
↓ 3 callers
Function
startReasoningTiming
( message: Message, startedAt: number = Date.now() )
web/src/features/playground/lib/message/message-timing-utils.ts:40
↓ 3 callers
Function
staticObjectProperties
Dynamic keys/spreads could replace any field, so the entire object is unknown.
web/src/features/task-plugins/lib/plugin-meta-preview.ts:234
↓ 3 callers
Method
steps
steps are the audit steps of the instances that ran or could not read the answer, once each.
relay/requestplugin/reply.go:440
↓ 3 callers
Function
stopReasonOpenAI2Claude
(reason string)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp.go:502
↓ 3 callers
Function
stopStream
stopStream ends a converted stream from the scanner callback. A nil streamErr (the stream stops because the client went away) must reach StreamResult.
relay/channel/openai/responses_via_chat.go:230
↓ 3 callers
Method
stopped
stopped returns the error the client got for a response an instance stopped, and nil for any other.
relay/requestplugin/socket.go:214
↓ 3 callers
Function
streamLineLimit
()
relay/channel/providerplugin/stream.go:415
↓ 3 callers
Function
submitModel
(ctx, req)
plugins/tasks/kling/plugin.js:209
↓ 3 callers
Function
submitReqKey
(ctx)
plugins/tasks/jimeng/plugin.js:214
↓ 3 callers
Function
subtractModelNames
(base []string, removed []string)
controller/channel_upstream_update.go:126
↓ 3 callers
Function
syncRows
(updatedRows: MappingRow[])
web/src/features/channels/components/model-mapping-editor.tsx:280
↓ 3 callers
Method
take
()
web/src/features/pricing/lib/billing-expression/parser.ts:199
↓ 3 callers
Method
takeDiagnostics
(hasOutput bool)
relaykit/relayconvert/response_registry.go:697
↓ 3 callers
Function
tamperDashboardToken
(token string)
middleware/auth_test.go:74
↓ 3 callers
Function
taskArtifactClientHeaders
(headers http.Header)
controller/task.go:402
↓ 3 callers
Function
taskBillingContextPriceData
(bc *model.TaskBillingContext)
service/task_billing.go:245
↓ 3 callers
Method
taskCredentialLine
taskCredentialLine picks, from a task plugin channel's whole key, the line polling and content requests of task use: the credential of the account tha
relay/channel/task/jsplugin/credential.go:81
↓ 3 callers
Function
taskMatrixRowLabel
( combination: Record<string, string> )
web/src/features/pricing/lib/task-expr.ts:136
← previous
next →
2,901–3,000 of 15,592, ranked by callers