Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

feat: add llm-types feature gate for assertion types without reqwest #22

Description

@noahgift

Summary

The llm feature gate currently requires reqwest, tokio, and futures as dependencies. However, the assertion types (ChatResponse, LlmAssertion, LlmAssertionResult, assert_deterministic) are pure Rust structs + validation logic with zero network dependencies.

Downstream consumers like apr-model-qa-playbook need the typed response validation but already have their own HTTP layer (CommandRunner trait). Importing llm forces 3 heavyweight deps that aren't used.

Proposed Change

Split the llm module into two feature gates:

  • llm-types — exports client types (ChatResponse, ChatMessage, Usage, Role, etc.), assertion module (LlmAssertion, assert_deterministic), and report module. Zero new deps.
  • llm — depends on llm-types + adds reqwest/tokio/futures for LlmClient and LoadTest.

Motivation

apr-qa-runner serve battery (19 endpoint checks) validates OpenAI-compatible JSON responses. Currently reimplements schema validation, determinism checks, and token count assertions inline. With llm-types, it can use jugar_probar::llm::assertion::LlmAssertion directly.

Files Changed

  • crates/probar/Cargo.toml — add llm-types feature
  • crates/probar/src/llm/mod.rs — conditional compilation for client HTTP methods
  • crates/probar/src/llm/client.rs — split types (always) from HTTP impl (llm only)

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