feat: grid override file — .codedb/model_grid.toml (#269)#422
Open
feat: grid override file — .codedb/model_grid.toml (#269)#422
Conversation
…ides (#269) Adds TOML-based model override system to runtime/grid.zig: - parseOverrides(): parses minimal TOML format with [role] sections, model = "tier" and rationale = "reason" keys. Strips quotes, skips comments, validates tier names. - loadOverrides(): lazy-loads from .codedb/model_grid.toml with caching - overrideTierForRole(): looks up override tier for a role - resolveModel() updated: override file → grid → mode → fallback Override files can be hand-written or generated by evolve_agent. Supports up to 32 role overrides. 7 new tests covering: basic TOML parsing, invalid tier skipping, empty content, rationale ordering, quote stripping, unquoted values, and existing resolveModel behavior preservation. All 14 grid tests pass (4 existing + 3 types + 7 new). Made-with: Cursor
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.
Summary
parseOverrides(): Parses minimal TOML format with[role]sections,model = "tier"andrationale = "reason"keysloadOverrides(): Lazy-loads from.codedb/model_grid.toml, caches after first readoverrideTierForRole(): Lookup override tier by role nameresolveModel(): Updated resolution chain: override file -> grid -> mode -> fallbackresetOverrides(): Clears cache for testingExample
.codedb/model_grid.toml:Test plan
zig test src/runtime/grid.zig— 14/14 tests passCloses #269
Made with Cursor