feat(l3): dedicated l3Llm config slot for abstraction pass#1959
Open
chiefmojo wants to merge 1 commit into
Open
feat(l3): dedicated l3Llm config slot for abstraction pass#1959chiefmojo wants to merge 1 commit into
chiefmojo wants to merge 1 commit into
Conversation
L3 abstraction runs on the main `llm`, which on cheap models (gemini-2.5-flash-lite) over-extracts and truncates the JSON, producing "'constraints'/'inference' must be an array" failures — Violet logged 180 such failures and produced only 2 world-model facts total. Add an `l3Llm` config slot (same SkillEvolverSchema shape as `skillEvolver`). Blank inherits the main `llm` (zero behavior change); set explicitly to run the clustering → world-model pass on a stronger model. L3 is async/off the turn-response path, so a slower-but-correct model has no impact on companion latency. Wiring mirrors skillEvolver: schema + blank default + secret redaction + bootstrap client + PipelineDeps/PipelineHandle field + orchestrator handle passthrough, consumed at the L3 subscriber attach (`deps.l3Llm ?? deps.llm`).
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.
Problem
L3 abstraction runs on the main
llm. On cheap models (e.g.gemini-2.5-flash-lite) this over-extracts and truncates the JSON output, producing'constraints'/'inference' must be an arrayerrors. The slot is quality-sensitive and runs off the turn-response path — a slower but more capable model here improves world-model quality with no impact on latency.Changes
Adds an
l3Llmtop-level config slot using the sameSkillEvolverSchemashape asskillEvolver. When blank (the default), behavior is identical to today —deps.l3Llm ?? deps.llmfalls through to the main LLM. When set, the L3 clustering → abstraction subscriber uses the dedicated client.defaults.ts— blank default (inherits main llm)schema.ts—l3Llm: SkillEvolverSchemaentrymemory-core.ts— bootstrap client (mirrorsreflectLlmpath; errors log, don't crash)deps.ts/types.ts—PipelineDeps.l3LlmandPipelineHandle.l3Llmfieldsorchestrator.ts— threads the field through to the handleorchestrator.test.ts— two tests: dedicated client threads through, null when unconfiguredConfig example
Operators running a budget model as their main
llmcan now point L3 at a stronger model: