Skip to content

config: forward any model name to the harness CLI - #1294

Merged
max-sixty merged 2 commits into
mainfrom
model-passthrough
Sep 18, 2026
Merged

max-sixty merged 2 commits into
mainfrom
model-passthrough

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

A consumer wanted model: claude-opus-5 so their bot's behavior stays fixed when Anthropic promotes the next model behind the opus alias, and found the route closed: KNOWN_MODELS_BY_HARNESS listed opus, sonnet, haiku and nothing else, so init refused the exact id. Codex, by the same dict, got no model validation at all — any string passed. Both CLIs accept an alias or an exact id, and either catalog can gain a model the generator has not heard of, so the allowlist bought a typo check at the price of a pin, for one harness.

Neither harness enumerates models now. model must be a non-empty string; beyond that claude and codex exec judge the name, which is the only place that knows the current catalog. A typo now fails the job rather than init — claude -p --model opsu exits 1 with [claude-code:unrecognized_model] {"model":"opsu"}, naming the bad value.

_parse_effort loses its model argument, and with it the effort + model: haiku refusal. That guard matched one spelling of one model — claude-haiku-4-5-20251001 with effort: low already walked past it — so once exact ids are legal the same configuration would be accepted or refused depending on how it was written. The Claude CLI takes --effort low --model haiku at exit 0, ignoring the level rather than failing, so nothing outward depended on it. Effort is still checked against the harness, including for a workflow that switches harness and inherits the top-level value; the new test_inherited_effort_rejected_when_a_workflow_switches_harness covers that path, which previously rode along with the model checks.

_effective_model becomes effective_model: dropping the per-workflow cross-family check leaves workflows.py as its only caller, and it was the package's one cross-module underscore import.

install-tend's config template said the same thing about max and is what writes a new consumer's .config/tend.yaml, so it moves too.

Nothing downstream reads the model string — shared/steps/token_usage.py copies it into the usage record, and checks.py and the site never see it — so the only consumer is the --model flag. docs/tend.example.yaml (with its install-tend mirror) and the README's effort line say what the values are now.

This is the half of a consumer's request that #1161 left open; the effort input shipped there.

This was written by Claude Code on behalf of max-sixty

`KNOWN_MODELS_BY_HARNESS` enumerated `opus`, `sonnet`, `haiku` for Claude and
nothing for Codex, so `init` refused `model: claude-opus-5` — the exact id a
consumer pins to keep a bot's behavior fixed across a provider promotion — while
accepting any string at all under Codex. Both CLIs take an alias or an exact id,
and either catalog can gain a model the generator has not heard of, so the
allowlist bought a typo check at the price of a pin. Neither harness enumerates
models now: the value must be a non-empty string, and `claude` or `codex exec`
judges the name. A typo fails the job with the CLI naming it
(`[claude-code:unrecognized_model]`, exit 1) rather than failing `init`.

`_parse_effort` loses its `model` argument and the `effort` + `model: haiku`
refusal with it. That guard matched one spelling of one model, so
`claude-haiku-4-5-20251001` with `effort: low` already walked past it — and once
exact ids are legal, the same configuration is accepted or refused depending on
how it is written. The Claude CLI takes `--effort low --model haiku` at exit 0,
ignoring the level rather than failing, so nothing outward depends on the check.
Effort is still validated against the harness, including for a workflow that
switches harness and inherits the top-level value.

`_effective_model` is now `effective_model`: dropping the cross-family check
leaves `workflows.py` as its only caller, and it was the package's one
cross-module underscore import.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

plugins/install-tend/skills/install-tend/SKILL.md's config template still reads # effort: medium # low | medium | high | xhigh; Claude Opus/Sonnet also accept max — the claim this diff rewrote in the README and in both tend.example.yaml copies. With _parse_effort's haiku guard gone it is the only text left in the repo asserting model-specific effort support, and it ships: that skill is what writes a new consumer's .config/tend.yaml, so an install reads max as Opus/Sonnet-only while the generator now accepts the pair and the example config stamped next to it says otherwise. It's outside this diff — say the word and I'll push the one-line fix onto this branch.

Comment thread generator/tests/test_generate.py Resolved
…t note

The new `workflows.<name>.model` string check had no test while its
top-level twin had four cases; an uncaught list or int would have reached
the template and rendered `model: ['opus']` into a consumer's workflow.
Bare `model:` stays out of the cases — at workflow level it reads as
inherit, the same as `prompt:`.

`install-tend`'s config template still said effort's `max` was
Opus/Sonnet-only, the claim this branch dropped everywhere else. It ships:
that template is what writes a new consumer's `.config/tend.yaml`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit ef88e06 into main Sep 18, 2026
13 checks passed
@max-sixty
max-sixty deleted the model-passthrough branch September 18, 2026 00:58
@max-sixty max-sixty mentioned this pull request Sep 18, 2026
max-sixty added a commit that referenced this pull request Sep 18, 2026
Version bump, lockfile, and the `## 0.2.11` section the release workflow
publishes verbatim as the GitHub Release notes.

19 commits since 0.2.10. The headline is the skills change that just
landed: the twelve cross-cutting `references/` files are now skills in
their own right and `running-in-ci` is `run-tend`, so the harness's
skill listing — which fires on the action rather than on picking a task
— is the index ([#1305](#1305),
[#1306](#1306)). Alongside it:
`model:` forwards any name to the harness CLI so a consumer can pin an
exact id ([#1294](#1294)),
`install-tend` hands the OAuth mint to the user and drops the pty
wrapper ([#1295](#1295)), the
sandbox boundary's Ubuntu and npm packages resolve as of one recorded
instant ([#1289](#1289),
[#1291](#1291)), and `tend check`
can verify release immutability from the releases when it lacks admin —
a check that had never produced a verdict in a scheduled run
([#1290](#1290)).

Each bullet was written from the commit's diff rather than its subject.

> _This was written by Claude Code on behalf of max-sixty_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.

2 participants