mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-13 04:14:57 +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:
1 parent
ec4e1ae31c
commit
3252228e5c
2 files changed
+8
-5
No files matched your search
@@ -545,6 +545,8 @@ export const DEFAULT_IMAGE_ANALYSIS_CONFIG: ImageAnalysisConfig = {
|
|||||||
kiro: 'kiro-claude-haiku-4-5',
|
kiro: 'kiro-claude-haiku-4-5',
|
||||||
ghcp: 'claude-haiku-4.5',
|
ghcp: 'claude-haiku-4.5',
|
||||||
claude: 'claude-haiku-4-5-20251001',
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only inject for CLIProxy profiles with vision support
|
const imageConfig = getImageAnalysisConfig();
|
||||||
const visionProfiles = ['agy', 'gemini'];
|
|
||||||
if (!visionProfiles.includes(profileName)) {
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const imageConfig = getImageAnalysisConfig();
|
|
||||||
|
|
||||||
// Skip if image analysis is disabled
|
// Skip if image analysis is disabled
|
||||||
if (!imageConfig.enabled) {
|
if (!imageConfig.enabled) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in new issue
Block a user