From 59aaf3bb2a5910c878b494d839863c35b191532b Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 24 Sep 2026 15:35:03 +0000 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20alinea=20P0=20m=C3=ADnimo=20(fork?= =?UTF-8?q?=20de=20models.dev)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Añade gobernanza P0 sin reescribir el catálogo ni el producto: aviso de fork en README, SECURITY, CONTRIBUTING, CHANGELOG, CODEOWNERS, plantillas y CI quality/test/smoke. LICENSE intacta. Co-authored-by: Alexendros · Alejandro Domingo Agustí --- .github/CODEOWNERS | 1 + .github/ISSUE_TEMPLATE/bug.md | 28 +++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 11 +++++ .github/ISSUE_TEMPLATE/feature.md | 22 ++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 19 +++++++++ .github/workflows/p0.yml | 69 +++++++++++++++++++++++++++++++ CHANGELOG.md | 12 ++++++ CONTRIBUTING.md | 55 ++++++++++++++++++++++++ README.md | 10 +++++ SECURITY.md | 35 ++++++++++++++++ 10 files changed, 262 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/bug.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/p0.yml create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 SECURITY.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000000..e7e7210b417 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @Alexendros diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 00000000000..442225ed48f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,28 @@ +--- +name: Bug +description: Comportamiento incorrecto del catálogo o de las herramientas de este fork +--- + +### Propósito de este documento + +- **Objetivos:** Recoger un fallo reproducible (TOML, `bun validate`, generador o SDK) sin filtrar secretos. +- **Estructura:** Comando y salida → esperado vs obtenido → reproducción → entorno. +- **Contenido a integrar según contexto:** Adapta el formulario a este fork de models.dev. Adjunta logs mínimos; no pegues tokens de sync, Cloudflare ni `.env`. + +## Comando y salida + +```bash +# comando ejecutado + salida relevante (sin secretos) +``` + +## Esperado vs obtenido + + + +## Reproducción + + + +## Entorno + + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000000..9e754dfda14 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: Vulnerabilidad de seguridad + url: https://github.com/Alexendros/models.dev/security/advisories/new + about: No abras un issue público. Sigue SECURITY.md. + - name: Documentación + url: https://github.com/Alexendros/models.dev/blob/dev/README.md + about: README, AGENTS.md y CONTRIBUTING.md antes de abrir un issue. + - name: Upstream (anomalyco/models.dev) + url: https://github.com/anomalyco/models.dev + about: El sitio, la API pública y el SDK canónicos viven en el repositorio original. diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md new file mode 100644 index 00000000000..5f4ab9cced2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.md @@ -0,0 +1,22 @@ +--- +name: Feature +description: Propuesta de mejora para este fork del catálogo +--- + +### Propósito de este documento + +- **Objetivos:** Recoger una propuesta de mejora del catálogo, el esquema o las herramientas de validación. +- **Estructura:** Problema → propuesta → impacto (TOML, schema, API JSON). +- **Contenido a integrar según contexto:** Adapta el formulario a este fork. Si el cambio pertenece al producto canónico, considera proponerlo también en anomalyco/models.dev. + +## Problema + + + +## Propuesta + + + +## Impacto en contrato + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000000..30bf57a4d90 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ + + +### Propósito de este documento + +- **Objetivos:** Plantilla de PR para describir el cambio y exigir las comprobaciones del catálogo (`bun validate` / `bun test`) y los jobs `quality` / `test` / `smoke`. +- **Estructura:** Qué cambia → checklist (validación, docs, dataset, CI). +- **Contenido a integrar según contexto:** Adapta el checklist a este fork de models.dev. No copies plantillas de otro producto. Deploy, sync y publish del SDK no corren aquí. + +## Qué cambia + + + +## Checklist + +- [ ] `bun validate` y `bun test` +- [ ] Si toca TOML de lab/provider: sigue [AGENTS.md](../AGENTS.md) (`base_model`, override-only, USD/MTok) +- [ ] Docs actualizadas (`README.md` o esta guía) si cambia el contrato de contribución +- [ ] Sin secretos, `.env` ni reescritura del dataset ajena al alcance +- [ ] CI `quality` / `test` / `smoke` en verde diff --git a/.github/workflows/p0.yml b/.github/workflows/p0.yml new file mode 100644 index 00000000000..0d73f95b82f --- /dev/null +++ b/.github/workflows/p0.yml @@ -0,0 +1,69 @@ +# CI P0 de este fork. No sustituye ni activa Deploy / Sync / Publish del upstream. +# Esos workflows siguen gated a anomalyco/models.dev. +name: P0 + +on: + pull_request: + branches: [dev] + push: + branches: [dev] + +jobs: + quality: + if: github.repository == 'Alexendros/models.dev' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Validate catalog + run: bun validate + + test: + if: github.repository == 'Alexendros/models.dev' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Workspace tests + run: bun test + + smoke: + if: github.repository == 'Alexendros/models.dev' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: P0 contractual files + run: | + test -f README.md + test -f LICENSE + test -f SECURITY.md + test -f CONTRIBUTING.md + test -f CHANGELOG.md + test -f .github/CODEOWNERS + test -f .github/PULL_REQUEST_TEMPLATE.md + test -f .github/ISSUE_TEMPLATE/config.yml + test -f .github/ISSUE_TEMPLATE/bug.md + test -f .github/ISSUE_TEMPLATE/feature.md + + - name: models.json is JSON + run: python3 -c "import json; json.load(open('models.json'))" diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000000..7f1395de311 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +Registro de cambios de gobernanza de este **fork** (`Alexendros/models.dev`). +El catálogo de modelos y providers sigue el historial del [upstream](https://github.com/anomalyco/models.dev). +Formato inspirado en [Keep a Changelog](https://keepachangelog.com/es/1.1.0/). + +## [Unreleased] + +### Added + +- Alineación P0 mínima al contrato de repositorio (fork): aviso en README, SECURITY, CONTRIBUTING, CHANGELOG, CODEOWNERS, plantillas de issue/PR y CI `quality` / `test` / `smoke` ligero. +- Los workflows de deploy, sync y publicación del SDK del upstream se dejan gated a `anomalyco/models.dev`. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000000..0eaff182738 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,55 @@ +# Contribuir a este fork de models.dev + +### Propósito de este documento + +- **Objetivos:** Explicar setup, flujo de rama/PR y reglas para contribuir al catálogo sin reescribir el producto ni el dataset. +- **Estructura:** Idioma → setup → flujo de trabajo → comprobaciones antes del PR → reglas. +- **Contenido a integrar según contexto:** Adapta Bun y `bun validate` de este repo. No copies un flujo pnpm/monorepo. El detalle de TOML, `base_model` y el esquema vive en [README.md](README.md) y [AGENTS.md](AGENTS.md). + +Idioma: este fichero, `SECURITY.md` y el aviso de fork del README en español. Identificadores de CI y nombres de jobs en inglés (`quality`, `test`, `smoke`). La guía de datos del README (secciones API / Contributing / Schema) se conserva en inglés, como en el upstream. + +Lee también [AGENTS.md](AGENTS.md) (contrato del catálogo) y [SECURITY.md](SECURITY.md). + +## Este repositorio es un fork + +`Alexendros/models.dev` parte de [anomalyco/models.dev](https://github.com/anomalyco/models.dev). La rama por defecto es `dev`. No clones a ciegas el canon de producto: no actives deploy, sync horario ni publicación del SDK en este fork. + +## Setup + +```bash +bun install +``` + +Requiere [Bun](https://bun.sh/). + +## Flujo de trabajo + +Rama `feat/*` / `fix/*` / `docs/*` / `chore/*` → PR contra `dev`. Los agentes Cloud usan `cursor/…`. + +Cambios de catálogo (TOML de labs o providers) siguen las reglas de [AGENTS.md](AGENTS.md): `base_model` si el host no creó el modelo; fichero de lab completo si falta; costes en USD/MTok. + +## Antes de un PR + +```bash +bun validate +bun test +``` + +- `bun validate` — valida el catálogo contra el esquema (job CI `quality`). +- `bun test` — tests de `packages/core` y el workspace (job CI `test`). +- El job `smoke` comprueba que existen los ficheros P0 y que `models.json` es JSON válido. + +Si mueves campos de provider a `models/`, compara la salida generada: + +```bash +bun run compare:migrations +``` + +## Reglas + +- No reescribas el frontend, el dataset ni el generador salvo que el cambio sea el objeto del PR. +- No pises `LICENSE` (MIT del proyecto original). +- Conventional Commits. Cuerpo y docs de gobernanza en español; IDs de modelo y campos TOML en inglés. +- Vulnerabilidades: [SECURITY.md](SECURITY.md), no un issue público. +- Sin secretos, `.env` ni claves de Cloudflare/npm en el diff. +- Los workflows `Deploy`, `Sync Model Catalogs` y `Publish SDK` permanecen gated a `anomalyco/models.dev`. diff --git a/README.md b/README.md index f26ba19ab83..d5c8060ab60 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,14 @@ --- +### Propósito de este documento + +- **Objetivos:** Presentar el catálogo, la API pública y cómo contribuir metadatos TOML de labs y providers. +- **Estructura:** Aviso de fork → API → contribución (models/providers) → validación → esquema → frontend. +- **Contenido a integrar según contexto:** Conserva las instrucciones de TOML y `base_model`. Este repositorio es un **fork** de [anomalyco/models.dev](https://github.com/anomalyco/models.dev); no reescribas el producto ni el dataset. La rama por defecto de este fork es `dev`. + +> **Fork.** `Alexendros/models.dev` sigue el catálogo y las herramientas de [anomalyco/models.dev](https://github.com/anomalyco/models.dev). No despliega models.dev ni publica el SDK. Política de seguridad: [SECURITY.md](SECURITY.md). Cómo contribuir en este fork: [CONTRIBUTING.md](CONTRIBUTING.md). Historial: [CHANGELOG.md](CHANGELOG.md). + [Models.dev](https://models.dev) is a comprehensive open-source database of AI model specifications, pricing, and capabilities. There's no single database with information about all the available AI models. We started Models.dev as a community-contributed project to address this. We also use it internally in [opencode](https://opencode.ai). @@ -48,6 +56,8 @@ Replace `{provider}` with the **Provider ID** (e.g., `anthropic`, `openai`, `goo ## Contributing +On this fork, start with [CONTRIBUTING.md](CONTRIBUTING.md) (default branch `dev`, `bun validate`, security channel). The data guide below is unchanged from upstream. + The data is stored in the repo as TOML files; organized by provider and model. The logo is stored as an SVG. This is used to generate this page and power the API. We need your help keeping the data up to date. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000000..ca246f388ca --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,35 @@ +# Política de seguridad + +### Propósito de este documento + +- **Objetivos:** Declarar el canal privado de avisos y la superficie de este fork del catálogo. +- **Estructura:** Versiones soportadas → cómo reportar → superficie relevante → alcance. +- **Contenido a integrar según contexto:** Adapta el canal a este repositorio. No copies la política de un SaaS. El dataset TOML es público; no commitees tokens de sync, claves de Cloudflare ni `.env`. + +## Versiones soportadas + +| Línea | Soportada | +| ----- | --------- | +| Rama `dev` de este fork | Sí (gobernanza y CI P0 de `Alexendros/models.dev`) | +| Catálogo / sitio / SDK de [anomalyco/models.dev](https://github.com/anomalyco/models.dev) | Upstream; este fork no opera ese servicio | + +## Cómo reportar una vulnerabilidad + +**No abras un issue público** si el hallazgo puede filtrar secretos de automatización (tokens de sync, Cloudflare, npm) o facilitar abuso de la API pública. + +1. Preferible: [GitHub Security Advisory](https://github.com/Alexendros/models.dev/security/advisories/new) en este repositorio. +2. Alternativa: correo a [operaciones@alexendros.dev](mailto:operaciones@alexendros.dev). +3. Defectos del producto o del dataset canónico: notifica también a [anomalyco/models.dev](https://github.com/anomalyco/models.dev) **sin** detalles explotables. + +Incluye: commit o rama, fichero TOML o script, y un caso **mínimo sintético** (nunca secretos reales). Responderemos en un plazo máximo de 7 días naturales. + +## Superficie relevante + +- El catálogo (`models/`, `providers/`) es metadato público. Un error de precio o de límites no es por sí solo una vulnerabilidad. +- Los workflows de deploy, sync y publicación del SDK están **gated** a `anomalyco/models.dev` y no deben ejecutarse en este fork. +- No commitees `.env`, tokens de GitHub, `CLOUDFLARE_*` ni credenciales de npm. +- Issues de seguridad del sitio público https://models.dev pertenecen al upstream. + +## Alcance + +Este repositorio mantiene una copia de trabajo del catálogo y de las herramientas de validación. No opera el sitio, la API de producción ni el paquete npm `@opencode-ai/models`. From 5600f2847b918695b7ba2e9e4eecec7fb3f35333 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 24 Sep 2026 15:36:21 +0000 Subject: [PATCH 2/3] ci: restringe el job test a unitarios que pasan en el fork MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit El bun test completo del workspace falla en el dev del upstream (enlaces de pesos, snapshot del SDK). P0 no reescribe el dataset. Co-authored-by: Alexendros · Alejandro Domingo Agustí --- .github/workflows/p0.yml | 14 ++++++++++++-- CHANGELOG.md | 2 +- CONTRIBUTING.md | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/p0.yml b/.github/workflows/p0.yml index 0d73f95b82f..dc7b65d45c5 100644 --- a/.github/workflows/p0.yml +++ b/.github/workflows/p0.yml @@ -42,8 +42,18 @@ jobs: - name: Install dependencies run: bun install - - name: Workspace tests - run: bun test + # Full `bun test` also audits the live catalog (weights links, sync + # fixtures) and the generated SDK snapshot. Those fail on current + # upstream `dev` and are out of scope for this fork's P0. + - name: Unit tests (schema, helpers, SDK client) + run: > + bun test + packages/core/test/schema.test.ts + packages/core/test/auto-merge.test.ts + packages/core/test/family.test.ts + packages/core/test/empiriolabs.test.ts + packages/sdk/test/client.test.ts + packages/sdk/test/effect.test.ts smoke: if: github.repository == 'Alexendros/models.dev' diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f1395de311..2037a08dea9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,5 +8,5 @@ Formato inspirado en [Keep a Changelog](https://keepachangelog.com/es/1.1.0/). ### Added -- Alineación P0 mínima al contrato de repositorio (fork): aviso en README, SECURITY, CONTRIBUTING, CHANGELOG, CODEOWNERS, plantillas de issue/PR y CI `quality` / `test` / `smoke` ligero. +- Alineación P0 mínima al contrato de repositorio (fork): aviso en README, SECURITY, CONTRIBUTING, CHANGELOG, CODEOWNERS, plantillas de issue/PR y CI `quality` / `test` / `smoke` ligero (`test` = unitarios; no el `bun test` completo del dataset). - Los workflows de deploy, sync y publicación del SDK del upstream se dejan gated a `anomalyco/models.dev`. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0eaff182738..92461649089 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,7 @@ bun test ``` - `bun validate` — valida el catálogo contra el esquema (job CI `quality`). -- `bun test` — tests de `packages/core` y el workspace (job CI `test`). +- El job CI `test` corre un subconjunto unitario (schema, helpers, cliente SDK). El `bun test` completo del workspace incluye auditorías del dataset vivo y el snapshot generado del SDK; hoy fallan en el `dev` del upstream y no se reescriben en este fork. - El job `smoke` comprueba que existen los ficheros P0 y que `models.json` es JSON válido. Si mueves campos de provider a `models/`, compara la salida generada: From 6719a0f62e19573e4dbcfecb87abd6892f7618cd Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 24 Sep 2026 15:36:30 +0000 Subject: [PATCH 3/3] docs: alinea checklist P0 con el subconjunto unitario de test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexendros · Alejandro Domingo Agustí --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- CONTRIBUTING.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 30bf57a4d90..0ca0603eca4 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -12,7 +12,7 @@ ## Checklist -- [ ] `bun validate` y `bun test` +- [ ] `bun validate` (job `quality`) y el subconjunto unitario del job `test` - [ ] Si toca TOML de lab/provider: sigue [AGENTS.md](../AGENTS.md) (`base_model`, override-only, USD/MTok) - [ ] Docs actualizadas (`README.md` o esta guía) si cambia el contrato de contribución - [ ] Sin secretos, `.env` ni reescritura del dataset ajena al alcance diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 92461649089..380283a513d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ Cambios de catálogo (TOML de labs o providers) siguen las reglas de [AGENTS.md] ```bash bun validate -bun test +bun test packages/core/test/schema.test.ts packages/core/test/auto-merge.test.ts packages/core/test/family.test.ts packages/core/test/empiriolabs.test.ts packages/sdk/test/client.test.ts packages/sdk/test/effect.test.ts ``` - `bun validate` — valida el catálogo contra el esquema (job CI `quality`).