MCPcopy Create free account

hub / github.com/QuantumNous/new-api / functions

Functions15,409 in github.com/QuantumNous/new-api

FunctionTestChatCompletionsResponseToResponsesMapsIncompleteFinishReasons
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp_test.go:125
FunctionTestChatCompletionsResponseToResponsesPreservesTextToolCallsAndUsage
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp_test.go:14
FunctionTestChatCompletionsResponseToResponsesRestoresCustomToolCalls
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp_test.go:367
FunctionTestChatCompletionsStreamToResponsesEmitsReasoningSummaryPartLifecycle
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp_test.go:216
FunctionTestChatCompletionsStreamToResponsesEventsAggregatesUsageAndToolArgs
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp_test.go:158
FunctionTestChatCompletionsStreamToResponsesHoldsNamelessToolUntilNameArrives
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp_test.go:464
FunctionTestChatCompletionsStreamToResponsesReopensItemsAfterMidStreamFinishReason
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp_test.go:273
FunctionTestChatCompletionsStreamToResponsesRestoresCustomToolCalls
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp_test.go:408
FunctionTestCheckNotificationLimitRedisWindowSpansClockHours
(t *testing.T)
service/notify_limit_test.go:53
FunctionTestCheckNotificationLimitWindowSpansClockHours
限流窗口必须由 NOTIFICATION_LIMIT_DURATION_MINUTE 决定,不能在整点被重置
service/notify_limit_test.go:18
FunctionTestCheckPDFCrossReferenceStream
A cross-reference stream is decoded as the library decodes it: by the predictor columns of its decode parameters, held to the column bound, and with t
relay/requestplugin/pdf_test.go:276
FunctionTestCheckPDFObjectStreams
checkPDF builds the cross-reference table the library builds and holds every object stream the library may read objects from to bounds: /N within its
relay/requestplugin/pdf_test.go:195
FunctionTestCheckResponsesWSModelAccessMatchesHTTPTokenLimits
The WebSocket relay must admit the same model names as the HTTP distributor when a token restricts models (reasoning suffixes and @modifiers included)
relay/responses_websocket_test.go:124
FunctionTestCheckSubmittedPluginCredentials
(t *testing.T)
service/provider_plugin_test.go:746
FunctionTestCheckSystemOverload
(t *testing.T)
common/system_monitor_test.go:222
FunctionTestChooseDBRejectsClickHouseForMainDatabase
(t *testing.T)
model/clickhouse_log_test.go:51
FunctionTestClassifyRelayOutcome
(t *testing.T)
pkg/perf_metrics/metrics_test.go:20
FunctionTestClaudeCacheCreationFlatFieldsStillSettleWhenSnapshotNeverHadSubObject
(t *testing.T)
relaykit/dto/usage_merge_test.go:192
FunctionTestClaudeCacheCreationSubObjectZeroDoesNotReviveFlatLegacyFields
(t *testing.T)
relaykit/dto/usage_merge_test.go:167
FunctionTestClaudeCacheOnlyUsageRemainsBillable
(t *testing.T)
service/text_quota_test.go:1456
FunctionTestClaudeDefaultMaxTokensPresence
(t *testing.T)
relaykit/relayconvert/claude_default_max_tokens_test.go:18
FunctionTestClaudeManualThinkingBoundsAreCoerced
(t *testing.T)
relaykit/relayconvert/claude_default_max_tokens_test.go:210
FunctionTestClaudeMessagesRequestToOpenAIChatKeepsParallelToolResultsContiguous
(t *testing.T)
relaykit/relayconvert/internal/claude_messages/to_oai_chat_req_test.go:112
FunctionTestClaudeMessagesRequestToOpenAIChatToolResultContent
(t *testing.T)
relaykit/relayconvert/internal/claude_messages/to_oai_chat_req_test.go:14
FunctionTestClaudeMessagesToOpenAIChatKeepsToolOnlyContentEmpty
(t *testing.T)
relaykit/relayconvert/request_registry_test.go:60
FunctionTestClaudeMessagesToOpenAIChatPreservesAssistantTextWithToolCalls
(t *testing.T)
relaykit/relayconvert/request_registry_test.go:18
FunctionTestClaudeResponsePassesInputTransformationsThrough
(t *testing.T)
relay/channel/claude/relay_claude_test.go:481
FunctionTestClaudeSearchResultBlocksBillVendorSearch
On a channel whose upstream prices search itself (DeepSeek), each delivered web_search_tool_result bills one search under the vendor key, so a stream
relay/channel/claude/tool_billing_test.go:131
FunctionTestClaudeSettingsWriteHeadersDeduplicatesAcrossCommaSeparatedAndRepeatedValues
(t *testing.T)
setting/model_setting/claude_test.go:37
FunctionTestClaudeSettingsWriteHeadersMergesConfiguredValuesIntoSingleHeader
(t *testing.T)
setting/model_setting/claude_test.go:11
FunctionTestClaudeStreamFallbackCountsInterruptedToolUse
A stream cut off during an agent tool call must still estimate the call's output tokens when the final usage never arrives.
relay/channel/claude/relay_claude_test.go:283
FunctionTestClaudeStreamFinalUsageEstimatesOnlyUncountedUsage
(t *testing.T)
relay/channel/claude/relay_claude_test.go:27
FunctionTestClaudeTargetStatefulStreamTerminalTail
(t *testing.T)
relaykit/relayconvert/terminal_stream_test.go:106
FunctionTestClaudeThinkingAdapterSatisfiesMaxTokensWithoutCallback
The thinking adapter's max_tokens floor is an injection path of its own: a "-thinking" request without max_tokens must keep converting even when no De
relaykit/relayconvert/claude_default_max_tokens_test.go:108
FunctionTestClaude_BoundaryExact
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:136
FunctionTestClaude_LongContextTier
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:122
FunctionTestClaude_StandardTier
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:108
FunctionTestCleanupAuthArtifactsAlertsBeforeDeletingHourlyIssuance
(t *testing.T)
service/auth_session_test.go:213
FunctionTestCleanupAuthArtifactsContinuesWithRevokedCleanupAfterExpiredBatchFailure
(t *testing.T)
service/auth_session_test.go:303
FunctionTestCleanupAuthArtifactsRemovesOnlyExpiredRecords
(t *testing.T)
service/auth_session_test.go:261
FunctionTestClearChannelReadOnlyFields
(t *testing.T)
controller/channel_authz_test.go:99
FunctionTestClearCurrentChannelAffinityCache
(t *testing.T)
service/channel_affinity_template_test.go:264
FunctionTestClearTelegramBindingReleasesIdentityClaim
(t *testing.T)
model/external_identity_claim_test.go:46
FunctionTestClearUserAuthorizationRemovesOverrides
(t *testing.T)
service/authz/authz_test.go:197
FunctionTestClickHouseCreateTableHasTTL
(t *testing.T)
model/clickhouse_log_test.go:93
FunctionTestClickHouseLogCreateTableSQL
(t *testing.T)
model/clickhouse_log_test.go:80
FunctionTestClickHouseLogOrder
(t *testing.T)
model/clickhouse_log_test.go:99
FunctionTestClickHouseLogTTLClause
(t *testing.T)
model/clickhouse_log_test.go:75
FunctionTestClickHouseLogTTLExpression
(t *testing.T)
model/clickhouse_log_test.go:69
FunctionTestClientCancellationDuringUpstreamRead
(t *testing.T)
pkg/perf_metrics/metrics_test.go:85
FunctionTestCloneMetaDeepCopiesSupports
(t *testing.T)
pkg/jsplugin/protocol_supports_test.go:181
FunctionTestCloseChannelClosesRegisteredConnectionsOnce
(t *testing.T)
pkg/wsmanager/wsmanager_test.go:25
FunctionTestCloseChannelDoesNotCloseOtherChannels
(t *testing.T)
pkg/wsmanager/wsmanager_test.go:50
FunctionTestCloseIdleConnectionsRedialsHTTP2
(t *testing.T)
service/http_client_transport_test.go:541
FunctionTestCloudflareEmbeddingResponseCompatibility
(t *testing.T)
controller/channel_test_request_test.go:252
FunctionTestCollectPendingApplyUpstreamModelChanges
(t *testing.T)
controller/channel_upstream_update_test.go:482
FunctionTestCollectPendingUpstreamModelChangesFromModels_WithIgnoredRegexPatterns
(t *testing.T)
controller/channel_upstream_update_test.go:524
FunctionTestCollectPendingUpstreamModelChangesFromModels_WithModelMapping
(t *testing.T)
controller/channel_upstream_update_test.go:510
FunctionTestCommittedUserAuthVersionPermanentlyRejectsDelayedCacheFill
(t *testing.T)
model/user_cache_auth_version_test.go:177
FunctionTestCompileCache_SameResult
--------------------------------------------------------------------------- Compile Cache ------------------------------------------------------------
pkg/billingexpr/billingexpr_test.go:528
FunctionTestCompileError
--------------------------------------------------------------------------- Compile errors -----------------------------------------------------------
pkg/billingexpr/billingexpr_test.go:517
FunctionTestCompileIgnoresSourceMapDirectives
(t *testing.T)
pkg/jsplugin/engine_test.go:675
FunctionTestCompileInterruptsLongRunningInitialization
(t *testing.T)
pkg/jsplugin/engine_test.go:1268
FunctionTestCompileRejectsAsynchronousAndImportedPlugins
(t *testing.T)
pkg/jsplugin/engine_test.go:642
FunctionTestCompleteSubscriptionOrder_RejectsMismatchedPaymentProvider
(t *testing.T)
model/payment_method_guard_test.go:143
FunctionTestComposeTieredTextQuotaErrorFallbackUsesPreConsumedQuota
(t *testing.T)
service/text_quota_test.go:1181
FunctionTestComposeTieredTextQuotaFallbackKeepsToolCallSurcharges
(t *testing.T)
service/text_quota_test.go:1143
FunctionTestComposeTieredTextQuotaKeepsToolCallSurcharges
(t *testing.T)
service/text_quota_test.go:1088
FunctionTestComputeTieredQuotaWithRequest_ProbeAffectsQuota
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:850
FunctionTestComputeTieredQuota_Basic
--------------------------------------------------------------------------- Settlement ---------------------------------------------------------------
pkg/billingexpr/billingexpr_test.go:453
FunctionTestComputeTieredQuota_BasicSettlement
--------------------------------------------------------------------------- Settlement-level tests for ComputeTieredQuota ----------------------------
pkg/billingexpr/billingexpr_test.go:745
FunctionTestComputeTieredQuota_BoundaryTierCrossing
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:887
FunctionTestComputeTieredQuota_ClampOnOverflow
TestComputeTieredQuota_ClampOnOverflow guards the billing-safety invariant that an oversized tiered settlement clamps to the single-request max instea
pkg/billingexpr/settle_clamp_test.go:16
FunctionTestComputeTieredQuota_NoClampInRange
TestComputeTieredQuota_NoClampInRange confirms an in-range settlement leaves Clamp nil, so the audit path is a no-op in the common case.
pkg/billingexpr/settle_clamp_test.go:39
FunctionTestComputeTieredQuota_RoundingEdge
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:810
FunctionTestComputeTieredQuota_RoundingEdgeDown
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:830
FunctionTestComputeTieredQuota_SameTier
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:484
FunctionTestComputeTieredQuota_WithCache
--------------------------------------------------------------------------- Settlement with cache tokens ---------------------------------------------
pkg/billingexpr/billingexpr_test.go:676
FunctionTestComputeTieredQuota_WithCacheCrossTier
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:708
FunctionTestComputeTieredQuota_WithGroupRatio
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:771
FunctionTestComputeTieredQuota_ZeroTokens
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:791
FunctionTestConcurrentRejectionsRefreshOnce
(t *testing.T)
router/provider_plugin_relay_test.go:1058
FunctionTestConfigAddressRoutes
(t *testing.T)
pkg/jsplugin/channel_config_test.go:87
FunctionTestConfigSchemaContract
(t *testing.T)
pkg/jsplugin/registry_test.go:1323
FunctionTestConfigureTrustedProxiesAcceptsTrimmedIPsAndCIDRs
(t *testing.T)
middleware/trusted_proxies_test.go:88
FunctionTestConfigureTrustedProxiesDefaultRejectsPublicPeerHeaders
(t *testing.T)
middleware/trusted_proxies_test.go:58
FunctionTestConfigureTrustedProxiesDefaultStopsAtPublicClientInForwardedChain
(t *testing.T)
middleware/trusted_proxies_test.go:68
FunctionTestConfigureTrustedProxiesDefaultsToLoopbackAndPrivateNetworks
(t *testing.T)
middleware/trusted_proxies_test.go:32
FunctionTestConfigureTrustedProxiesNoneDisablesForwardedHeaders
(t *testing.T)
middleware/trusted_proxies_test.go:78
FunctionTestConfigureTrustedProxiesRejectsInvalidConfiguration
(t *testing.T)
middleware/trusted_proxies_test.go:107
FunctionTestConsumeAuthFlowWithActionRollsBackTogether
(t *testing.T)
model/auth_flow_test.go:84
FunctionTestContainerCPUSaturation
(t *testing.T)
common/system_monitor_test.go:29
FunctionTestContainerCPUSaturationFallsBackWithoutQuota
(t *testing.T)
common/system_monitor_test.go:90
FunctionTestContainerMemoryUsageFallsBackWhenUnavailable
(t *testing.T)
common/system_monitor_test.go:162
FunctionTestContainerMemoryUsageUsesWorkingSet
(t *testing.T)
common/system_monitor_test.go:110
FunctionTestContentModerationImagesAndDocuments
Images in the user message go to the moderation API one per request, an inline one as its data and a remote one by URL; documents go as text.
plugins/request_plugins_test.go:1379
FunctionTestContentModerationLongText
A text the size limit of one moderation request cannot carry goes in pieces, over as many requests as a hook may make; a longer one is rejected withou
plugins/request_plugins_test.go:846
FunctionTestContentModerationPlugin
(t *testing.T)
plugins/request_plugins_test.go:608
FunctionTestContentModerationReply
(t *testing.T)
plugins/request_plugins_test.go:804
FunctionTestContentModerationTaskSubmissions
(t *testing.T)
plugins/request_plugins_test.go:1096
← previousnext →12,101–12,200 of 15,409, ranked by callers