MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / resolveAuthMode

Function resolveAuthMode

ai/ai.ts:1712–1721  ·  view source on GitHub ↗
(
  profile: ProviderProfile,
  modeConfig: ProviderModeConfig,
  config?: ProviderConfig,
)

Source from the content-addressed store, hash-verified

1710
1711const resolveAuthMode = (
1712 profile: ProviderProfile,
1713 modeConfig: ProviderModeConfig,
1714 config?: ProviderConfig,
1715): AuthMode => {
1716 if (modeConfig.authMode) return modeConfig.authMode;
1717 if (profile.authMode) return profile.authMode;
1718 if (config && resolveProviderType(config) === "gemini") return "query-key";
1719 return "bearer";
1720};
1721
1722const applyAuthConfig = (
1723 authMode: AuthMode,
1724 config: ProviderConfig,

Calls 1

resolveProviderTypeFunction · 0.85

Tested by

no test coverage detected