Slice 011: LLM provider layer - #20
Merged
Merged
Conversation
ROADMAP row 011 to in_progress. NOTES.md carries the twelve-line G1 plan with the test each line names, the manual queue (AC2, AC6) with the model ids and the probe outputs behind them, and two deviations stated before any code: five provider mappings written and two measured live; no Trinity.LLM.Supervisor until a process needs one. plan_check: PASS. Signed-off-by: Ayla Croft <aylacroft@proton.me>
…licensed Twelve packages enter mix.lock with req_llm, listed by version and licence in NOTES.md; every one is Apache-2.0 or MIT. Both audits clean, versions.verify OK, VERSIONS.md regenerated. G1 line 1. Signed-off-by: Ayla Croft <aylacroft@proton.me>
…adapter, retry, usage rows, fake and live suites Trinity.LLM is the one door: a request names a registry id, the registry names the provider module, transient errors retry with backoff, a completed call writes one usage_events row with cost from the registry price. Trinity.LLM.Event fixes the seven shapes 012 and 013 consume. Trinity.LLM.Providers.ReqLLM maps requests, tools and messages to req_llm, assembles streamed tool calls from chunks and fragments, and classifies errors by looking inside req_llm's wrappers. Keys reach a provider only through Trinity.Config.secret/1. The registry lives in config/llm.exs so the live suite can read it without the environment imports. The live suite (@tag :live, excluded by default with :desktop, now stated in test_helper) found four defects on its first runs and each is fixed with its reason in the code: a caller's model id overriding the entry's model; req_llm's 30-second stream timeout under a reasoning model; an upstream 429 wrapped in an error with no status, called permanent; and an embedding model refused until the inline spec declared the capability. Ten live tests pass across OpenRouter and the NVIDIA endpoint: preflight, streamed completion, tool call, structured object on each, embeddings at dimension 2048, and a usage row from a real call. Twenty default tests through the scripted fake and the Mox mock. mix gate exit 0 (125 passed, 10 excluded). G1 lines 2 to 11. Signed-off-by: Ayla Croft <aylacroft@proton.me>
…ests; coverage row; docs/05 synced Trinity.LLM.Providers.ReqLLM.Mapping holds chunks-to-events, results and error classification, tested over sequences built with req_llm's own StreamChunk constructors (13 tests) and the error wrappers the live suite produced. Two atom mints sobelow found are replaced: a fixed map of the five provider names, and :other for an unknown finish reason. Coverage 51.57%, row added. docs/05's usage_events table now matches the built one. ROADMAP row 011 reads done. NOTES.md carries lines 2 to 11 with the four live-suite findings and the live trace, keys redacted. Signed-off-by: Ayla Croft <aylacroft@proton.me>
PROOF.md carries every criterion's evidence: the gate at exit 0 (138 passed, 10 excluded), coverage 51.57% (up from 44.88%), the fake-driven event sequence, the live transcript against OpenRouter and the NVIDIA endpoint with keys redacted (10 of 10, both manual criteria), embeddings at dimension 2048, the usage rows with cost from the registry price, and the default-model switch through the Mox mock. ROADMAP row 011 reads done. Signed-off-by: Ayla Croft <aylacroft@proton.me>
Signed-off-by: Ayla Croft <aylacroft@proton.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice 011 at G3. PROOF.md carries the evidence per criterion including the live transcript (keys redacted); NOTES.md carries the G1 plan, the dependency census, the four live-suite findings and the deviations. Merge-commit method, then tag slice/011 on main.