feat: gate Qwen Code behind server version 0.0.77 (#508)

This commit is contained in:
shivammittal274
2026-03-20 20:07:39 +05:30
committed by GitHub
parent 2b4fdf1aad
commit e3601bfdc1
3 changed files with 5 additions and 0 deletions

View File

@@ -200,6 +200,7 @@ export const NewProviderDialog: FC<NewProviderDialogProps> = ({
return supports(Feature.CHATGPT_PRO_SUPPORT)
if (opt.value === 'github-copilot')
return supports(Feature.GITHUB_COPILOT_SUPPORT)
if (opt.value === 'qwen-code') return supports(Feature.QWEN_CODE_SUPPORT)
if (opt.value === 'moonshot')
return kimiLaunch || initialValues?.type === 'moonshot'
if (opt.value === 'openai-compatible') {

View File

@@ -30,6 +30,7 @@ export const ProviderTemplatesSection: FC<ProviderTemplatesSectionProps> = ({
return supports(Feature.CHATGPT_PRO_SUPPORT)
if (template.id === 'github-copilot')
return supports(Feature.GITHUB_COPILOT_SUPPORT)
if (template.id === 'qwen-code') return supports(Feature.QWEN_CODE_SUPPORT)
if (template.id === 'moonshot') return kimiLaunch
if (template.id === 'openai-compatible') {
return supports(Feature.OPENAI_COMPATIBLE_SUPPORT)

View File

@@ -49,6 +49,8 @@ export enum Feature {
CHATGPT_PRO_SUPPORT = 'CHATGPT_PRO_SUPPORT',
// GitHub Copilot OAuth LLM provider
GITHUB_COPILOT_SUPPORT = 'GITHUB_COPILOT_SUPPORT',
// Qwen Code OAuth LLM provider
QWEN_CODE_SUPPORT = 'QWEN_CODE_SUPPORT',
}
/**
@@ -78,6 +80,7 @@ const FEATURE_CONFIG: { [K in Feature]: FeatureConfig } = {
[Feature.SKILLS_SUPPORT]: { minBrowserOSVersion: '0.43.0.0' },
[Feature.CHATGPT_PRO_SUPPORT]: { minServerVersion: '0.0.77' },
[Feature.GITHUB_COPILOT_SUPPORT]: { minServerVersion: '0.0.77' },
[Feature.QWEN_CODE_SUPPORT]: { minServerVersion: '0.0.77' },
}
function parseVersion(version: string): number[] {