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
↓ 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
pkg/jsplugin/provider.go:1436
↓ 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:1079
↓ 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:1018
↓ 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:1338
↓ 3 callers
Function
runTokenMigrationCompatibilityTest
(t *testing.T, db *gorm.DB, dialect string, managedTokensTable *bool)
controller/token_test.go:312
↓ 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:1723
↓ 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
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:268
↓ 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:1215
↓ 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
setupTaskPluginDisabledFactoryKeysTest
(t *testing.T)
setting/task_plugin_test.go:11
↓ 3 callers
Function
setupTaskPluginMarketplaceSourcesTest
(t *testing.T)
controller/task_plugin_test.go:1804
↓ 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:436
↓ 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
↓ 3 callers
Function
taskModelName
taskModelName 从 BillingContext 或 Properties 中获取模型名称。
service/task_billing.go:257
↓ 3 callers
Function
taskPluginControllerChannelSource
(key, version string, channelType int)
controller/task_plugin_test.go:62
↓ 3 callers
Function
taskPluginHookDetail
(err error)
middleware/task_plugin.go:1754
↓ 3 callers
Function
taskPluginOptionsHasKey
(t *testing.T, key string)
controller/task_plugin_test.go:201
↓ 3 callers
Function
taskPluginProtocolRendererContext
( request pluginruntime.ProtocolRequestContext, pinned pluginruntime.PinnedEndpoint, task *model.Task, art
controller/plugin_protocol.go:1177
↓ 3 callers
Function
taskPluginRoutingDebugReason
(message string)
pkg/jsplugin/registry.go:1173
↓ 3 callers
Function
taskPluginSkippedRoutes
taskPluginSkippedRoutes lists, as "METHOD /path", the declared top-level routes the gateway does not register for the plugin version serving key; the
controller/task_plugin.go:460
↓ 3 callers
Function
taskSubmissionAPIError
taskSubmissionAPIError adapts a task error for the shared relay error paths. TaskError.Error is nil for many local rejections, so fall back to the mes
controller/relay.go:985
↓ 3 callers
Function
terminalTestGeminiChunk
(text string, finishReason string, toolCall bool)
relaykit/relayconvert/terminal_stream_test.go:333
↓ 3 callers
Function
textContent
(text string)
relay/requestplugin/pdf_test.go:101
↓ 3 callers
Function
textFormat
textFormat is the format the host reads text from for a file of mime and filename: text, docx or pdf; "" for any other file.
relay/requestplugin/attachments.go:103
↓ 3 callers
Function
textRequestViaResponses
(c *gin.Context, info *relaycommon.RelayInfo, adaptor channel.Adaptor, request any)
relay/chat_completions_via_responses.go:76
↓ 3 callers
Function
thrownAt
thrownAt is the frame an Error was thrown from, as " at fn (file:line:col)", for host logs; it is empty for thrown values that are not Errors and for
pkg/jsplugin/engine.go:632
↓ 3 callers
Function
timeCondition
(overrides: Partial<TimeCondition> = {})
web/src/features/pricing/lib/__tests__/time-rule-expr.test.ts:33
↓ 3 callers
Function
toBoolean
(value: unknown, fallback: boolean)
web/src/features/system-settings/maintenance/config.ts:88
↓ 3 callers
Function
toInputValue
(date?: Date)
web/src/features/usage-logs/components/compact-date-time-range-picker.tsx:40
↓ 3 callers
Method
toMap
()
model/log_other.go:154
↓ 3 callers
Function
toastPluginChange
( title: string, issues: ModelPricingIssue[] | null | undefined )
web/src/features/task-plugins/lib/plugin-change-toast.tsx:29
↓ 3 callers
Method
touchEntry
touchEntry returns the key's bucket, creating it on demand, and marks it as the most recently active key. The caller must hold the mutex.
common/rate-limit.go:135
↓ 3 callers
Method
transformHookContext
transformHookContext is the ctx argument of a stage, reply or report hook.
pkg/jsplugin/transform.go:289
↓ 3 callers
Function
trimmed
(value)
plugins/tasks/google/plugin.js:49
↓ 3 callers
Function
truncateRunes
(text string, limit int)
pkg/jsplugin/provider.go:1478
↓ 3 callers
Function
tryParseTaskMatrixConfig
( expression: string | null | undefined, schema: BillingUsageSchema )
web/src/features/pricing/lib/task-expr.ts:191
↓ 3 callers
Function
tryParseTimeCondition
(expr: string)
web/src/features/pricing/lib/billing-expr.ts:402
↓ 3 callers
Function
tryParseVisualConfig
( exprStr: string | null | undefined )
web/src/features/pricing/lib/tier-expr.ts:176
↓ 3 callers
Function
tryRealtimeFetch
tryRealtimeFetch 尝试从上游实时拉取 Gemini/Vertex 任务状态。 仅当渠道类型为 Gemini 或 Vertex 时触发;其他渠道或出错时返回 nil。 当非 OpenAI Video API 时,还会构建自定义格式的响应体。
relay/relay_task.go:561
↓ 3 callers
Function
uniqueChannelIDs
(channelIDs []int)
pkg/wsmanager/wsmanager.go:218
↓ 3 callers
Function
unwrapStoredValue
(value: unknown)
web/src/features/playground/lib/storage/storage.ts:83
↓ 3 callers
Function
updateRow
(index: number, patch: Partial<MarketplaceSource>)
web/src/features/task-plugins/components/marketplace-sources-dialog.tsx:92
↓ 3 callers
Method
updateUsageState
()
model/twofa.go:65
↓ 3 callers
Function
updateVideoSingleTask
(ctx context.Context, adaptor TaskPollingAdaptor, ch *model.Channel, taskId string, taskM map[string]*model.Ta
service/task_polling.go:556
↓ 3 callers
Function
useApiInfo
()
web/src/features/dashboard/hooks/use-status-data.ts:40
↓ 3 callers
Function
useCanBindTaskPlugins
Whether the user may read the plugin options, which only binding needs.
web/src/features/channels/hooks/use-task-plugin-option.ts:35
↓ 3 callers
Function
useCarouselApi
()
web/src/components/ai-elements/inline-citation.tsx:115
← previous
next →
2,901–3,000 of 15,409, ranked by callers