Skip to content

CI: non-hermetic pi-fork build breaks check (models.generated.ts drifts against pinned OpenAIResponsesCompat) #160

Description

@pdettori

Summary

The check CI job fails at the Build pi-fork (type declarations) step on main (and consequently on every PR branch) because pi-fork/packages/ai regenerates src/models.generated.ts from the live models.dev API at build time, and the freshly generated file no longer typechecks against pi-fork's pinned types.

src/models.generated.ts(10662,13): error TS2353: Object literal may only specify
known properties, and '"supportsReasoningEffort"' does not exist in type 'OpenAIResponsesCompat'.

Root cause

The build script runs:

npm run generate-models && npm run generate-image-models && tsgo -p tsconfig.build.json

scripts/generate-models.ts fetches from models.dev on every build (Loaded 633 tool-capable models from models.dev) and overwrites src/models.generated.ts. models.dev has since added a supportsReasoningEffort field that pi-fork's pinned OpenAIResponsesCompat type does not declare — so tsgo rejects the generated literal. Because the file is regenerated from a live external API, this broke retroactively with no code change: the build is non-hermetic.

Evidence / timeline

main CI (workflow CI):

Date Result
2026-08-04 ✅ success
2026-08-20 (run 32408167817) ❌ failure — same supportsReasoningEffort error

The models.dev drift landed in that window. The job dies at this step, so the downstream Typecheck and Test steps never run — meaning harness unit tests are currently not executed in CI at all.

Impact

Proposed fixes (pick one)

  1. Make the build hermetic — commit models.generated.ts (and image-models.generated.ts) and drop the live generate-models call from the build script; regenerate deliberately via a separate, reviewed step. (preferred — removes the whole class of failure)
  2. Widen the pinned type — add supportsReasoningEffort?: boolean to OpenAIResponsesCompat so generated data validates.
  3. Pin the models.dev snapshot — vendor a fixed models.dev dataset instead of fetching live at build time.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions