Problem
"Which LLM CLI is installed, which env vars apply, what fallback order" is currently reimplemented in three places:
- caloron-noether:
stages/phases/_llm.py
- agentspec:
src/agentspec/resolver/resolver.py
- noether (grid):
crates/noether-grid-*/src/cli_provider.rs (research branch)
Observed drift:
- caloron knows about the Nix sub-30s timeout cap; grid does not.
- agentspec handles Vertex AI routing; grid does not.
- Each project has its own understanding of fallback precedence.
The docs/research/llm-here.md design doc in this repo already proposes the fix: a single Rust binary llm-here, JSON in/out, callable both via subprocess (Python) and as a library crate (Rust).
Proposed scope
- Create a new standalone repo
alpibrusl/llm-here (not a crate inside noether — the utility's audience is broader than Noether and shouldn't be coupled to Noether's release cadence).
- Consolidate provider detection, env-var priority, fallback order, timeout handling in one place.
- Ship both
llm-here binary and llm-here-rs crate.
- Migrate the three callers:
- noether-grid: replace
cli_provider.rs with llm-here-rs dep.
- agentspec: subprocess call (Python stays pure-Python).
- caloron-noether: subprocess call.
Acceptance criteria (for this meta-issue)
Priority
High — highest-ROI cross-project refactor in the audit. Blocks nothing, but every month of delay compounds the drift.
Related
- alpibrusl/agentspec — callers to migrate.
- alpibrusl/caloron-noether — callers to migrate.
- Research doc:
docs/research/llm-here.md.
Problem
"Which LLM CLI is installed, which env vars apply, what fallback order" is currently reimplemented in three places:
stages/phases/_llm.pysrc/agentspec/resolver/resolver.pycrates/noether-grid-*/src/cli_provider.rs(research branch)Observed drift:
The
docs/research/llm-here.mddesign doc in this repo already proposes the fix: a single Rust binaryllm-here, JSON in/out, callable both via subprocess (Python) and as a library crate (Rust).Proposed scope
alpibrusl/llm-here(not a crate inside noether — the utility's audience is broader than Noether and shouldn't be coupled to Noether's release cadence).llm-herebinary andllm-here-rscrate.cli_provider.rswithllm-here-rsdep.Acceptance criteria (for this meta-issue)
alpibrusl/llm-hererepo exists with initial crate structure and CI.docs/research/llm-here.mdupdated to "implemented, see alpibrusl/llm-here".Priority
High — highest-ROI cross-project refactor in the audit. Blocks nothing, but every month of delay compounds the drift.
Related
docs/research/llm-here.md.