Skip to content

feat(wrapper): optional --service-tier / -ServiceTier (manifest 0.1.4) - #13

Merged
WenyuChiou merged 1 commit into
masterfrom
claude/kind-ellis-b7da66
Oct 23, 2026
Merged

WenyuChiou merged 1 commit into
masterfrom
claude/kind-ellis-b7da66

Conversation

@WenyuChiou

Copy link
Copy Markdown
Owner

What

Both wrappers accept --service-tier <value|default> (PowerShell -ServiceTier) and pass -c service_tier="<value>" to codex exec, so a delegated run can use Codex's Fast tier:

--effort ultra --service-tier fast        # PowerShell: -Effort ultra -ServiceTier fast
  • Precedence: flag, then CODEX_DELEGATE_SERVICE_TIER, then the Codex config. Same shape as --effort: lowercased, one word of letters else exit 2 before Codex runs, default passes nothing. No list of valid tiers is kept.
  • .result.json gains service_tier right after reasoning_effort. Manifest 0.1.3 -> 0.1.4.
  • -ServiceTier is declared last, so positional PowerShell calls keep their bindings. CODEX_PATH handling is unchanged.
  • Covers both script copies (scripts/ and skills/codex-delegate/scripts/, byte-identical), SKILL.md, references, both READMEs and CHANGELOG.

Evidence

Codex CLI 0.163.0, model gpt-6.1-sol: codex exec -c 'service_tier="fast"' is accepted; the session rollout recorded "service_tier":"priority" (the API name of Fast); models_cache.json lists priority / "Fast" / "2x speed, increased usage". What Codex does with an unsupported tier is not established, and the docs say so.

Tests

tests/test_wrappers.py: flag, env, flag beats env, default, invalid value (exit 2, Codex never runs), result.json, and combined with --effort, for both wrappers (and both copies for pass-through). An autouse fixture clears ambient CODEX_DELEGATE_EFFORT / CODEX_DELEGATE_SERVICE_TIER.

Local full run on a loaded Windows host: 156 passed, 6 skipped, 9 failed. 3 are the known MSYS path-form failures (recorded in 73eb7d8); 6 are test_incremental_adapter::test_quota_context[...bash] hitting their own 15 s timeout under load and pass on rerun.

Written by Antigravity; reviewed line by line plus a sonnet code-reviewer (APPROVE, one doc P2 fixed).

🤖 Generated with Claude Code

…anifest 0.1.4)

Both wrappers accept `--service-tier <value|default>` (PowerShell
`-ServiceTier`) and pass `-c service_tier="<value>"` to `codex exec`, so a
delegated run can use Codex's Fast tier (`--effort ultra --service-tier fast`).
CODEX_DELEGATE_SERVICE_TIER supplies the default when the flag is absent; the
flag wins, and `default` (or neither set) passes nothing. Same shape as
--effort: lowercased, one word of letters else exit 2 before Codex runs, no
list of valid tiers. The value is a quoted TOML string; Windows PowerShell 5.1
drops the embedded quotes when launching a native command and Codex accepts the
bare form. -ServiceTier is declared last so positional PowerShell calls keep
their bindings. result.json gains `service_tier` after `reasoning_effort`.
CODEX_PATH handling is unchanged.

- scripts/run_codex.{sh,ps1} + bundled skills/ copies (byte-identical;
  ps1 keeps CRLF)
- SKILL.md, references/{model-selection,wrapper,output-contract,
  runtime-compatibility}.md, README.md, README_zh-TW.md, CHANGELOG.md;
  .claude-plugin/plugin.json 0.1.3 -> 0.1.4
- tests/test_wrappers.py: service-tier cases for both wrappers and both copies
  (flag, env, flag beats env, `default`, invalid value, result.json, combined
  with --effort) and an autouse fixture that clears the ambient
  CODEX_DELEGATE_EFFORT / CODEX_DELEGATE_SERVICE_TIER

Tests: 156 passed, 6 skipped, 9 failed in the full suite on this loaded host.
Three failures (test_relative_brief_resolves_before_codex_changes_cwd[caller|repo],
test_portable_skill_bash_wrapper_runs_without_repository_root) are the MSYS
path-form failures already recorded for clean 8207498. Six
test_incremental_adapter::test_quota_context[...bash] cases hit their own
15 s subprocess timeout under load and pass on rerun (7 passed in 22 s).
Run with GIT_CEILING_DIRECTORIES=C:/Users/wenyu: C:\Users\wenyu is a git repo,
so the wrapper's `git status` in a pytest temp dir otherwise scans the whole
home directory and hangs.

Written by Antigravity (agy); reviewed line by line and by a code-reviewer
subagent (sonnet): APPROVE, one doc P2 fixed (unsupported-tier behaviour is
not established, so the docs no longer claim Codex rejects it).

Co-Reviewed-By: code-reviewer (sonnet) APPROVE (triggers #1, #4, multi-locale)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@WenyuChiou
WenyuChiou merged commit 6fd12cc into master Oct 23, 2026
6 checks passed
@WenyuChiou
WenyuChiou deleted the claude/kind-ellis-b7da66 branch October 23, 2026 12:29
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