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
TestAdaptorConvertsGeminiRequestToOpenAIChatUpstream
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:855
Function
TestAdaptorConvertsOpenAIChatRequestToClaudeUpstream
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:769
Function
TestAdaptorConvertsOpenAIChatRequestToGeminiUpstream
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:797
Function
TestAdaptorConvertsOpenAIChatRequestToResponsesUpstream
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:742
Function
TestAdaptorConvertsResponsesRequestToOpenAIChatUpstream
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:526
Function
TestAdaptorCrossProtocolChatUpstreamRequestsStreamUsage
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:890
Function
TestAdaptorInheritsNewAPIResponsesCompactSupport
(t *testing.T)
relay/channel/sub2api/adaptor_test.go:31
Function
TestAdaptorJoinsUpstreamPathWithChannelBaseURL
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:112
Function
TestAdaptorMasksDialedHostsInDialFailure
An absolute route sends the request to a host other than the channel base URL, and a channel proxy is dialed before the upstream; a failed handshake m
relay/channel/advancedcustom/adaptor_test.go:63
Function
TestAdaptorMatchesGeminiIncomingPathTemplate
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:303
Function
TestAdaptorReplacesModelPlaceholderInRouteURL
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:245
Function
TestAdaptorResponsesToGeminiAddsThoughtSignatureForFunctionCallHistory
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:681
Function
TestAdaptorResponsesToGeminiUsesResponsesBridge
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:625
Function
TestAdaptorReturnsErrorWhenNoRouteMatchesPath
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:227
Function
TestAdaptorReturnsErrorWhenUpstreamPathNeedsMissingBaseURL
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:142
Function
TestAdaptorSelectsDuplicateResponsesRoutesByModel
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:568
Function
TestAdaptorSetupRequestHeaderAddsClaudeDefaultHeaders
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:202
Function
TestAdaptorSetupRequestHeaderUsesConfiguredHeaderAuth
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:178
Function
TestAdaptorSetupRequestHeaderUsesDefaultBearerAuth
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:160
Function
TestAdaptorSwitchesGeminiGenerateContentURLForStream
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:273
Function
TestAdaptorUsesExactRouteAndQueryAuth
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:30
Function
TestAddChannelInvalidVertexBatchDoesNotReturnResults
(t *testing.T)
controller/channel_create_test.go:170
Function
TestAddChannelPanicRollsBackWithoutSuccess
(t *testing.T)
controller/channel_create_test.go:229
Function
TestAddChannelReturnsCreatedIDs
(t *testing.T)
controller/channel_create_test.go:54
Function
TestAddChannelRollbackDoesNotReturnIDs
(t *testing.T)
controller/channel_create_test.go:195
Function
TestAddChannelTaskPluginPersistsPluginDefaultBaseURLAndAuditsSource
(t *testing.T)
controller/channel_task_plugin_bind_test.go:133
Function
TestAddChannelTaskPluginRequiresBindPermission
(t *testing.T)
controller/channel_task_plugin_bind_test.go:59
Function
TestAddChannelWithoutKeyForALoginPlugin
(t *testing.T)
controller/provider_plugin_test.go:132
Function
TestAddTokenEmptyAutoGroupsInheritGlobalAuto
(t *testing.T)
controller/token_auto_groups_test.go:74
Function
TestAddTokenPersistsOrderedAutoGroupsSnapshot
(t *testing.T)
controller/token_auto_groups_test.go:112
Function
TestAddTokenRejectsInvalidAutoGroups
(t *testing.T)
controller/token_auto_groups_test.go:187
Function
TestAdjacentNodeGenerationsKeepPinnedPluginExecutable
(t *testing.T)
pkg/jsplugin/routing_test.go:511
Function
TestAdminResetPlanSubscriptionsNoMatchSucceeds
(t *testing.T)
model/subscription_reset_test.go:180
Function
TestAdminResetPlanSubscriptionsResetsAllActiveUsers
(t *testing.T)
model/subscription_reset_test.go:140
Function
TestAdminResetUserSubscriptionsByPlanKeepsResetTimes
(t *testing.T)
model/subscription_reset_test.go:89
Function
TestAdminResetUserSubscriptionsByPlanNoActiveMatchReturnsError
(t *testing.T)
model/subscription_reset_test.go:118
Function
TestAdminResetUserSubscriptionsByPlanResetsAllActiveMatchesAndAdvancesTime
(t *testing.T)
model/subscription_reset_test.go:29
Function
TestAdminUserBindingProofDistinguishesBuiltInAndCustomBindings
(t *testing.T)
controller/admin_user_verification_test.go:296
Function
TestAdminUserProofIsBoundToTargetAndActionAndConsumedOnce
(t *testing.T)
controller/admin_user_verification_test.go:240
Function
TestAdminUserRiskOperationsRequireProofBeforeMutation
(t *testing.T)
controller/admin_user_verification_test.go:53
Function
TestAdminUserRoutineEditsDoNotRequireProof
An administrator (not root) exercises the routine paths without touching the Casbin policy store, which the security fixture does not provision.
controller/admin_user_verification_test.go:194
Function
TestAdminUserVerificationPolicy
(t *testing.T)
controller/admin_user_verification_test.go:325
Function
TestAdvancedCustomChannelRequiresModelListRouteOnlyWhenUpdateChecksEnabled
(t *testing.T)
model/channel_settings_test.go:53
Function
TestAdvancedCustomMatchPathForModel
(t *testing.T)
relaykit/dto/channel_settings_test.go:301
Function
TestAdvancedCustomMatchPathForModelExactRuleDoesNotMatchPrefix
(t *testing.T)
relaykit/dto/channel_settings_test.go:396
Function
TestAdvancedCustomMatchPathForModelRegexRules
(t *testing.T)
relaykit/dto/channel_settings_test.go:338
Function
TestAdvancedCustomMatchPathForModelUsesFirstMatchingRegexRoute
(t *testing.T)
relaykit/dto/channel_settings_test.go:472
Function
TestAdvancedCustomModelListRouteRequiresExactIncomingPath
(t *testing.T)
relaykit/dto/channel_settings_test.go:130
Function
TestAdvancedCustomRouteModelRegexRulesAreCachedCompiled
(t *testing.T)
relaykit/dto/channel_settings_test.go:375
Function
TestAdvancedCustomSupportedEndpointTypesForModel
(t *testing.T)
relaykit/dto/channel_settings_test.go:496
Function
TestAdvancedCustomValidateAlphaSearchConverterPath
(t *testing.T)
relaykit/dto/channel_settings_test.go:546
Function
TestAdvancedCustomValidateBalanceRouteConstraints
(t *testing.T)
relaykit/dto/channel_settings_test.go:150
Function
TestAdvancedCustomValidateDuplicateIncomingPathRejectsDuplicateRegexModels
(t *testing.T)
relaykit/dto/channel_settings_test.go:449
Function
TestAdvancedCustomValidateDuplicateIncomingPathRejectsInvalidRegexModels
(t *testing.T)
relaykit/dto/channel_settings_test.go:419
Function
TestAdvancedCustomValidateDuplicateIncomingPathRejectsMultipleCatchAllRoutes
(t *testing.T)
relaykit/dto/channel_settings_test.go:258
Function
TestAdvancedCustomValidateDuplicateIncomingPathRejectsOverlappingModels
(t *testing.T)
relaykit/dto/channel_settings_test.go:235
Function
TestAdvancedCustomValidateDuplicateIncomingPathRequiresCatchAllLast
(t *testing.T)
relaykit/dto/channel_settings_test.go:279
Function
TestAdvancedCustomValidateDuplicateIncomingPathWithDisjointModels
(t *testing.T)
relaykit/dto/channel_settings_test.go:214
Function
TestAdvancedCustomValidateModelListRouteConstraints
(t *testing.T)
relaykit/dto/channel_settings_test.go:62
Function
TestAdvancedCustomValidateResponsesToChatConverterPath
(t *testing.T)
relaykit/dto/channel_settings_test.go:13
Function
TestAdvancedCustomValidateRoutePassThroughBody
(t *testing.T)
relaykit/dto/channel_settings_test.go:588
Function
TestAliResponsesWebSearchUsage
DashScope Responses bills web search like the agent strategy and reports the count in usage.x_tools; it replaces the web_search_call items counted und
relay/channel/ali/adaptor_test.go:316
Function
TestAlibabaImageResults
(t *testing.T)
plugins/alibaba_responses_test.go:832
Function
TestAlibabaImageSubmission
(t *testing.T)
plugins/alibaba_responses_test.go:711
Function
TestAlibabaImageValidation
(t *testing.T)
plugins/alibaba_responses_test.go:786
Function
TestAlibabaInterleavedStreamOutcomes
Interleaved Wan output is a stream for a native client that asks for one with X-DashScope-Sse. DashScope's error event reaches the client and ends the
plugins/alibaba_responses_test.go:1043
Function
TestAlibabaNativeRequestsGoAsSent
DashScope's own bodies go to DashScope as sent, for it to check. The gateway asks the asynchronous endpoints for a task itself, sends a video body to
plugins/alibaba_responses_test.go:1104
Function
TestAlibabaOpenAIImageCountDerivationAndRender
Count derivation for synchronous image results: usage.image_count first, then the Qwen-Image-3.0 usage.output_image_count, then image payloads flatten
plugins/alibaba_responses_test.go:1496
Function
TestAlibabaOpenAIImageDecodeAndSubmission
OpenAI image requests map onto the DashScope services the models support, reserve the requested count, and reject counts the vendor would refuse befor
plugins/alibaba_responses_test.go:1271
Function
TestAlibabaOpenAIImageProtocolBindings
The OpenAI Images protocol claims every declared image model on both image endpoints; chat and video models keep the built-in relay.
plugins/alibaba_responses_test.go:1230
Function
TestAlibabaResponsesProtocol
(t *testing.T)
plugins/alibaba_responses_test.go:29
Function
TestAlibabaSubmitDeltaDoesNotMutateControlState
(t *testing.T)
relay/channel/task/jsplugin/adaptor_test.go:2665
Function
TestAlibabaSynchronousMultiImageAndStream
(t *testing.T)
plugins/alibaba_responses_test.go:963
Function
TestAlibabaWan3
(t *testing.T)
plugins/alibaba_wan3_test.go:13
Function
TestAlibabaWanCompatibilityParameters
(t *testing.T)
plugins/alibaba_responses_test.go:443
Function
TestAlibabaWanCompletionFactsAndArtifacts
(t *testing.T)
plugins/alibaba_responses_test.go:656
Function
TestAlibabaWanDurationValidation
(t *testing.T)
plugins/alibaba_responses_test.go:547
Function
TestAlibabaWanEntrypointsPreserveOptions
(t *testing.T)
plugins/alibaba_responses_test.go:505
Function
TestAlibabaWanFlashAudioFact
(t *testing.T)
plugins/alibaba_responses_test.go:475
Function
TestAlibabaWanMediaInputs
(t *testing.T)
plugins/alibaba_responses_test.go:604
Function
TestAlibabaWanModelCapabilities
(t *testing.T)
plugins/alibaba_responses_test.go:355
Function
TestAllowFallsBackToEvalAfterScriptFlush
(t *testing.T)
common/limiter/limiter_test.go:38
Function
TestAppendToolSurchargeLogInfoWritesOnlyStructuredFields
(t *testing.T)
service/text_quota_test.go:1657
Function
TestAppendUsageBillingPathForLogWritesAdminInfo
(t *testing.T)
service/text_quota_test.go:735
Function
TestApplyChannelAffinityOverrideTemplate_MergeOperations
(t *testing.T)
service/channel_affinity_template_test.go:83
Function
TestApplyChannelAffinityOverrideTemplate_MergeTemplate
(t *testing.T)
service/channel_affinity_template_test.go:43
Function
TestApplyChannelAffinityOverrideTemplate_NoTemplate
(t *testing.T)
service/channel_affinity_template_test.go:30
Function
TestApplyChannelPinPreservesOriginTasksAndRetryMode
(t *testing.T)
relay/relay_task_test.go:137
Function
TestApplyFailuresAreAtomic
(t *testing.T)
pkg/requestpatch/patch_test.go:51
Function
TestApplyHeaderPatch
(t *testing.T)
pkg/requestpatch/patch_test.go:78
Function
TestApplyJSONPatchOperations
(t *testing.T)
pkg/requestpatch/patch_test.go:22
Function
TestApplyKeepsUntouchedTextExactly
The body is written from its parsed text, so a patch changes only what it addresses: numbers keep their digits and members keep their order.
pkg/requestpatch/patch_test.go:44
Function
TestApplyOriginTaskIntent
(t *testing.T)
middleware/task_plugin_origin_task_test.go:89
Function
TestApplyOriginTaskIntentAbsentAndEmptyAreNoop
(t *testing.T)
middleware/task_plugin_origin_task_test.go:214
Function
TestApplyParamOverrideAppendObjectMergeKeepOrigin
(t *testing.T)
relay/common/override_test.go:729
Function
TestApplyParamOverrideAppendObjectMergeOverride
(t *testing.T)
relay/common/override_test.go:752
Function
TestApplyParamOverrideConditionAND
(t *testing.T)
relay/common/override_test.go:948
Function
TestApplyParamOverrideConditionByGroupContext
(t *testing.T)
relay/common/override_test.go:1576
Function
TestApplyParamOverrideConditionByUserAndGPTModel
(t *testing.T)
relay/common/override_test.go:1507
Function
TestApplyParamOverrideConditionFromContext
(t *testing.T)
relay/common/override_test.go:1034
← previous
next →
11,701–11,800 of 15,409, ranked by callers