MCPcopy Create free account

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

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

FunctionTestBuildTieredTokenParams_ParityWithRatio_Image
(t *testing.T)
service/tiered_settle_test.go:876
FunctionTestBuildTieredTokenParams_UnpricedLongTTLCacheWrites
A long-lived cache write without its own price costs a fixed multiple of the short write price: 2x for OpenAI 12h, 6/3.75x for Claude 1h. The short pr
service/tiered_settle_test.go:981
FunctionTestBuildUpstreamModelUpdateTaskNotificationContent_OmitOverflowDetails
(t *testing.T)
controller/channel_upstream_update_test.go:536
FunctionTestBuiltInKlingResponsesNonStreamDecodesWithOfficialGoSDK
(t *testing.T)
controller/plugin_protocol_sdk_test.go:149
FunctionTestBuiltInKlingResponsesStreamDecodesWithOfficialGoSDK
(t *testing.T)
controller/plugin_protocol_sdk_test.go:177
FunctionTestBuiltInPluginRoutesAreServedBesideHostRoutes
(t *testing.T)
router/plugin_router_test.go:516
FunctionTestBuiltInPluginsAddressNewAPIUpstreamOnNativeRoutes
(t *testing.T)
plugins/builtin_plugins_test.go:272
FunctionTestBuiltInRequestPluginSamples
(t *testing.T)
plugins/request_plugins_test.go:978
FunctionTestBuiltInRequestPluginsExportTheirStageHooks
(t *testing.T)
plugins/builtin_plugins_test.go:213
FunctionTestBuiltInResponsesDecodersEchoChannelMappedAlias
(t *testing.T)
plugins/builtin_plugins_test.go:240
FunctionTestBuiltInTaskPluginResponsesAndUsageContracts
(t *testing.T)
plugins/builtin_plugins_test.go:152
FunctionTestBuiltInVendorPluginsDeclareNativeRoutesAndLegacyChannelTypes
(t *testing.T)
plugins/builtin_plugins_test.go:28
FunctionTestBumpSyncTopicAddsAPendingTask
Every bump adds its own pending task, none of them deduplicated against the active ones, so no write is lost.
service/node_sync_test.go:44
FunctionTestCASGuardedRefund_Lose
(t *testing.T)
service/task_billing_test.go:1299
FunctionTestCASGuardedRefund_Win
(t *testing.T)
service/task_billing_test.go:1261
FunctionTestCASGuardedSettle_Win
(t *testing.T)
service/task_billing_test.go:1336
FunctionTestCacheAbsent_ZeroCacheTokens
--------------------------------------------------------------------------- Cache variables: absent (all zero) — same expression still works ---------
pkg/billingexpr/billingexpr_test.go:608
FunctionTestCacheCreationInputTokensRoundTrip
(t *testing.T)
relaykit/dto/usage_merge_test.go:382
FunctionTestCacheGetRandomSatisfiedChannelUsesTokenAutoGroupsWhenGlobalAutoIsEmpty
(t *testing.T)
service/channel_select_auto_groups_test.go:92
FunctionTestCachePresent_LongContextTier
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:589
FunctionTestCachePresent_StandardTier
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:574
FunctionTestCacheUpdateChannelSyncsAdvancedCustomConfig
(t *testing.T)
model/pricing_endpoint_test.go:261
FunctionTestCacheWriteTTLDetailsSurviveUsageSnapshots
(t *testing.T)
relaykit/dto/billing_usage_test.go:79
FunctionTestCacheWriteTokensTotal
(t *testing.T)
service/text_quota_test.go:752
FunctionTestCalcOpenRouterCacheCreateTokensDoesNotWrap
(t *testing.T)
service/quota_saturation_test.go:58
FunctionTestCalcViolationFeeQuotaSaturates
(t *testing.T)
service/quota_saturation_test.go:50
FunctionTestCalculateTextQuotaSummaryBillsCacheCreationInputTokens
(t *testing.T)
service/text_quota_test.go:867
FunctionTestCalculateTextQuotaSummaryBillsOpenAICacheWriteTokens
(t *testing.T)
service/text_quota_test.go:811
FunctionTestCalculateTextQuotaSummaryDoesNotApplyRequestMultipliersToToolSurcharge
(t *testing.T)
service/text_quota_test.go:1490
FunctionTestCalculateTextQuotaSummaryFixedPriceAppliesImageCountOnceAndAllowsOverride
(t *testing.T)
service/text_quota_test.go:1273
FunctionTestCalculateTextQuotaSummaryHandlesLegacyClaudeDerivedOpenAIUsage
(t *testing.T)
service/text_quota_test.go:776
FunctionTestCalculateTextQuotaSummaryImageGenerationUsesStructuredSurcharge
(t *testing.T)
service/text_quota_test.go:1624
FunctionTestCalculateTextQuotaSummaryKeepsPrePRClaudeOpenRouterBilling
(t *testing.T)
service/text_quota_test.go:1049
FunctionTestCalculateTextQuotaSummaryNormalizesOpenAIResponsesBillingUsageDetails
(t *testing.T)
service/text_quota_test.go:660
FunctionTestCalculateTextQuotaSummarySeparatesOpenRouterCacheCreationFromPromptBilling
(t *testing.T)
service/text_quota_test.go:1014
FunctionTestCalculateTextQuotaSummarySeparatesOpenRouterCacheReadFromPromptBilling
(t *testing.T)
service/text_quota_test.go:977
FunctionTestCalculateTextQuotaSummaryUnifiedForClaudeSemantic
(t *testing.T)
service/text_quota_test.go:313
FunctionTestCalculateTextQuotaSummaryUsesAnthropicUsageSemanticFromUpstreamUsage
(t *testing.T)
service/text_quota_test.go:405
FunctionTestCalculateTextQuotaSummaryUsesClaudeBillingUsageBeforeTopLevelUsage
(t *testing.T)
service/text_quota_test.go:446
FunctionTestCalculateTextQuotaSummaryUsesGeminiBillingUsageBeforeTopLevelUsage
(t *testing.T)
service/text_quota_test.go:495
FunctionTestCalculateTextQuotaSummaryUsesOpenAIBillingUsageBeforeTopLevelUsage
(t *testing.T)
service/text_quota_test.go:537
FunctionTestCalculateTextQuotaSummaryUsesOpenAIResponsesInputTokenDetails
(t *testing.T)
service/text_quota_test.go:574
FunctionTestCalculateTextQuotaSummaryUsesSplitClaudeCacheCreationRatios
(t *testing.T)
service/text_quota_test.go:366
FunctionTestCalculateTextQuotaSummaryZeroTokensStillBillsToolSurcharge
A zero-token request (e.g. /v1/alpha/search returns no usage) must still bill a tool-call surcharge. Regression for the TotalTokens==0 gate zeroing ou
service/text_quota_test.go:1432
FunctionTestCalculateTextToolCallSurchargeClampsCallCount
Every BuiltInTools count is bounded by MaxBillableToolCallCount at settlement, whatever recorded it (upstream-reported counts and per-item counts alik
service/text_quota_test.go:1394
FunctionTestCalculateTextToolCallSurchargeDoesNotInferSearchForResponses
(t *testing.T)
service/text_quota_test.go:1370
FunctionTestCalculateTextToolCallSurchargeGeminiFunctionCall
(t *testing.T)
service/text_quota_test.go:1539
FunctionTestCalculateTextToolCallSurchargeGeminiGoogleSearch
(t *testing.T)
service/text_quota_test.go:1516
FunctionTestCalculateTextToolCallSurchargeGeneralizedBuiltInTools
(t *testing.T)
service/text_quota_test.go:1301
FunctionTestCalculateTextToolCallSurchargeImageGenerationDefaultPrice
(t *testing.T)
service/text_quota_test.go:1571
FunctionTestCalculateTextToolCallSurchargeImageGenerationExplicitZeroDisables
(t *testing.T)
service/text_quota_test.go:1601
FunctionTestCalculateTextToolCallSurchargeKeepsSearchPreviewFallbackWithCustomFunctions
(t *testing.T)
service/text_quota_test.go:1337
FunctionTestCallReplyPassesContextAndOutputs
(t *testing.T)
pkg/jsplugin/provider_test.go:1088
FunctionTestCallReplyResults
(t *testing.T)
pkg/jsplugin/provider_test.go:1105
FunctionTestCallTransformPassesContextAndRequest
(t *testing.T)
pkg/jsplugin/provider_test.go:1015
FunctionTestCallTransformResults
(t *testing.T)
pkg/jsplugin/provider_test.go:926
FunctionTestCanonicalBillingModelNames
(t *testing.T)
setting/reasoning/suffix_test.go:11
FunctionTestCanonicalGeminiUsageClampsNegativeCompletionFromTotalMinusPrompt
(t *testing.T)
relaykit/dto/billing_usage_test.go:124
FunctionTestCanonicalOpenAIUsageMergesInputTokenDetailsFieldwise
(t *testing.T)
relaykit/dto/billing_usage_test.go:133
FunctionTestCapRequestPluginRecordKeepsTheCount
A capped record keeps counting what a Realtime session already dropped.
relay/requestplugin/socket_test.go:462
FunctionTestCapabilitiesUseCatalogShape
(t *testing.T)
service/authz/authz_test.go:275
FunctionTestCeilFloor
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:393
FunctionTestChainedConverterWithNativeResponse
A chained route converts the client request with its registered converter before the hooks, which see a Claude Messages body here. A nativeResponse re
router/provider_plugin_relay_test.go:958
FunctionTestChannel
(c *gin.Context)
controller/channel-test.go:889
FunctionTestChannelAffinityHitCodexTemplatePassHeadersEffective
(t *testing.T)
service/channel_affinity_template_test.go:291
FunctionTestChannelAffinityRetryPriorities
(t *testing.T)
controller/channel_pin_retry_test.go:125
FunctionTestChannelConfigIsValidatedAndReadWithDefaults
(t *testing.T)
pkg/jsplugin/channel_config_test.go:20
FunctionTestChannelConfigSchemaRules
(t *testing.T)
pkg/jsplugin/channel_config_test.go:64
FunctionTestChannelDefaultBaseURLsRequireReadPermission
(t *testing.T)
router/channel_router_test.go:16
FunctionTestChannelDeleteRoutesUseSensitiveWritePermission
(t *testing.T)
router/channel_router_test.go:37
FunctionTestChannelFieldsAreClassified
TestChannelFieldsAreClassified guards the fail-closed sensitivity check: every JSON field of PatchChannel (including the embedded model.Channel) must
controller/channel_authz_test.go:167
FunctionTestChannelHasSensitiveChanges
(t *testing.T)
controller/channel_authz_test.go:18
FunctionTestChannelKeyShowsCredentialSummaries
(t *testing.T)
controller/provider_plugin_test.go:223
FunctionTestChannelMatchesExpectedTaskPluginRejectsUnindexedLegacyChannel
(t *testing.T)
middleware/distributor_test.go:130
FunctionTestChannelMatchesExpectedTaskPluginUsesGenericChannelSetting
(t *testing.T)
middleware/distributor_test.go:99
FunctionTestChannelMatchesExpectedTaskPluginUsesNewAPIExtensions
(t *testing.T)
middleware/distributor_test.go:429
FunctionTestChannelMatchesExpectedTaskPluginUsesPinnedLegacyIndex
(t *testing.T)
middleware/distributor_test.go:108
FunctionTestChannelNoticesFollowEachAdministratorsSwitch
Channel notices go to every enabled administrator whose channel switch is on, in that administrator's saved language. Until an administrator chooses,
service/user_notify_test.go:103
FunctionTestChannelOtherInfoWritesKeepConcurrentChanges
A writer of other_info writes back only while no other writer, on any node, changed it since the read; otherwise it reads again, so both changes are k
model/channel_status_test.go:88
FunctionTestChannelOtherSettingsValidateToolLossPolicy
(t *testing.T)
relaykit/dto/channel_settings_test.go:728
FunctionTestChannelOwnerNameUsesAdaptorChannelName
(t *testing.T)
controller/model_owned_by_test.go:16
FunctionTestChannelPriorityDatabaseMatrix
(t *testing.T)
model/channel_priority_test.go:58
FunctionTestChannelPriorityPlan
(t *testing.T)
model/channel_priority_test.go:19
FunctionTestChannelSatisfiesFilters
(t *testing.T)
model/channel_constraint_test.go:180
FunctionTestChannelSettingsHTTPTransportJSONRoundTrip
(t *testing.T)
relaykit/dto/channel_settings_test.go:666
FunctionTestChannelSettingsValidateHTTPTransport
(t *testing.T)
relaykit/dto/channel_settings_test.go:705
FunctionTestChannelStatusRoutesRegisterWithoutConflict
(t *testing.T)
router/channel_router_test.go:53
FunctionTestChannelStatusRoutesUseExpectedPermissions
(t *testing.T)
router/channel_router_test.go:27
FunctionTestChannelStatusValidation
(t *testing.T)
controller/channel_authz_test.go:154
FunctionTestChannelTLSInsecureSkipVerifyAcceptsUntrustedUpstream
(t *testing.T)
service/http_client_transport_test.go:321
FunctionTestChannelTestOpenAIChatCompatibility
(t *testing.T)
controller/channel_test_request_test.go:78
FunctionTestChannelValidateSettingsRejectsInvalidHTTPTransport
(t *testing.T)
model/channel_settings_test.go:21
FunctionTestChatCompletionsRequestToResponsesRequestImageDetail
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_req_test.go:43
FunctionTestChatCompletionsRequestToResponsesRequestInstructionsAndTools
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_req_test.go:16
FunctionTestChatCompletionsRequestToResponsesRequestPreservesPenalties
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_req_test.go:151
FunctionTestChatCompletionsRequestToResponsesRequestPreservesPromptCacheKey
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_req_test.go:74
FunctionTestChatCompletionsRequestToResponsesRequestPreservesQwenThinkingBudget
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_req_test.go:106
FunctionTestChatCompletionsRequestToResponsesRequestRejectsMultipleChoices
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_req_test.go:142
FunctionTestChatCompletionsResponseToResponsesDropsEmptyNameToolCalls
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp_test.go:46
FunctionTestChatCompletionsResponseToResponsesEmitsReasoningSummaryBeforeText
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp_test.go:104
← previousnext →12,001–12,100 of 15,409, ranked by callers