You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
Summary
The
llmfeature gate currently requiresreqwest,tokio, andfuturesas 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-playbookneed the typed response validation but already have their own HTTP layer (CommandRunnertrait). Importingllmforces 3 heavyweight deps that aren't used.Proposed Change
Split the
llmmodule into two feature gates:llm-types— exportsclienttypes (ChatResponse,ChatMessage,Usage,Role, etc.),assertionmodule (LlmAssertion,assert_deterministic), andreportmodule. Zero new deps.llm— depends onllm-types+ addsreqwest/tokio/futuresforLlmClientandLoadTest.Motivation
apr-qa-runnerserve battery (19 endpoint checks) validates OpenAI-compatible JSON responses. Currently reimplements schema validation, determinism checks, and token count assertions inline. Withllm-types, it canuse jugar_probar::llm::assertion::LlmAssertiondirectly.Files Changed
crates/probar/Cargo.toml— addllm-typesfeaturecrates/probar/src/llm/mod.rs— conditional compilation forclientHTTP methodscrates/probar/src/llm/client.rs— split types (always) from HTTP impl (llmonly)