Skip to content

Fix model catalog gen - #37

Merged
sanchitrk merged 3 commits into
devfrom
fix-model-catalog-gen
Sep 23, 2026
Merged

sanchitrk merged 3 commits into
devfrom
fix-model-catalog-gen

Conversation

@sanchitrk

Copy link
Copy Markdown
Contributor

No description provided.

sanchitrk and others added 3 commits September 23, 2026 15:41
Add Model.configureCatalog, Model.catalogPath and Model.reloadCatalog so a
long-running process can keep models.gen.json outside its cwd and pick up a
regenerated file. generateModels now fetches models.dev on every call,
writes the catalog atomically, and fails on a non-OK response.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Categories sent in session.execution.failed become full, kebab-case names
ending in -error, e.g. provider.auth -> provider-authentication-error and
model.not-found -> model-not-found-error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The catalog now lives at <home>/models.gen.json. Local commands refresh it
when it is missing or older than CODEWORK_MODELS_TTL (15 minutes); the
server re-checks every minute and reloads the file whenever it changes.
A failed download keeps the previous catalog, and CODEWORK_MODELS_FILE
pins a user-managed file that is never refreshed automatically.

`codework models generate [path]` is replaced by `codework models refresh
[--force]`. CLI error tags become kebab case, e.g.
error[provider-authentication-error] and error[model-catalog-missing].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sanchitrk
sanchitrk merged commit 3532957 into dev Sep 23, 2026
@sanchitrk
sanchitrk deleted the fix-model-catalog-gen branch September 23, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant