moving
Some checks failed
Installer Smoke / installer-smoke (push) Has been cancelled

This commit is contained in:
Oleg Maslov
2026-09-02 10:10:29 +02:00
commit 0c3e2ead3b
3841 changed files with 970576 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
/**
* Model tiers — drive scoring profile, recall limit, score floor, and
* scaffold selection in the PromptAssembler.
*
* Frontier: Claude Opus family.
* Mid: Claude Sonnet/Haiku + unknown-model default.
* Small: Gemma 4, Qwen3, Llama 3/4 small-family variants.
*/
export type ModelTier = 'small' | 'mid' | 'frontier';
const FRONTIER_PREFIXES = ['claude-opus'] as const;
const SMALL_PREFIXES = [
'gemma-4-',
'qwen3-',
'qwen3.5-',
'qwen3.6-',
'llama-3',
'llama-4',
] as const;
const MID_PREFIXES = ['claude-sonnet', 'claude-haiku'] as const;
/**
* Map a model identifier to a tier. Case-insensitive prefix match.
* Unknown models default to 'mid' (safe middle ground).
*/
export function tierForModel(model: string): ModelTier {
const normalized = model.toLowerCase();
for (const prefix of FRONTIER_PREFIXES) {
if (normalized.startsWith(prefix)) return 'frontier';
}
for (const prefix of SMALL_PREFIXES) {
if (normalized.startsWith(prefix)) return 'small';
}
for (const prefix of MID_PREFIXES) {
if (normalized.startsWith(prefix)) return 'mid';
}
return 'mid';
}