feat(v2): add Parse() and extensible Registry #5

Merged
steve merged 5 commits from feat/parse-registry into main 2026-05-24 15:14:45 +00:00

5 Commits

Author SHA1 Message Date
steve a1f405de74 Merge branch 'main' into feat/parse-registry
CI / Build, Test & Lint (pull_request) Successful in 12m0s
2026-05-24 15:14:17 +00:00
steve 72e281f82b ci: optimize workflow by merging jobs and adding module cache
CI / Build, Test & Lint (pull_request) Successful in 11m33s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 23:28:20 -04:00
steve db03e8d4ed fix(ci): write correct YAML workflow (was double-encoded as base64)
CI / Lint (pull_request) Successful in 9s
CI / V2 Module (pull_request) Successful in 1m50s
The previous CI fix commits stored the workflow file as a literal base64
string instead of decoded YAML, so Gitea could not parse it as a valid
workflow and no CI runs triggered. This writes the correct YAML content.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 23:24:19 -04:00
steve ddf1a9b556 ci: fix workflow to use v2/ module directory 2026-05-24 03:02:55 +00:00
steve 4522310f5a feat(v2): add Parse() function and extensible Registry for model string resolution
CI / Root Module (pull_request) Failing after 3s
CI / Lint (pull_request) Failing after 3s
CI / V2 Module (pull_request) Successful in 1m25s
Introduces llm.Parse(spec) backed by an extensible Registry that resolves
model strings like "openai/gpt-4o", aliases like "fast", and named targets
like "m5/qwen3:30b" (via LLM_M5 env var DSNs) into ready-to-use *Model
objects. Extension points: RegisterProvider, RegisterAlias, RegisterResolver.
Adds Foreman constructor and sentinel errors ErrAliasLoop, ErrUnknownProvider,
ErrInvalidDSN.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 22:58:14 -04:00