Local LLM Tiering ($0.00 First)
gosec implements a 3-tier cognitive LLM hierarchy engineered to maximize cost efficiency without sacrificing intelligence.
The 3-Tier Cognitive Architecture
flowchart TD
Prompt["Developer / Agent Request"] --> Check{"Local Ollama Available?"}
Check -->|Yes| Tier0["Tier 0/1: Local Ollama ($0.00)\nqwen3-coder:30b / deepseek-r1:14b"]
Check -->|No / Busy| Tier2["Tier 2: Fast Cloud Default\nGemini 3.8 Flash"]
Tier0 --> Complex{"Complex Architecture or ADR?"}
Tier2 --> Complex
Complex -->|Yes| Tier3["Tier 3: Deep Cognitive Tier (Restricted)\nGemini 3.8 Pro"]
Complex -->|No| Output["Completed Code & Artifacts"]
Tier3 --> Output
Hold "Alt" / "Option" to enable pan & zoom
1. Tier 0/1: Local Ollama ($0.00)
- Target Host:
http://127.0.0.1:11434 - Recommended Models:
qwen3-coder:30b: Primary coding and refactoring engine.deepseek-r1:14b: Deep reasoning, logic checks, and AST analysis.llama3.3:70b: High-context comprehension.- Cost: $0.00 (runs entirely on local GPU/Metal).
- Graceful Fallback: If Ollama is offline or times out,
gosecseamlessly routes requests to Tier 2 with zero hard errors.
2. Tier 2: Fast Cloud Default
- Target Model: Gemini 3.8 Flash.
- Role: High-throughput code synthesis, test generation, MCP tool calls, and CI triage.
- Speed: Sub-second latency.
3. Tier 3: Deep Cognitive Architecture (Restricted)
- Target Model: Gemini 3.8 Pro.
- Role: Reserved strictly for complex system design, architectural decision records (ADRs), and critical security threat modeling.