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
TestPluginProtocolObservationLimiterReleaseIsIdempotent
(t *testing.T)
controller/plugin_protocol_limiter_test.go:135
Function
TestPluginProtocolObservationLimiterRollsBackFailedAdmission
(t *testing.T)
controller/plugin_protocol_limiter_test.go:93
Function
TestPluginRequestPinsGenerationAcrossHotSwap
(t *testing.T)
router/plugin_router_test.go:279
Function
TestPluginResponsesMachineEnforcesCumulativeOutputLimit
(t *testing.T)
relay/plugin_protocol_test.go:503
Function
TestPluginResponsesMachineFinalFromEvents
(t *testing.T)
relay/plugin_protocol_test.go:523
Function
TestPluginResponsesMachineNonStreamShapes
(t *testing.T)
relay/plugin_protocol_test.go:311
Function
TestPluginResponsesMachineOwnsIDsSequenceAndLifecycle
(t *testing.T)
relay/plugin_protocol_test.go:163
Function
TestPluginResponsesMachinePendingResponse
(t *testing.T)
relay/plugin_protocol_test.go:431
Function
TestPluginResponsesMachineProgressDoesNotRepeatAccumulatedOutput
(t *testing.T)
relay/plugin_protocol_test.go:478
Function
TestPluginResponsesMachineSanitizesFailure
(t *testing.T)
relay/plugin_protocol_test.go:255
Function
TestPluginResponsesMachineUsesVerbatimStringOutput
(t *testing.T)
relay/plugin_protocol_test.go:237
Function
TestPluginRouteCanCutOffItsClientStream
A plugin route reaches the client connection through the gated writer: a relayed stream that stopped early cuts it off, and the client sees the stream
router/plugin_router_test.go:208
Function
TestPluginRouteOwnershipCanSwapWithinOneGeneration
(t *testing.T)
router/plugin_router_test.go:603
Function
TestPluginRouteRecoverySanitizesPanicResponse
(t *testing.T)
router/plugin_router_test.go:831
Function
TestPluginSSEFlushesWithoutFallbackBuffering
(t *testing.T)
router/plugin_router_test.go:174
Function
TestPluginStaticRouteConflictsAreExcluded
A host route, or the trailing-slash redirect it causes, shadows only the top-level route of a built-in plugin; the /{key} copy still serves it.
router/plugin_router_test.go:359
Function
TestPluginStreamErrors
(t *testing.T)
router/provider_plugin_relay_test.go:1191
Function
TestPluginTaskPricesBesideAChatPrice
A model-level price that is only a chat price leaves plugin tasks unpriced: an expression reading chat request quantities (token counts, bare image_co
model/pricing_usage_schema_test.go:321
Function
TestPluginTrailingSlashMissDoesNotRedirect
(t *testing.T)
router/plugin_router_test.go:142
Function
TestPluginWithoutTaskPartRejectsTaskFields
(t *testing.T)
pkg/jsplugin/provider_test.go:81
Function
TestPollingPassesExecutingChannelTypeToAdaptor
(t *testing.T)
service/task_polling_test.go:257
Function
TestPooledRuntimeKeepsNoCallData
(t *testing.T)
pkg/jsplugin/engine_test.go:786
Function
TestPositionalWildcardsKeepDeclaredParameterNames
The inner router names wildcards by position, so routes may name the same position differently; each reads its own parameter names.
router/plugin_router_test.go:678
Function
TestPostTextConsumeQuotaBillsOpenAI12hCacheWrites
OpenAI 12h cache writes bill at twice the write price and keep their own count in the consume log, with ratio and expression pricing alike.
service/text_quota_test.go:923
Function
TestPostTextConsumeQuotaLogsMissingUsageAsStructuredContent
A request whose upstream returns no usage is logged without a charge. The reason is stored as content_parts, which the web console renders in the view
service/text_quota_test.go:1679
Function
TestPreConsumeBillingRejectsNegativeQuotaBeforeDeduction
(t *testing.T)
service/quota_saturation_test.go:129
Function
TestPreConsumeBillingRejectsSaturatedQuotaBeforeDeduction
(t *testing.T)
service/quota_saturation_test.go:105
Function
TestPreConsumeMultiplierRejectsInvalidRuntimeAndOverflow
(t *testing.T)
controller/billing_option_test.go:308
Function
TestPreConsumePolicyDatabaseMatrix
Covers configuration persistence, validation, reservation and reconciliation through the same public entry points used by the relay.
controller/billing_option_test.go:193
Function
TestPreflightRoutingConflict
(t *testing.T)
pkg/jsplugin/routing_test.go:203
Function
TestPrepareMidjourneyTaskBillingKeepsUnbilledMarkerClear
=========================================================================== Legacy Midjourney billing tests ==========================================
service/task_billing_test.go:597
Function
TestPrepareMidjourneyTaskBillingRejectsSubscriptionBeforeCharge
(t *testing.T)
service/task_billing_test.go:829
Function
TestPrepareRequest
(t *testing.T)
router/provider_plugin_relay_test.go:656
Function
TestPrepareRequestKeepsReformattedBillingFields
(t *testing.T)
router/provider_plugin_relay_test.go:735
Function
TestPrepareRequestOverTheBodyLimit
Effects that grow the body past the request body limit fail the request as a client body over the limit does: 413, nothing sent, nothing billed.
router/provider_plugin_relay_test.go:712
Function
TestPrepareRequestReachesTheOverriddenBody
(t *testing.T)
router/provider_plugin_relay_test.go:753
Function
TestPrepareRequestReturnsEffectsAsText
(t *testing.T)
pkg/jsplugin/provider_test.go:511
Function
TestPrepareResponsesRequestDeepSeekEffectiveReasoning
(t *testing.T)
relay/responses_request_test.go:27
Function
TestPrepareResponsesRequestEgressReadsTheFinalizedBody
(t *testing.T)
relay/responses_request_test.go:111
Function
TestPrepareResponsesRequestRetainsConvertedAdaptor
(t *testing.T)
relay/chat_completions_via_responses_test.go:25
Function
TestPrepareTaskPluginDynamicDecoderRejectsRendererField
(t *testing.T)
middleware/task_plugin_test.go:1339
Function
TestPrepareTaskPluginDynamicQueryPreservesOrderAndSkipsNextHandlers
(t *testing.T)
middleware/task_plugin_test.go:1265
Function
TestPrepareTaskPluginEndpointAcceptsRegisteredVideoMultipartBody
(t *testing.T)
middleware/task_plugin_test.go:1089
Function
TestPrepareTaskPluginEndpointClientDisconnectDoesNotCancelParseHook
(t *testing.T)
middleware/task_plugin_test.go:696
Function
TestPrepareTaskPluginEndpointExposesIndexedRefsForRepeatedImageFiles
The OpenAI Images edits endpoint accepts multipart uploads. Every file of a repeated image[] field is exposed to the decoder with its own ref, and an
middleware/task_plugin_test.go:1137
Function
TestPrepareTaskPluginEndpointFiltersEachSharedCandidate
(t *testing.T)
middleware/task_plugin_test.go:2052
Function
TestPrepareTaskPluginEndpointPinsGenerationBeforeParseAndDistribution
(t *testing.T)
middleware/task_plugin_test.go:627
Function
TestPrepareTaskPluginEndpointPinsOriginTaskChannel
(t *testing.T)
middleware/task_plugin_origin_task_test.go:295
Function
TestPrepareTaskPluginEndpointRejectsModelDriftBeforeDistribution
(t *testing.T)
middleware/task_plugin_test.go:1047
Function
TestPrepareTaskPluginEndpointRejectsUnknownOriginTask
(t *testing.T)
middleware/task_plugin_origin_task_test.go:330
Function
TestPrepareTaskPluginEndpointSurfacesDecodeHookMessage
(t *testing.T)
middleware/task_plugin_test.go:1734
Function
TestPrepareTaskPluginEndpointUsesStrictOriginalStreamFlag
(t *testing.T)
middleware/task_plugin_test.go:740
Function
TestPrepareTaskPluginNativeRoutePassesMultipartToDecoder
(t *testing.T)
middleware/task_plugin_test.go:190
Function
TestPrepareTaskPluginRouteAnswersSharedQueriesByTaskOwner
A query on a path several plugins declare is answered by the task's own plugin; a task none of them owns is as unknown as a missing one.
middleware/task_plugin_test.go:2525
Function
TestPrepareTaskPluginRouteDecodesEverySharedSubmitCandidate
Every plugin declaring a submit path decodes the request; those accepting the first acceptor's model stay candidates for distribution, and /{key} keep
middleware/task_plugin_test.go:2431
Function
TestPrepareTaskPluginRouteGivesQueryPresentersArtifacts
A query presenter receives the artifacts of a finished task as the gateway addresses Responses renderers get; a presenter with nothing to deliver for
middleware/task_plugin_test.go:2588
Function
TestPrepareTaskPluginRouteKeepsRawBinaryOpaque
(t *testing.T)
middleware/task_plugin_test.go:1235
Function
TestPrepareTaskPluginRouteMatchesChannelAliases
A case variant or a channel alias of a declared model is matched on a native path as on the host protocols: the task takes the declared spelling or ke
middleware/task_plugin_test.go:2465
Function
TestPrepareTaskPluginRouteModelScope
(t *testing.T)
middleware/task_plugin_test.go:264
Function
TestPrepareTaskPluginRouteNativeErrorReceivesHookMessage
(t *testing.T)
middleware/task_plugin_test.go:1603
Function
TestPrepareTaskPluginRoutePinsOriginTaskChannel
(t *testing.T)
middleware/task_plugin_origin_task_test.go:223
Function
TestPrepareTaskPluginRouteReadsQueryStringTaskID
A query route whose taskIdParam is not a path parameter reads the task id from the query string, as MiniMax's v1 query does.
middleware/task_plugin_test.go:2566
Function
TestPrepareTaskPluginRouteRejectsNonObjectResultWithFixedMessage
(t *testing.T)
middleware/task_plugin_test.go:1639
Function
TestPrepareTaskPluginRouteRejectsResolvedModelOutsideRouteScope
(t *testing.T)
middleware/task_plugin_test.go:321
Function
TestPrepareTaskPluginRouteRejectsUnknownOriginTask
(t *testing.T)
middleware/task_plugin_origin_task_test.go:263
Function
TestPrepareTaskPluginRouteSurfacesDecodeHookMessage
(t *testing.T)
middleware/task_plugin_test.go:1572
Function
TestPrepareTaskPluginRouteSurfacesRequestDecodeDetail
(t *testing.T)
middleware/task_plugin_test.go:1670
Function
TestPrepareTaskPluginRouteUsesCanonicalContextAndResolvedSubmit
(t *testing.T)
middleware/task_plugin_test.go:58
Function
TestPrepareTaskPluginRouteWithoutModelScopeIsUnrestricted
(t *testing.T)
middleware/task_plugin_test.go:354
Function
TestPrepareTaskPluginStaticQueryHidesTaskExistenceAndSanitizesErrors
(t *testing.T)
middleware/task_plugin_test.go:1377
Function
TestPrepareTaskPluginSubmitDecoderRejectsRendererField
(t *testing.T)
middleware/task_plugin_test.go:1358
Function
TestPrepareTaskPluginSubmitRejectsMissingModel
(t *testing.T)
middleware/task_plugin_test.go:44
Function
TestPrepareTieredBillingForSelectedGroupPaidToFreeKeepsFreeModelFalse
(t *testing.T)
service/tiered_settle_test.go:418
Function
TestPrepareTieredBillingForSelectedGroupStartsBillingAfterFreeGroup
(t *testing.T)
service/tiered_settle_test.go:375
Function
TestPrepareTieredBillingForSelectedGroupTopUpArrearsAllowsNegativeBalance
(t *testing.T)
service/tiered_settle_test.go:447
Function
TestPrepareTieredBillingForSelectedGroupUpdatesReservation
(t *testing.T)
service/tiered_settle_test.go:347
Function
TestPresentTaskSubmissionFallbackUsesPersistedPublicID
(t *testing.T)
controller/relay_task_plugin_test.go:124
Function
TestPresentTaskSubmissionHonorsReplyWrapperAndRelayedStreams
The submit presenter may answer with the vendor's status; a native route that already relayed the vendor's event stream gets nothing more.
controller/relay_task_plugin_test.go:96
Function
TestPresentTaskSubmissionUsesHostOpenAIVideoCreateReceipt
(t *testing.T)
controller/relay_task_plugin_test.go:144
Function
TestPresentTaskSubmissionUsesNativePresenterAfterPersistence
(t *testing.T)
controller/relay_task_plugin_test.go:63
Function
TestPriceDataOtherRatiosFilterAndSnapshot
(t *testing.T)
service/task_billing_test.go:171
Function
TestPriceDataReplaceAndApplyOtherRatios
(t *testing.T)
service/task_billing_test.go:195
Function
TestPricingAdvancedCustomMissingConfigFallsBackToChannelType
(t *testing.T)
model/pricing_endpoint_test.go:165
Function
TestPricingAdvancedCustomUsesConfiguredEndpointTypes
(t *testing.T)
model/pricing_endpoint_test.go:81
Function
TestPricingAliasCarriesPluginUsageSchemaAndTailExpr
(t *testing.T)
model/pricing_usage_schema_test.go:71
Function
TestPricingCarriesTaskUsageSchemaAndRefreshesWithPluginGeneration
(t *testing.T)
model/pricing_usage_schema_test.go:34
Function
TestPricingConversionOfProviderChannelModels
(t *testing.T)
model/channel_plugin_credential_test.go:222
Function
TestPricingModelMetadataEndpointsCanProvideEndpointWithoutChannelInference
(t *testing.T)
model/pricing_endpoint_test.go:139
Function
TestPricingModelMetadataEndpointsMergeWithAdvancedCustomInference
(t *testing.T)
model/pricing_endpoint_test.go:110
Function
TestPricingNativeChannelEndpointTypesUnchanged
(t *testing.T)
model/pricing_endpoint_test.go:176
Function
TestPricingProviderChannelUsesRelayRoutes
(t *testing.T)
model/channel_plugin_credential_test.go:194
Function
TestPricingSharedPluginVariantsUseEachSchemaAndExpression
(t *testing.T)
model/pricing_usage_schema_test.go:238
Function
TestPricingSyncCompleteSourcesAndArrayFormats
(t *testing.T)
controller/ratio_sync_test.go:70
Function
TestPricingSyncExpressionPriority
(t *testing.T)
controller/ratio_sync_test.go:18
Function
TestPricingUsageProfilesAndAliases
(t *testing.T)
model/pricing_usage_schema_test.go:148
Function
TestProcessChannelErrorMasksDisableReasonAndNotification
(t *testing.T)
service/relay_error_test.go:60
Function
TestProcessChannelErrorUsesSnapshotWithoutLeakingChannelMetadata
(t *testing.T)
controller/relay_error_log_test.go:22
Function
TestProcessHeaderOverride_ChannelTestSkipsClientHeaderPlaceholder
(t *testing.T)
relay/channel/api_request_test.go:51
Function
TestProcessHeaderOverride_ChannelTestSkipsPassthroughRules
(t *testing.T)
relay/channel/api_request_test.go:28
Function
TestProcessHeaderOverride_NonTestKeepsClientHeaderPlaceholder
(t *testing.T)
relay/channel/api_request_test.go:75
← previous
next →
13,101–13,200 of 15,409, ranked by callers