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
Function
TestProcessHeaderOverride_PassHeadersTemplateSetsRuntimeHeaders
(t *testing.T)
relay/channel/api_request_test.go:156
Function
TestProcessHeaderOverride_PassthroughSkipsAcceptEncoding
(t *testing.T)
relay/channel/api_request_test.go:129
Function
TestProcessHeaderOverride_RuntimeOverrideIsFinalHeaderMap
(t *testing.T)
relay/channel/api_request_test.go:98
Function
TestProductionPluginNativeQueryTraversesInnerRouter
(t *testing.T)
router/plugin_router_test.go:871
Function
TestProductionPluginRoutePipelineRequiresTokenAuth
(t *testing.T)
router/plugin_router_test.go:858
Function
TestProjectedTaskArtifactValidationRejectsAmbiguousIdentity
(t *testing.T)
controller/task_generic_test.go:492
Function
TestProtectedFetchDialerAllowsPrivateIPWhenWhitelisted
(t *testing.T)
service/protected_fetch_client_test.go:148
Function
TestProtectedFetchDialerDialsWhenAllResolvedIPsAllowed
(t *testing.T)
service/protected_fetch_client_test.go:120
Function
TestProtectedFetchDialerRejectsMixedResolvedIPs
(t *testing.T)
service/protected_fetch_client_test.go:91
Function
TestProtectedFetchDialerRejectsPrivateReboundAddress
(t *testing.T)
service/protected_fetch_client_test.go:67
Function
TestProtectedFetchDialerSkipsResolvedIPCheckWhenDisabled
(t *testing.T)
service/protected_fetch_client_test.go:174
Function
TestProtectedFetchRoundTripperNoProxyUsesProtectedDialer
(t *testing.T)
service/protected_fetch_client_test.go:275
Function
TestProtectedFetchRoundTripperRejectsPrivateTargetBeforeProxy
(t *testing.T)
service/protected_fetch_client_test.go:245
Function
TestProtectedFetchRoundTripperReusesTransportPerProxy
(t *testing.T)
service/protected_fetch_client_test.go:304
Function
TestProtectedFetchRoundTripperUsesConfiguredProxy
(t *testing.T)
service/protected_fetch_client_test.go:216
Function
TestProtocolClaimDecodeAndValidation
(t *testing.T)
pkg/jsplugin/routing_test.go:258
Function
TestProtocolClaimMarshalEmitsSupportsInTableOrder
(t *testing.T)
pkg/jsplugin/protocol_supports_test.go:217
Function
TestProtocolHookInspectionIsDeadlineBounded
(t *testing.T)
pkg/jsplugin/routing_test.go:1049
Function
TestProtocolSupportsHappyPaths
(t *testing.T)
pkg/jsplugin/protocol_supports_test.go:118
Function
TestProtocolSupportsLoadErrors
(t *testing.T)
pkg/jsplugin/protocol_supports_test.go:37
Function
TestProviderChannelManagementDatabaseMatrix
TestProviderChannelManagementDatabaseMatrix runs the channel writes and queries the provider part adds on every configured database: set TEST_MYSQL_DS
controller/provider_plugin_test.go:579
Function
TestProviderChannelSelectionFollowsRelayRoutes
(t *testing.T)
model/channel_plugin_credential_test.go:146
Function
TestProviderChannelServesOnlyItsRoutes
(t *testing.T)
router/provider_plugin_relay_test.go:338
Function
TestProxyTaskMediaAllowsOnlyCredentiallessCrossOriginRedirect
(t *testing.T)
controller/task_generic_test.go:727
Function
TestProxyTaskMediaForwardsRangeAndFiltersResponseHeaders
(t *testing.T)
controller/task_generic_test.go:513
Function
TestProxyTaskMediaPassesThroughUnsatisfiedRange
(t *testing.T)
controller/task_generic_test.go:560
Function
TestProxyTaskMediaReadsArtifactFromJSONContentPath
A descriptor with a content path reads the artifact out of a long-running operation the upstream returns again, as Vertex does for inline video.
controller/task_generic_test.go:617
Function
TestPublicRecord
(t *testing.T)
relay/requestplugin/requestplugin_test.go:555
Function
TestPublicRecordCaps
(t *testing.T)
relay/requestplugin/requestplugin_test.go:591
Function
TestPublishCloseChannelsNoopsWhenRedisDisabled
(t *testing.T)
pkg/wsmanager/wsmanager_test.go:100
Function
TestQueryBalanceURLNeedsAnAllowedHost
A balance request's url must be on the channel base URL host or a host of meta.allowedHosts, as the credential goes with it.
relay/channel/providerplugin/management_test.go:136
Function
TestQuotaFromDecimal
TestQuotaFromDecimal checks the decimal entry point rounds and saturates consistently with the float variants.
common/quota_math_test.go:47
Function
TestQuotaFromDecimalChecked
TestQuotaFromDecimalChecked verifies the decimal entry point reports clamps.
common/quota_math_test.go:118
Function
TestQuotaFromFloat
TestQuotaFromFloat guards the billing invariant that oversized quota products (e.g. price multiplied by a huge user-supplied count) saturate instead o
common/quota_math_test.go:21
Function
TestQuotaFromFloatChecked
TestQuotaFromFloatChecked verifies the clamp descriptor is nil in range and carries the correct kind/clamped value on saturation, so billing callers c
common/quota_math_test.go:57
Function
TestQuotaFromFloatStrictReturnsTypedClampError
(t *testing.T)
common/quota_math_test.go:85
Function
TestQuotaReminderFiresOncePerDrop
A low-balance reminder goes out once, on the charge that takes a wallet or subscription balance below the threshold. A balance already below it earns
service/user_notify_test.go:30
Function
TestQuotaRound
--------------------------------------------------------------------------- Rounding -----------------------------------------------------------------
pkg/billingexpr/billingexpr_test.go:422
Function
TestQuotaRound
TestQuotaRound checks half-away-from-zero rounding with the same saturation policy.
common/quota_math_test.go:35
Function
TestQuotaRoundChecked
TestQuotaRoundChecked verifies the rounding entry point reports clamps the same way.
common/quota_math_test.go:104
Function
TestRatioConfigExportsEffectiveExpressions
(t *testing.T)
controller/ratio_sync_test.go:47
Function
TestRealtimeClientEvents
The client's text events run the ingress instances on a Responses-shaped view and get their changes; a rejection answers with an error event and drops
relay/requestplugin/socket_test.go:99
Function
TestRealtimeFetchAppliesChannelHeaderOverrides
(t *testing.T)
relay/relay_task_test.go:56
Function
TestRealtimeFetchRefundsTaskItFindsFailed
(t *testing.T)
relay/relay_task_test.go:88
Function
TestRealtimeReplyMasksText
Text deltas go through the reply check: a mask rewrites the text the client gets, response.done included.
relay/requestplugin/socket_test.go:180
Function
TestRealtimeReplyStops
A stop sends the client an error event and the upstream a response.cancel; the rest of the response is dropped and its response.done shows what the cl
relay/requestplugin/socket_test.go:220
Function
TestRealtimeReport
Report runs once per response.done, with the events the client got, leaving out audio, and the quota the response was charged.
relay/requestplugin/socket_test.go:285
Function
TestRealtimeUnusedIsFree
A session no instance matches gets no plugin state; one whose instances do not check replies or report passes every server event untouched.
relay/requestplugin/socket_test.go:164
Function
TestReasoningEffortOverrideIsAuditedWithoutDebugMode
(t *testing.T)
relay/common/override_test.go:2773
Function
TestRebuildToolPriceIndexIgnoresInvalidDirectValues
(t *testing.T)
setting/operation_setting/tools_price_test.go:169
Function
TestRecalcQuotaFromRatiosIgnoresInvalidMultipliers
(t *testing.T)
relay/chat_completions_via_responses_test.go:97
Function
TestRecalcQuotaFromRatiosRejectsAllInvalidAdjustedRatios
(t *testing.T)
relay/chat_completions_via_responses_test.go:118
Function
TestRecalculate_ActualQuotaZero
(t *testing.T)
service/task_billing_test.go:1131
Function
TestRecalculate_NegativeDelta
(t *testing.T)
service/task_billing_test.go:1072
Function
TestRecalculate_PositiveDelta
=========================================================================== RecalculateTaskQuota tests ===============================================
service/task_billing_test.go:1033
Function
TestRecalculate_RejectsNegativeActualQuota
(t *testing.T)
service/task_billing_test.go:1153
Function
TestRecalculate_Subscription_NegativeDelta
(t *testing.T)
service/task_billing_test.go:1169
Function
TestRecalculate_ZeroDelta
(t *testing.T)
service/task_billing_test.go:1111
Function
TestRecentHistoryRejectsOversizedModelLists
(t *testing.T)
pkg/perf_metrics/metrics_test.go:114
Function
TestRechargeEpayCreditsQuotaExactlyOnce
(t *testing.T)
model/payment_method_guard_test.go:193
Function
TestRechargeEpayEnforcesFinalWalletQuotaLimit
(t *testing.T)
model/payment_method_guard_test.go:312
Function
TestRechargeEpayKeepsRedisAndDatabaseCreditInSync
(t *testing.T)
model/payment_method_guard_test.go:219
Function
TestRechargeEpayRejectsForeignAndNonPendingOrders
(t *testing.T)
model/payment_method_guard_test.go:267
Function
TestRechargeEpayRejectsQuotaOverflowBeforeCompletingOrder
(t *testing.T)
model/payment_method_guard_test.go:296
Function
TestRechargeEpayUpdatesPaymentMethodToActual
(t *testing.T)
model/payment_method_guard_test.go:247
Function
TestRechargeWaffoPancake_RejectsMismatchedPaymentMethod
(t *testing.T)
model/payment_method_guard_test.go:91
Function
TestRecordImmediateTaskResultSamplesSuccessOnly
Immediate submit results: only successes are sampled, timed from relay start.
pkg/perf_metrics/metrics_test.go:154
Function
TestRecordTaskResultSamplesTerminalTasks
Terminal task sampling: success/failure counts, end-to-end latency, and token throughput only for successful tasks that report tokens.
pkg/perf_metrics/metrics_test.go:121
Function
TestRedactTaskArtifactAccessAlsoCoversLegacyVideoRoute
(t *testing.T)
middleware/task_artifact_access_test.go:113
Function
TestRedactVideoResponseBodyDropsInteractionInlineVideo
(t *testing.T)
service/task_polling_test.go:176
Function
TestRedactVideoResponseBodyKeepsUntouchedBytes
(t *testing.T)
service/task_polling_test.go:186
Function
TestRedactVideoResponseBodyPreservesPollingPayloadShape
(t *testing.T)
service/task_polling_test.go:139
Function
TestRedeemConcurrentSingleSuccess
Exactly one of several concurrent redeems of the same code may win, and quota must be credited exactly once.
model/redemption_test.go:182
Function
TestRedeemCreditsQuotaExactlyOnce
(t *testing.T)
model/redemption_test.go:128
Function
TestRedeemRejectsWalletOverflow
(t *testing.T)
model/redemption_test.go:151
Function
TestRedemptionQuotaRejectsWalletOverflow
(t *testing.T)
model/redemption_test.go:167
Function
TestRedisBatchReserveNeverFallsBackToStaleDatabaseBalance
(t *testing.T)
model/quota_reserve_test.go:106
Function
TestRedisChannelCloseEventsStayWithinDatabase
(t *testing.T)
pkg/wsmanager/wsmanager_test.go:115
Function
TestRedisEmailVerificationRateLimiterPreservesResponseAndTTL
(t *testing.T)
middleware/rate_limit_test.go:99
Function
TestRedisFailurePolicies
(t *testing.T)
middleware/rate_limit_test.go:201
Function
TestRedisFixedWindowIsAtomicUnderConcurrency
(t *testing.T)
middleware/rate_limit_test.go:121
Function
TestRedisFixedWindowRepairsCounterWithoutTTL
(t *testing.T)
middleware/rate_limit_test.go:184
Function
TestRedisFixedWindowResetsAtBoundary
(t *testing.T)
middleware/rate_limit_test.go:160
Function
TestRedisIPRateLimiterThresholdTTLAndNamespace
(t *testing.T)
middleware/rate_limit_test.go:51
Function
TestRedisUserRateLimiterUsesSharedFixedWindow
(t *testing.T)
middleware/rate_limit_test.go:79
Function
TestReencodeWebPCanvasMatchesFrame
A WebP image re-encodes only when the canvas size its VP8X chunk declares is the size of its frame: the decoder decodes the frame whatever the canvas
relay/requestplugin/attachments_test.go:349
Function
TestRefreshConcurrentRequestsMakeOnePluginCall
(t *testing.T)
service/provider_plugin_test.go:330
Function
TestRefreshFailuresKeepTheCredential
(t *testing.T)
service/provider_plugin_test.go:490
Function
TestRefreshMergesItsResult
(t *testing.T)
service/provider_plugin_test.go:467
Function
TestRefreshPluginCallHoldsNoChannelLock
The plugin call holds no channel lock: an edit of the channel made while it runs goes through at once, and a result for a line the edit replaced is di
service/provider_plugin_test.go:393
Function
TestRefreshReloginDisablesAndNotifies
A credential only a new login restores disables its key whether or not channels are disabled automatically on errors.
service/provider_plugin_test.go:556
Function
TestRefreshRemovedCredential
(t *testing.T)
service/provider_plugin_test.go:513
Function
TestRefreshResults
(t *testing.T)
pkg/jsplugin/provider_test.go:358
Function
TestRefreshRotatedTokenIsNeverSentAgain
(t *testing.T)
service/provider_plugin_test.go:433
Function
TestRefreshTwoNodesMakeOnePluginCall
Two refreshers stand for two nodes: their single-flight groups do not see each other, so only the channel's refresh lock keeps the token from being se
service/provider_plugin_test.go:361
Function
TestRefreshUserGroupCacheRepairsDelayedSameVersionWrite
(t *testing.T)
model/user_cache_auth_version_test.go:127
Function
TestRefundMidjourneyQuotaUsesLegacyChannelFallbackWithoutTokenAdjustment
(t *testing.T)
service/task_billing_test.go:842
Function
TestRefundTaskQuota_FundingFailureKeepsAccountingAndPendingMarker
(t *testing.T)
service/task_billing_test.go:1006
Function
TestRefundTaskQuota_NoToken
(t *testing.T)
service/task_billing_test.go:976
Function
TestRefundTaskQuota_Subscription
(t *testing.T)
service/task_billing_test.go:921
← previous
next →
13,201–13,300 of 15,409, ranked by callers