MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / ollamaNumCtxCeiling

Function ollamaNumCtxCeiling

src/llm/router.ts:36–41  ·  view source on GitHub ↗
(hw?: QodexConfig['hardware'])

Source from the content-addressed store, hash-verified

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 */
37export 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
44export interface RouteDecision {

Callers 2

initializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected