Skip to content

meta: track llm-here extraction to unify provider detection across noether, agentspec, caloron-noether #46

Description

@alpibrupa

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

  1. 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).
  2. Consolidate provider detection, env-var priority, fallback order, timeout handling in one place.
  3. Ship both llm-here binary and llm-here-rs crate.
  4. 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)

  • alpibrusl/llm-here repo exists with initial crate structure and CI.
  • One caller migrated as proof of concept (suggest: noether-grid since it's the youngest).
  • Follow-up issues filed in agentspec and caloron-noether to track their migrations.
  • docs/research/llm-here.md updated 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

  • alpibrusl/agentspec — callers to migrate.
  • alpibrusl/caloron-noether — callers to migrate.
  • Research doc: docs/research/llm-here.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions