fix: skip assertMinVersion for third-party providers
The version kill-switch calls Anthropic's GrowthBook endpoint to enforce a minimum version. This is currently safe for 3P users only because isAnalyticsDisabled() returns true (disabling GrowthBook). Adding an explicit provider guard makes this safety independent of the analytics stub, preventing 3P users from being blocked by Anthropic's version requirements in case of future upstream merges.
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
logEvent,
|
||||
} from 'src/services/analytics/index.js'
|
||||
import { type ReleaseChannel, saveGlobalConfig } from './config.js'
|
||||
import { getAPIProvider } from './model/providers.js'
|
||||
import { logForDebugging } from './debug.js'
|
||||
import { env } from './env.js'
|
||||
import { getClaudeConfigHomeDir } from './envUtils.js'
|
||||
@@ -72,6 +73,12 @@ export async function assertMinVersion(): Promise<void> {
|
||||
return
|
||||
}
|
||||
|
||||
// Skip version check for third-party providers — the min version
|
||||
// kill-switch is Anthropic-specific and should not block 3P users
|
||||
if (getAPIProvider() !== 'firstParty') {
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT<{
|
||||
minVersion: string
|
||||
|
||||
Reference in New Issue
Block a user