mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 10:16:49 +00:00
feat(hooks): extend image analyzer to all CLIProxy providers
- Derive supported profiles from provider_models config dynamically - Add qwen and iflow to default provider_models - Full parity with WebSearch hook injection pattern Providers now covered: agy, gemini, codex, kiro, ghcp, claude, qwen, iflow
This commit is contained in:
@@ -545,6 +545,8 @@ export const DEFAULT_IMAGE_ANALYSIS_CONFIG: ImageAnalysisConfig = {
|
||||
kiro: 'kiro-claude-haiku-4-5',
|
||||
ghcp: 'claude-haiku-4.5',
|
||||
claude: 'claude-haiku-4-5-20251001',
|
||||
qwen: 'vision-model',
|
||||
iflow: 'qwen3-vl-plus',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -94,14 +94,15 @@ export function ensureProfileHooks(profileName: string): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only inject for CLIProxy profiles with vision support
|
||||
const visionProfiles = ['agy', 'gemini'];
|
||||
if (!visionProfiles.includes(profileName)) {
|
||||
const imageConfig = getImageAnalysisConfig();
|
||||
|
||||
// Only inject for profiles that have a model mapping in provider_models
|
||||
// This allows dynamic extension without hardcoding profile names
|
||||
const configuredProviders = Object.keys(imageConfig.provider_models);
|
||||
if (!configuredProviders.includes(profileName)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const imageConfig = getImageAnalysisConfig();
|
||||
|
||||
// Skip if image analysis is disabled
|
||||
if (!imageConfig.enabled) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user