(hw?: QodexConfig['hardware'])
| 34 | * still get 32k, which is plenty for an agent turn and matches what compaction |
| 35 | * can actually use. An explicit `providers.ollama.options.num_ctx` still overrides. |
| 36 | */ |
| 37 | export function ollamaNumCtxCeiling(hw?: QodexConfig['hardware']): number { |
| 38 | if (hw && (hw.tier === 'small' || (hw.ramGb != null && hw.ramGb <= 8))) return 8192; |
| 39 | if (hw && (hw.tier === 'medium' || (hw.ramGb != null && hw.ramGb <= 16))) return 16384; |
| 40 | if (hw && (hw.tier === 'xl' || (hw.ramGb != null && hw.ramGb >= 64))) return 65536; |
| 41 | return 32768; // large, unknown, or no hardware profile |
| 42 | } |
| 43 | |
| 44 | export interface RouteDecision { |
no outgoing calls
no test coverage detected