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
resolveAuth
(meta pluginruntime.AuthMeta, apiKey, proxy string)
relay/channel/task/jsplugin/auth.go:22
↓ 2 callers
Function
resolveLegacyRoute
(rawHref: string)
web/src/lib/legacy-route.ts:66
↓ 2 callers
Function
resolveLogsViewAccess
( role: number, viewScope: LogsViewScope )
web/src/features/usage-logs/components/usage-logs-provider.tsx:30
↓ 2 callers
Function
resolveModelMetadata
resolveModelMetadata preserves catalog precedence: exact, prefix, suffix, then contains. The first matching record within a rule type wins.
model/model_meta.go:79
↓ 2 callers
Function
resolveOAuthCallbackMode
( provider: string, state: string, { opener, storage }: OAuthCallbackModeContext )
web/src/features/auth/lib/oauth-callback-mode.ts:112
↓ 2 callers
Function
resolveOAuthSiteUrl
( serverAddress: string, fallback: string )
web/src/features/system-settings/auth/oauth-callback-url.ts:19
↓ 2 callers
Function
resolveOllamaBaseUrl
(channel: Channel | null)
web/src/features/channels/lib/ollama-utils.ts:66
↓ 2 callers
Function
resolveOrigins
(r *http.Request, settings *system_setting.PasskeySettings)
service/passkey/service.go:160
↓ 2 callers
Function
resolvePluginChangelogUrl
( indexUrl: string, plugin: MarketplacePlugin, version: string )
web/src/features/task-plugins/lib/plugin-changelog.ts:72
↓ 2 callers
Function
resolvePluginDocumentFiles
( indexUrl: string, document: MarketplaceDocument, baseName: 'README' | 'CHANGELOG', locale: string )
web/src/features/task-plugins/lib/plugin-document.ts:109
↓ 2 callers
Function
resolvePluginIcon
( input: PluginIconInput )
web/src/features/task-plugins/lib/plugin-icon.ts:55
↓ 2 callers
Method
resolveProxyKey
(rawProxyURL string)
service/http_client.go:223
↓ 2 callers
Function
resolveRPID
(r *http.Request, settings *system_setting.PasskeySettings, origins []string)
service/passkey/service.go:209
↓ 2 callers
Function
resolveRateLimitWindows
(data: RateLimitSource | null)
web/src/features/channels/components/dialogs/codex-usage-dialog.tsx:299
↓ 2 callers
Function
resolveTaskDetailAccess
( log: TaskLog, isAdmin: boolean, isRoot: boolean )
web/src/features/usage-logs/lib/task-details.ts:28
↓ 2 callers
Function
resolveTaskPreviewMode
( log: TaskLog, hasProjectedArtifacts = false )
web/src/features/usage-logs/lib/task-artifacts.ts:215
↓ 2 callers
Function
resolveThemeColor
(cssVariable: string)
web/src/lib/theme-color.ts:27
↓ 2 callers
Function
resolveThemeFont
( font: ThemeFont, preset: ThemePreset )
web/src/lib/theme-customization.ts:172
↓ 2 callers
Function
resolveTokenKey
--------------------------------------------------------------------------- 异步任务计费辅助函数 ---------------------------------------------------------------
service/task_billing.go:105
↓ 2 callers
Function
resolveUserSortOptions
(sortOptions []UserSortOptions)
model/user.go:70
↓ 2 callers
Function
resolvedTaskPluginIDs
(value any)
middleware/task_plugin.go:1411
↓ 2 callers
Function
respPtr
(value T)
relaykit/relayconvert/response_registry_test.go:791
↓ 2 callers
Function
respondTaskError
respondTaskError 统一输出 Task 错误响应(含 429 限流提示改写)
controller/relay.go:965
↓ 2 callers
Function
responseAnnotationToChat
(annotation any)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp.go:159
↓ 2 callers
Function
responseBody
responseBody reads the body or bodyBase64 member of a result and its contentType, empty when the result has none.
pluginkit/provider.go:1170
↓ 2 callers
Function
responseContent
(ctx, task)
plugins/tasks/sunoapi/plugin.js:237
↓ 2 callers
Function
responseToolOutputToChatContent
(value any)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:619
↓ 2 callers
Function
responsesAnnotationsToClaude
(annotations []any, text string)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_resp.go:95
↓ 2 callers
Function
responsesClaudeStopReason
(resp *dto.OpenAIResponsesResponse, sawToolCall bool)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_resp.go:85
↓ 2 callers
Function
responsesContentPartsToChatContent
(ctx context.Context, parts []any)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:257
↓ 2 callers
Function
responsesInputContentToClaudeMediaMessages
(c context.Context, content any)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_req.go:184
↓ 2 callers
Function
responsesPartPayload
(part map[string]any, key string)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:567
↓ 2 callers
Function
responsesRequestTextToChatResponseFormat
(raw json.RawMessage)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:451
↓ 2 callers
Function
responsesRequestToolChoiceToChat
(raw json.RawMessage)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:417
↓ 2 callers
Function
responsesTypeFromHostedKind
(kind Kind)
relaykit/relayconvert/internal/toolconv/response_artifacts.go:741
↓ 2 callers
Function
responsesWSErrorEndsRequest
A single generation is active, but a cancel can fail independently. Correlate available IDs first; uncorrelated control/server errors require a bounde
relay/responses_websocket.go:625
↓ 2 callers
Function
returnedState
returnedState is the JSON of a hook result's state member, which the host stores only when the hook returns one: not when it is absent or null.
pluginkit/task.go:529
↓ 2 callers
Function
revokePluginCredentialData
revokePluginCredentialData calls the plugin's revoke for the data of each credential, in the background, and only logs its failures.
service/provider_plugin.go:552
↓ 2 callers
Function
revokeUserSessions
(userID int, excludedSID, reason string)
model/user_session.go:734
↓ 2 callers
Function
rewriteSGLangResponsesCreatedAt
(info *relaycommon.RelayInfo, payload []byte, path string, createdAt dto.IntValue)
relay/channel/openai/relay_responses.go:107
↓ 2 callers
Function
roleBaselineAllows
(e *casbin.SyncedEnforcer, roleKey string, permission Permission)
service/authz/resolver.go:53
↓ 2 callers
Function
roundRankingFloat
(value float64)
service/rankings.go:573
↓ 2 callers
Function
roundRatioValue
(value float64)
controller/ratio_sync.go:842
↓ 2 callers
Function
routeSegmentsIntersect
(left, right []routePatternSegment)
router/plugin-router.go:646
↓ 2 callers
Function
routingPolicyFormValues
( options: Record<string, string> )
web/src/features/system-settings/request-policies/routing-form.ts:46
↓ 2 callers
Function
routingProtocolExport
(name string)
pluginkit/routing_contract_test.go:633
↓ 2 callers
Method
ruleQuery
(query *gorm.DB, ptype string, rule []string)
service/authz/adapter.go:106
↓ 2 callers
Method
run
(channel *model.Channel, plugin *jsplugin.LoadedPlugin, key pluginScheduledKey, entry *pluginScheduledEntry, l
service/provider_plugin_scheduled.go:195
↓ 2 callers
Function
runModeration
runModeration runs the content-moderation ingress hook through the host's fetch path against a fake moderation API that answers status and reply.
plugins/request_plugins_test.go:551
↓ 2 callers
Function
runProgram
(prog *vm.Program, requestRules []RequestRuleTrace, usedVars map[string]bool, params TokenParams, request Requ
pkg/billingexpr/run.go:53
↓ 2 callers
Function
sameModifierIntent
(left reasoning.Intent, right reasoning.Intent)
relay/helper/reasoning_suffix.go:236
↓ 2 callers
Function
samePluginScope
( a: RequestPluginScope, b: RequestPluginScope )
web/src/features/task-plugins/lib/plugin-scope.ts:40
↓ 2 callers
Function
sameSyncPrice
( left: PricingSyncValues, right: PricingSyncValues )
web/src/features/system-settings/models/upstream-ratio-sync-helpers.ts:86
↓ 2 callers
Function
sample
(name: string, lang?: string)
web/src/features/task-plugins/__tests__/request-plugin-samples.test.ts:29
↓ 2 callers
Function
samplePlugin
samplePlugin is a request plugin whose meta.samples is samples.
pluginkit/provider_test.go:1156
↓ 2 callers
Function
sanitizeGeminiEnum
sanitizeGeminiEnum keeps the enum constraint only when every element is a string, the only form Gemini's legacy Schema accepts. Any other shape is dro
relaykit/relayconvert/internal/shared/gemini/schema.go:154
↓ 2 callers
Function
saturateQuotaBounded
(value float64, op string, maxQuota int, minQuota int)
common/quota_math.go:86
↓ 2 callers
Function
save
(move: PriorityMove)
web/src/features/channels/hooks/use-channel-priority-order.ts:159
↓ 2 callers
Function
saveAffiliateCode
(code: string)
web/src/features/auth/lib/storage.ts:53
↓ 2 callers
Function
saveAndOpenErrorLog
()
electron/main.js:15
↓ 2 callers
Function
saveChartPreferences
( preferences: DashboardChartPreferences )
web/src/features/dashboard/lib/filters.ts:128
↓ 2 callers
Function
saveConfig
(config: Partial<PlaygroundConfig>)
web/src/features/playground/lib/storage/storage.ts:314
↓ 2 callers
Function
saveModelPricing
(changes: ModelPricingChange[])
web/src/features/model-pricing/api.ts:161
↓ 2 callers
Function
saveParameterEnabled
( parameterEnabled: Partial<ParameterEnabled> )
web/src/features/playground/lib/storage/storage.ts:343
↓ 2 callers
Function
saveSettings
( normalized: FlatPasskeyDefaults, preview?: PasskeyDomainChange )
web/src/features/system-settings/auth/passkey-section.tsx:242
↓ 2 callers
Function
scheduledKeyIdentity
scheduledKeyIdentity distinguishes replacement keys without retaining their secrets. Credential data changes on refresh; account identity stays stable
service/provider_plugin_scheduled.go:401
↓ 2 callers
Function
schemaMisfits
schemaMisfits lists what Gemini's typed Schema cannot hold of a JSON Schema as written: keywords outside its fields, type arrays, non-string enum valu
relaykit/relayconvert/internal/shared/gemini/schema.go:309
↓ 2 callers
Function
scrollSelectedOptionIntoView
( selectedOption: ScrollableOption | null, scrollContainer?: ScrollableOptionContainer | null )
web/src/components/model-group-selector/layout.ts:52
↓ 2 callers
Function
searchModels
( params: SearchModelsParams )
web/src/features/models/api.ts:59
↓ 2 callers
Function
searchVendors
(params: { association?: string keyword?: string p?: number page_size?: number })
web/src/features/models/api.ts:148
↓ 2 callers
Function
seedExportLogs
seedExportLogs stores logs of two users: three in the last hour and one from 400 days ago.
controller/log_export_test.go:55
↓ 2 callers
Function
seedHardcodedToolPrices
seedHardcodedToolPrices injects compile-time built-in fallbacks (tool defaults and model-prefix overrides) into the destination. The source is constan
setting/operation_setting/tools.go:43
↓ 2 callers
Function
seedSubscription
(t *testing.T, id int, userId int, amountTotal int64, amountUsed int64)
service/task_billing_test.go:110
↓ 2 callers
Function
seedreamUsageFacts
(lower, higher, inputImages, layered)
plugins/tasks/doubao/plugin.js:229
↓ 2 callers
Method
segments
segments splits the raw body at its delimiters: first is the offset of the first delimiter and newline the body's line break. Segment i+1 is part i, f
relay/requestplugin/form.go:239
↓ 2 callers
Function
selectLatestRelease
(payload: unknown)
web/src/features/system-update/releases.ts:91
↓ 2 callers
Method
send
()
web/src/features/auth/secure-verification/__tests__/verification-api.test.ts:193
↓ 2 callers
Method
send
send relays the body over the matched route. A credential line is no API key, so {api_key} in header overrides is empty while the request is built.
relay/channel/providerplugin/adaptor.go:659
↓ 2 callers
Function
sendChannelRequest
sendChannelRequest sends a channel management request through the channel's proxy and TLS setting. The caller closes the response body.
controller/channel_upstream_update.go:574
↓ 2 callers
Function
sendEmailBindingCodes
(lang string, state model.EmailBindingState, codes emailBindingCodes)
service/email_binding.go:181
↓ 2 callers
Method
sendError
(eventID, streamID string, apiErr *types.NewAPIError)
relay/responses_websocket.go:880
↓ 2 callers
Function
sendGeminiStreamResults
(c *gin.Context, results []relayconvert.ResponseResult)
relay/channel/openai/helper.go:103
↓ 2 callers
Function
sendGeminiStreamResults
(c *gin.Context, results []relayconvert.ResponseResult)
relay/channel/claude/relay-claude.go:206
↓ 2 callers
Method
sendManagement
sendManagement sends one management request built on header: the step's method, headers and body, the credential's headers and query, the channel's he
relay/channel/providerplugin/management.go:237
↓ 2 callers
Function
sendPluginFetch
sendPluginFetch sends one checked utils.fetch request with client. A redirect reaches the plugin as it is; fetching its location is a new request, che
service/provider_plugin.go:96
↓ 2 callers
Function
sendStreamData
(c *gin.Context, info *relaycommon.RelayInfo, data string, forceFormat bool, thinkToContent bool)
relay/channel/openai/relay-openai.go:24
↓ 2 callers
Function
sendWaffoWebhookResponse
sendWaffoWebhookResponse 发送签名响应
controller/topup_waffo.go:425
↓ 2 callers
Function
sentBody
The body a PUT sends over the wire: undefined fields are left out.
web/src/features/profile/__tests__/settings.test.tsx:62
↓ 2 callers
Function
serializeGroupPricingRows
(rows: GroupPricingRow[])
web/src/features/system-settings/models/group-ratio-visual-editor.tsx:183
↓ 2 callers
Function
serializeHeaderNavModules
( config: HeaderNavModulesConfig )
web/src/features/system-settings/maintenance/config.ts:179
↓ 2 callers
Method
serve
()
common/email_test.go:101
↓ 2 callers
Function
servesResponsesWebSocket
(routes []dto.AdvancedCustomRoute, model string)
pluginkit/meta.go:336
↓ 2 callers
Method
session
()
model/user_session.go:108
↓ 2 callers
Function
sessionDevice
( userAgent: string, unknownDevice: string, browserLabel: string, maxTouchPoints = 0 )
web/src/features/security/components/login-session-utils.ts:21
↓ 2 callers
Function
sessionView
(session *model.UserSession, current bool)
service/auth_session.go:423
↓ 2 callers
Function
setAccessTokenAuditParam
setAccessTokenAuditParam adds non-secret context, such as why a token was rejected, to the current request's access audit entry.
middleware/audit.go:295
↓ 2 callers
Function
setAccessTokenContext
setAccessTokenContext exposes the token grant to handlers. Scoped tokens also get a step-up identity bound to the token instead of a browser session.
middleware/auth.go:319
↓ 2 callers
Function
setCollapsible
(newCollapsible: Collapsible)
web/src/context/layout-provider.tsx:64
↓ 2 callers
Function
setFont
(font: Font)
web/src/context/font-provider.tsx:55
↓ 2 callers
Function
setHeaderPassthrough
( headerOverride: string | undefined, enabled: boolean )
web/src/features/channels/lib/header-passthrough.ts:66
← previous
next →
4,701–4,800 of 15,592, ranked by callers