refactor: organize model definitions and flavor capabilities into dedicated modules (#400)

This commit is contained in:
Junmo Kim
2026-04-05 22:49:29 +08:00
committed by GitHub
parent 4ffcb4cfdb
commit ea09663cdc
10 changed files with 263 additions and 60 deletions
+4 -16
View File
@@ -1,19 +1,7 @@
// Re-export from shared package for backwards compatibility
export { isKnownFlavor, supportsModelChange, supportsEffort } from '@hapi/protocol'
// Flavor-family helper not yet in shared — keep here until next migration
export function isCodexFamilyFlavor(flavor?: string | null): boolean {
return flavor === 'codex' || flavor === 'gemini' || flavor === 'opencode'
}
export function isClaudeFlavor(flavor?: string | null): boolean {
return flavor === 'claude'
}
export function isCursorFlavor(flavor?: string | null): boolean {
return flavor === 'cursor'
}
export function isKnownFlavor(flavor?: string | null): boolean {
return isClaudeFlavor(flavor) || isCodexFamilyFlavor(flavor) || isCursorFlavor(flavor)
}
export function supportsModelChange(flavor?: string | null): boolean {
return flavor === 'claude' || flavor === 'gemini'
}