Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
15,592 in github.com/QuantumNous/new-api
⨍
Functions
15,592
◇
Types & classes
2,267
Function
TestAccessTokenIdentityAndSingleLookup
(t *testing.T)
middleware/auth_test.go:526
Function
TestAccessTokenLifecycleAndLateRequests
(t *testing.T)
controller/access_token_audit_test.go:182
Function
TestAccessTokenRejectsTampering
(t *testing.T)
service/auth_token_test.go:43
Function
TestAccessTokenRoundTripAndPurposeIsolation
(t *testing.T)
service/auth_token_test.go:22
Function
TestAccessTokenRouteRulesCoverEveryDashboardRoute
(t *testing.T)
router/access_token_scope_test.go:101
Function
TestAccessTokenScopeDictionaryIgnoresTheViewersGrants
The scope dictionary labels stored grants, so it must not shrink to what the viewer can grant today.
controller/access_token_audit_test.go:293
Function
TestAccessTokenUpdateRenamesFreelyAndChangesGrantOnlyWithProof
(t *testing.T)
controller/access_token_audit_test.go:425
Function
TestAccessTokenVerificationScopesAreAllListed
(t *testing.T)
router/access_token_scope_test.go:204
Function
TestAcquireLogExportLock
(t *testing.T)
controller/log_export_test.go:217
Function
TestActivateTaskPluginRefreshesRuntimeSyncState
(t *testing.T)
controller/task_plugin_test.go:913
Function
TestActiveSessionCacheFillUsesRemainingObservationWindow
(t *testing.T)
model/user_session_test.go:182
Function
TestAdapterAddPolicyIsIdempotent
(t *testing.T)
service/authz/authz_test.go:255
Function
TestAdaptorBuildBalanceRequestRequiresConfiguredRoute
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:513
Function
TestAdaptorBuildBalanceRequestUsesConfiguredRoute
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:483
Function
TestAdaptorBuildModelListRequestDefaultAndNoAuth
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:404
Function
TestAdaptorBuildModelListRequestDoesNotReuseRelayRoute
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:443
Function
TestAdaptorBuildModelListRequestRequiresConfiguredRoute
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:468
Function
TestAdaptorBuildModelListRequestUsesConfiguredQueryAuth
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:374
Function
TestAdaptorBuildModelListRequestUsesConfiguredRouteAuth
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:345
Function
TestAdaptorConvertsClaudeAndGeminiRequestsToResponsesUpstream
Claude Messages and Gemini Generate Content clients on an OpenAI Responses upstream: the request carries the hosted web search as a Responses tool and
relay/channel/advancedcustom/adaptor_test.go:1131
Function
TestAdaptorConvertsClaudeRequestToOpenAIChatUpstream
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:926
Function
TestAdaptorConvertsGeminiRequestToOpenAIChatUpstream
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:956
Function
TestAdaptorConvertsOpenAIChatRequestToClaudeUpstream
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:870
Function
TestAdaptorConvertsOpenAIChatRequestToGeminiUpstream
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:898
Function
TestAdaptorConvertsOpenAIChatRequestToResponsesUpstream
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:843
Function
TestAdaptorConvertsResponsesRequestToOpenAIChatUpstream
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:526
Function
TestAdaptorCrossProtocolChatUpstreamRequestsStreamUsage
(t *testing.T)
relay/channel/advancedcustom/adaptor_test.go:991
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
TestAdaptorResponsesToClaudeMessages
A /v1/responses route to Anthropic Messages converts the request, sends the Claude headers and turns the Messages reply, plain or streamed, back into
relay/channel/advancedcustom/adaptor_test.go:745
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:224
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:316
Function
TestAdvancedCustomMatchPathForModelExactRuleDoesNotMatchPrefix
(t *testing.T)
relaykit/dto/channel_settings_test.go:411
Function
TestAdvancedCustomMatchPathForModelRegexRules
(t *testing.T)
relaykit/dto/channel_settings_test.go:353
Function
TestAdvancedCustomMatchPathForModelUsesFirstMatchingRegexRoute
(t *testing.T)
relaykit/dto/channel_settings_test.go:487
Function
TestAdvancedCustomModelListRouteRequiresExactIncomingPath
(t *testing.T)
relaykit/dto/channel_settings_test.go:145
Function
TestAdvancedCustomRouteModelRegexRulesAreCachedCompiled
(t *testing.T)
relaykit/dto/channel_settings_test.go:390
Function
TestAdvancedCustomSupportedEndpointTypesForModel
(t *testing.T)
relaykit/dto/channel_settings_test.go:511
Function
TestAdvancedCustomValidateAlphaSearchConverterPath
(t *testing.T)
relaykit/dto/channel_settings_test.go:561
Function
TestAdvancedCustomValidateBalanceRouteConstraints
(t *testing.T)
relaykit/dto/channel_settings_test.go:165
Function
TestAdvancedCustomValidateDuplicateIncomingPathRejectsDuplicateRegexModels
(t *testing.T)
relaykit/dto/channel_settings_test.go:464
Function
TestAdvancedCustomValidateDuplicateIncomingPathRejectsInvalidRegexModels
(t *testing.T)
relaykit/dto/channel_settings_test.go:434
Function
TestAdvancedCustomValidateDuplicateIncomingPathRejectsMultipleCatchAllRoutes
(t *testing.T)
relaykit/dto/channel_settings_test.go:273
Function
TestAdvancedCustomValidateDuplicateIncomingPathRejectsOverlappingModels
(t *testing.T)
relaykit/dto/channel_settings_test.go:250
Function
TestAdvancedCustomValidateDuplicateIncomingPathRequiresCatchAllLast
(t *testing.T)
relaykit/dto/channel_settings_test.go:294
Function
TestAdvancedCustomValidateDuplicateIncomingPathWithDisjointModels
(t *testing.T)
relaykit/dto/channel_settings_test.go:229
Function
TestAdvancedCustomValidateModelListRouteConstraints
(t *testing.T)
relaykit/dto/channel_settings_test.go:77
Function
TestAdvancedCustomValidateResponsesToChatConverterPath
(t *testing.T)
relaykit/dto/channel_settings_test.go:13
Function
TestAdvancedCustomValidateRoutePassThroughBody
(t *testing.T)
relaykit/dto/channel_settings_test.go:604
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:2734
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
← previous
next →
11,801–11,900 of 15,592, ranked by callers