Skip to content

feat: orden del catalogo y bloqueo de modelos ajenos (v1.0.3) - #4

Merged
JoshRob297 merged 1 commit into
mainfrom
feat/catalog-order-and-merge-guard
Oct 19, 2026
Merged

JoshRob297 merged 1 commit into
mainfrom
feat/catalog-order-and-merge-guard

Conversation

@JoshRob297

Copy link
Copy Markdown
Owner

Orden en el selector

El picker ordena por (badge Free, fecha de release, titulo). El plugin ahora escribe:

  • cost con input en cero para los promo → badge Free y costo real en cero.
  • time.released codificando (rango de familia, recencia de la version).

Resultado: promo primero, familias agrupadas y, dentro de cada familia, la version mas nueva primero. Verificado en la TUI real.

Bloqueo de modelos ajenos

models.dev publica su propio provider commandcode y OpenCode lo mergea con el configurado. Ese merge reintrodujo los 11 claude-* de forma Anthropic, que responden 400 unsupported_model en el transporte compatible con OpenAI. El transform ahora desactiva todo modelo del provider que no este en el catalogo curado.

Cambios

  • src/catalog.ts: helpers puros (familia, version, release date, free) y fuente unica de isFreeModel.
  • src/index.ts: draft.time, draft.cost y guard del merge.
  • Tests: el applyModelCatalog original restaurado, mas suites nuevas de orden y del guard.
  • Docs EN/ES: orden y modelos ajenos.

Verificacion

  • bun test: 84 pass / 3 skip / 0 fail
  • bun run typecheck limpio
  • En vivo: commandcode 84 modelos (0 claude), 5 free con badge, google 4

Ordering: the picker sorts by (Free badge, release date, title). The plugin now writes
a zeroed cost entry for promo models (grants the Free badge and reports their real cost
as zero) and a release timestamp that encodes the family rank plus the version recency.
Promo models come first, then families are grouped and each family lists its newest
version first.

Merge guard: models.dev publishes its own commandcode provider, which OpenCode merges
with the configured one. That merge reintroduced the Anthropic-shaped claude-* models
that answer 400 unsupported_model on the OpenAI-compatible transport. The transform now
disables any provider model that is not in the curated set.

Also: src/catalog.ts with the classification helpers (single source for isFreeModel),
the original applyModelCatalog tests restored, and new suites for the ordering and the
merge guard.
@JoshRob297
JoshRob297 merged commit e4ee5d3 into main Oct 19, 2026
1 check passed
@JoshRob297
JoshRob297 deleted the feat/catalog-order-and-merge-guard branch October 19, 2026 22:33
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