Skip to content

config: llama.cpp local profile for the pipeline - #19

Merged
JustinJLeopard merged 2 commits into
demo-buildfrom
fable/llamacpp-config
Aug 9, 2026
Merged

config: llama.cpp local profile for the pipeline#19
JustinJLeopard merged 2 commits into
demo-buildfrom
fable/llamacpp-config

Conversation

@JustinJLeopard

Copy link
Copy Markdown
Owner

What

JustAi pointed every pipeline stage at a LiteLLM proxy on :4000 that isn't
running
, with cloud model names (claude-opus-4-6, gpt-5.3-codex). The live
local stack is llama.cppllama-server @ 127.0.0.1:8085 (Qwen3-VL-8B,
OpenAI-compatible). That mismatch is why the pipeline silently fell back to
heuristics ("backend down" was a wrong read on my part — it was never pointed at
the real server).

Adds a config-only local profile (no logic change):

  • .env.llamacppcp .env.llamacpp .env and the judging/planning stages
    (intent, planner, reviewer, intent-fidelity, trajectory analysis) run on 8085
    with a clean model alias. Cloud stays override-able.
  • .env.example — annotated: llama.cpp is the current stack, :4000 marked
    legacy; documents the new JUSTAI_FIDELITY_MODEL.

Verified live on 8085

  • justai plan "Add a /health endpoint…" → real 2-task plan (explore → add,
    R0/R1, real bash verify) — LLM-generated, not the heuristic template.
  • Intent-fidelity gate discriminates: aligned outcome 100/A+/met, drifted
    outcome (tasks "done" but wrong file/content) 0/F/missed, source=llm.

Hybrid — one open piece

You chose hybrid (local judge + stronger executor). Config-only, the
executor (mini-swe-agent) shares LITELLM_BASE_URL, so today it also hits 8085
(Qwen 8B) — fine to smoke the pipeline, weak for real coding. Completing the
hybrid needs a small agent_dispatch addition (JUSTAI_EXECUTOR_BASE_URL +
JUSTAI_MINI_MODEL) pointed at a stronger coder (a second llama-server, e.g.
Qwen-Coder, or a cloud route). Happy to ship that next on your word.

Base demo-build. Config-only; safe to merge.

JustAi's defaults + .env.example pointed every stage at a LiteLLM proxy on :4000
(not running) with cloud model names. The live local stack is llama.cpp
(llama-server @ 127.0.0.1:8085, Qwen3-VL-8B, OpenAI-compatible).

Adds .env.llamacpp: a ready profile (cp .env.llamacpp .env) pointing the
judging/planning stages (intent/planner/reviewer/fidelity/analysis) at 8085 with
a clean model alias. .env.example annotated: llama.cpp is the current stack,
:4000 marked legacy; documents JUSTAI_FIDELITY_MODEL.

Verified live on 8085: intent+plan+review produce a real plan; the intent-
fidelity gate discriminates (aligned 100/met vs drifted 0/missed), source=llm.

Config-only, no logic change. HYBRID note: the executor (mini-swe-agent) shares
LITELLM_BASE_URL so it currently also uses 8085 (Qwen 8B) -- weak for coding.
Completing the hybrid (stronger executor on its own endpoint) needs a small
agent_dispatch addition (JUSTAI_EXECUTOR_BASE_URL) + a coder server; deferred.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VPortjb8U5oteKxppGuVDQ
Copilot AI lite review requested due to automatic review settings August 8, 2026 20:01
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
justai-demo Ready Ready Preview Aug 9, 2026 1:27pm

Request Review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a llama.cpp-focused local environment profile and updates the sample environment file to document local-vs-legacy routing so the pipeline can be pointed at a running local OpenAI-compatible server (127.0.0.1:8085) instead of the legacy :4000 proxy defaults.

Changes:

  • Adds a new .env.llamacpp profile targeting http://127.0.0.1:8085 with local model aliases for planning/judging (and currently also executor variables).
  • Updates .env.example comments to describe the llama.cpp profile as the current local stack and mark :4000 LiteLLM values as legacy.
  • Adds JUSTAI_FIDELITY_MODEL to .env.example (and sets it in .env.llamacpp).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.env.llamacpp New local llama.cpp environment profile (8085) with model aliases and pipeline-stage env vars.
.env.example Clarifies local llama.cpp vs legacy LiteLLM routing; documents stage model env vars including fidelity model.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .env.example
JUSTAI_INTENT_MODEL=openai/claude-opus-4-6
JUSTAI_PLANNER_MODEL=openai/claude-opus-4-6
JUSTAI_REVIEWER_MODEL=openai/claude-opus-4-6
JUSTAI_FIDELITY_MODEL=openai/claude-opus-4-6
Comment thread .env.llamacpp
JUSTAI_INTENT_MODEL=qwen3-vl-8b
JUSTAI_PLANNER_MODEL=qwen3-vl-8b
JUSTAI_REVIEWER_MODEL=qwen3-vl-8b
JUSTAI_FIDELITY_MODEL=qwen3-vl-8b
Comment thread .env.llamacpp
Comment on lines +22 to +24
# Under this config-only profile the executor shares LITELLM_BASE_URL, so today
# it also hits 8085 (Qwen 8B) -- fine to smoke the pipeline, weak for real
# coding. To COMPLETE the hybrid, give the executor its own endpoint/model:
Comment thread .env.llamacpp Outdated
JUSTAI_REVIEWER_MODEL=qwen3-vl-8b
JUSTAI_FIDELITY_MODEL=qwen3-vl-8b
JUSTAI_ANALYSIS_MODEL=qwen3-vl-8b
JUSTAI_INTENT_BAR=90 # intent-fidelity "A" bar
@JustinJLeopard

Copy link
Copy Markdown
Owner Author

Desktop Codex exact-head review at 712d1fd6540cefd7775d0b372810bb19d47ee545: HOLD / request changes. The 8085 direction is correct and the live llama.cpp server accepts both /chat/completions and /v1/chat/completions, but this profile is not deterministically activated.

  1. The two documented activation paths are not equivalent. A fresh install still copies .env.example, whose operational default is dead :4000. Conversely, the live .env is already byte-identical to this PR’s profile (f35dad59…), yet ordinary Desktop shells inherit LITELLM_BASE_URL=http://localhost:8090/v1; the custom loader uses setdefault, so import keeps 8090. A fresh local POST to that broker chat route returned HTTP 503. Explicitly sourcing .env.llamacpp does override to 8085 and produced a real plan. Add a tested launcher/precedence contract rather than claiming source and cp are interchangeable.
  2. Inline comments are incompatible with the same loader. .env.example retains its URL comment as part of the value, corrupting appended request paths. .env.llamacpp makes JUSTAI_INTENT_BAR equal to 90 # ...; held PR feat(orchestrator): intent-fidelity gate — "A or better", with percentile #18 then raises ValueError at import. Move comments to separate lines or adopt and test a real dotenv parser.
  3. The target demo-build@8c7f70b diverges from main and does not contain merged PR fix(checkpoint): scope every approval gate to one run #13’s run-scoped approval-gate repair (3df6912). That leaves the cross-run approval collision in this runtime line and also leaves GitHub with only Vercel checks. Reconcile the branch/security topology before promotion.
  4. Fidelity model/bar claims have no consumer in this exact revision; they depend on separately held PR feat(orchestrator): intent-fidelity gate — "A or better", with percentile #18. The profile also points JUSTAI_MCP_URL at the obsolete Claude-Flow memory bridge, whose code writes through memory_store when reachable and can fall back to the Claude-Flow CLI. That is incompatible with the current native-memory/retired-state boundary. Remove unrelated memory/session settings from this routing profile or bind an explicitly disabled/current adapter.

The exact-head suite is not clean (394 passed, 8 failed; focused profile set 29 passed, 1 failed), and there is no Python CI check. This profile is also correctly disclosed as smoke-only, not the requested hybrid coder path. Source merge, profile adoption, installation, and live acceptance remain separate gates.

The .env loader keeps text after '=', so inline comments became part of the
value (JUSTAI_INTENT_BAR='90  # ...' -> float() crash on import). Move both
comments to their own lines. Config-only; #19 stays the config lineage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VPortjb8U5oteKxppGuVDQ
@JustinJLeopard
JustinJLeopard merged commit e5e26c0 into demo-build Aug 9, 2026
2 checks passed
@JustinJLeopard
JustinJLeopard deleted the fable/llamacpp-config branch August 9, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants