Skip to content

feat(ai): priority classification for AI/LLM requests (interactive, regular, as-available) #285

Closed

Description

@dan-petty

Problem Statement

AI and LLM requests currently compete equally for Ollama and provider capacity without priority differentiation. When background or scheduled tasks run, they contend for slots with urgent interactive chat or CLI executions.

Proposed Solution

  1. Priority Classification:
    • HIGH / INTERACTIVE: User chat, interactive terminal commands, and latency-sensitive operations.
    • NORMAL / REGULAR: Standard CLI commands, multi-persona reviews, batch code analysis.
    • LOW / AS_AVAILABLE / BACKGROUND: Scheduled jobs, background prewarming, offline embedding generation, running without blocking higher-priority workloads.
  2. Priority-Aware Dynamic Slot Leasing:
    • Update acquire_ollama_slot in src/devops_cli/ai/client/network.py and LLMClient to support priority-ordered acquisition.
    • Higher priority requests take precedence over normal and background requests.
    • As-available requests run when capacity exists and do not block higher-priority requests.
  3. Context Variable & Parameter Propagation:
    • Support setting priority via context variable (current_request_priority) and explicit parameters on AI client methods.

Activity

  1. added this to the v0.2.21 milestone on Sep 19, 2026
  2. added
    type/feature
    scope/ai
    priority/p1-high
    on Sep 19, 2026
  3. added a commit that references this issue on Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/aitype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions