Skip to content

feat(ai): route devops ai review and embeddings through the gateway across every inference backend #458

Closed

Description

@dan-petty

Problem

The LiteLLM gateway is meant to be the single router for every inference server (vLLM and Ollama), but devops-cli bypasses or under-uses it:

  • A review sends every LLM call (persona reviews, verification, memory summaries) through one LLMClient built from ai.for_task("analysis"), bound to one provider and one model. No gateway model group spans all servers, so a review cannot use them all.
  • Review prompts exceed most backends' windows: review pages have a 128K-character floor (DEFAULT_REVIEW_MAX_DIFF_CHARS) and cached persona agents resend their whole memory (up to 96K characters) on every file, so a 16K-context backend is never eligible and the router sends almost everything to the largest model.
  • Embeddings cannot use the gateway at all: EmbeddingsEngine only speaks to Ollama URLs.
  • Individual Ollama models are not reachable through the gateway, only the fixed virtual aliases.

Proposal

Keep routing centralized in the gateway; make devops-cli a thin client of it.

  1. Gateway: a devops-review virtual model whose deployments span every vLLM and Ollama server, least-busy routed with per-deployment concurrency caps and context pre-checks, plus an ollama/* pass-through for any model on the Ollama nodes.
  2. Review prompt sizing: cap review pages by the analysis task's context window instead of the 128K floor, and stop persona agents carrying history across files, so the router can place work on smaller backends.
  3. Embeddings through the gateway: support provider gateway in EmbeddingsEngine via the OpenAI-compatible /v1/embeddings endpoint.

Acceptance criteria

  • A review pointed at devops-review spreads requests across every backend.
  • Review prompts respect the configured context window.
  • Embeddings work with provider gateway.
  • Tests cover the gateway config, page sizing, history isolation and gateway embeddings; uv run devops ci passes.

Activity

  1. added this to the v0.2.23 milestone on Sep 23, 2026
  2. added
    type/feature
    scope/ai
    scope/review
    priority/p2-medium
    status/in-progress
    on Sep 23, 2026
  3. changed the title [-]feat(ai): spread devops ai review across every inference backend[/-] [+]feat(ai): route devops ai review and embeddings through the gateway across every inference backend[/+] on Sep 23, 2026
  4. added 2 commits that reference this issue on Sep 23, 2026
    3183439
    2bc19cf
  5. dan-petty commented on Sep 23, 2026

    @dan-petty
    OwnerAuthor

    Closed by #459, merged into release/v0.2.23.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

  6. added a commit that references this issue on Sep 28, 2026
    ea49d6e
  7. removed
    status/in-progress
    on Oct 30, 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/p2-mediumscope/aiscope/reviewtype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions