Skip to content

feat(daily-regen): default to Haiku, add spec_id + model inputs#5706

Merged
MarkusNeusinger merged 1 commit into
mainfrom
claude/daily-regen-model-config-1WxDQ
May 5, 2026
Merged

feat(daily-regen): default to Haiku, add spec_id + model inputs#5706
MarkusNeusinger merged 1 commit into
mainfrom
claude/daily-regen-model-config-1WxDQ

Conversation

@MarkusNeusinger
Copy link
Copy Markdown
Owner

Summary

Make daily-regen.yml configurable for manual runs and default the scheduled cadence to Haiku for cheaper cron ticks. The model choice now threads through every Claude step in the regen chain.

New daily-regen inputs

  • specification_id — optional. When set, regen targets that spec instead of the oldest one (mirrors /regen <spec-id> from regen.md). Validated against plots/{id}/specification.md.
  • model — choice of haiku / sonnet / opus. Default: haiku (so the schedule defaults to Haiku too).
  • count is now ignored when specification_id is set.

Model threading

The selected model is forwarded all the way through:

daily-regen  →  bulk-generate  →  impl-generate  →  impl-review  →  impl-repair
                                                       ↑                  ↓
                                                       └──── re-trigger ──┘
  • bulk-generate.yml: new model input passed to impl-generate.yml.
  • impl-generate.yml: model input drives claude_args, the generated_by metadata field (claude-{model} instead of hard-coded claude-sonnet), and the auto-retry on failure. Forwarded into impl-review via client_payload[model].
  • impl-review.yml: reads model from inputs.model or client_payload.model, uses it in claude_args, propagates it through review auto-retries and into the impl-repair dispatch.
  • impl-repair.yml: model input drives claude_args, threaded back into impl-review on re-trigger and into its own auto-retry path.

Backwards compatibility

The new model input on each impl-* workflow defaults to sonnet, so existing label-driven and manual flows continue to behave exactly as before. Only daily-regen defaults to haiku.

Test plan

  • Manual workflow_dispatch of daily-regen with no inputs → picks oldest spec, runs all libs on Haiku end-to-end (PR labels show quality:N, ai-approved/ai-rejected, metadata generated_by: claude-haiku).
  • Manual run with specification_id=<existing-spec> and model=opus → regenerates only that spec, every step runs on Opus, metadata generated_by: claude-opus.
  • Manual run with an invalid specification_id → fails fast with clear error.
  • Cron tick (or simulated dispatch with empty inputs) → still picks oldest spec, defaults to Haiku.
  • Existing label-trigger path on an issue (generate:matplotlib) → still uses Sonnet (unchanged behavior).

https://claude.ai/code/session_01YaZndtFg2hBrm6Ag2Du7Xo


Generated by Claude Code

Thread a `model` parameter (haiku / sonnet / opus) through the entire
regen chain — daily-regen → bulk-generate → impl-generate → impl-review
→ impl-repair — so a manual run can pick the model used by every Claude
step. Daily-regen also accepts an optional `specification_id` to target
a specific spec instead of the oldest one, mirroring `/regen <spec-id>`.

- daily-regen: new `specification_id` and `model` inputs (model default
  haiku); validates the override spec, passes model to bulk-generate.
- bulk-generate: new `model` input forwarded into impl-generate.
- impl-generate: new `model` input drives `claude_args`, the
  `generated_by` metadata field, and the auto-retry. Model is forwarded
  to impl-review via `client_payload[model]`.
- impl-review: reads model from input or `client_payload`, uses it in
  `claude_args`, propagates it on auto-retries and into impl-repair.
- impl-repair: new `model` input drives `claude_args` and is threaded
  back into impl-review on re-trigger and into the auto-retry path.

Default for impl-* workflows stays `sonnet` so existing label-driven
flows are unaffected.
Copilot AI review requested due to automatic review settings May 5, 2026 11:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the regen pipeline’s Claude model configurable end-to-end, defaulting scheduled daily-regen runs to Haiku for lower-cost cron executions while keeping existing label/manual flows on Sonnet by default.

Changes:

  • Added a model input (haiku/sonnet/opus) and threaded it through bulk-generate → impl-generate → impl-review → impl-repair (including repository_dispatch retriggers).
  • Added daily-regen specification_id override (validated against plots/{id}/specification.md) and made daily-regen default to Haiku.
  • Updated impl metadata generation to record generated_by: claude-{model} instead of a hard-coded claude-sonnet.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/daily-regen.yml Adds specification_id + model inputs; defaults scheduled runs to Haiku; dispatches bulk-generate with selected model.
.github/workflows/bulk-generate.yml Adds model input and forwards it into impl-generate.yml dispatches.
.github/workflows/impl-generate.yml Adds model input, uses it for claude_args, propagates via repository_dispatch, and writes generated_by accordingly.
.github/workflows/impl-review.yml Adds model input, resolves model from inputs/payload, uses it for review and forwards it into auto-retries and repair dispatch.
.github/workflows/impl-repair.yml Adds model input, uses it for repair claude_args, and threads it back into impl-review retriggers.


# Resolve model: explicit input > repository_dispatch payload > default sonnet
MODEL="${MODEL_INPUT:-${MODEL_PAYLOAD:-sonnet}}"

Comment on lines 204 to 210
LIBRARY: ${{ steps.pr.outputs.library }}
REPOSITORY: ${{ github.repository }}
RUN_ID: ${{ github.run_id }}
MODEL: ${{ steps.pr.outputs.model }}
run: |
echo "::error::AI Review did not produce valid output files (score=0)"

Comment on lines 516 to 522
LIBRARY: ${{ steps.pr.outputs.library }}
REPOSITORY: ${{ github.repository }}
RUN_ID: ${{ github.run_id }}
MODEL: ${{ steps.pr.outputs.model }}
run: |
MARKER="<!-- review-retry:${SPEC_ID}:${LIBRARY} -->"
# Paginate so the marker is found even on PRs with >30 comments.
@MarkusNeusinger MarkusNeusinger merged commit 2368bdc into main May 5, 2026
13 checks passed
@MarkusNeusinger MarkusNeusinger deleted the claude/daily-regen-model-config-1WxDQ branch May 5, 2026 15:57
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.

3 participants