Skip to content

Fix per-prompt model selection for headless runs - #197

Merged
kingsword09 merged 1 commit into
kingsword09:mainfrom
kevingatera:fix/headless-model
Oct 7, 2026
Merged

kingsword09 merged 1 commit into
kingsword09:mainfrom
kevingatera:fix/headless-model

Conversation

@kevingatera

@kevingatera kevingatera commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Headless prompts have no per-run model option. zcode --model provider/model --prompt ... fails with an unknown-option error, so choosing Flash requires changing the saved default.

Changes

Add --model <provider/model> for --prompt and -p. The launcher passes the choice to the runtime, which applies it after restoring the session and before submitting the prompt. The selection is transient, so the saved default stays unchanged. Unknown models fail before a request is sent.

Verification

On Linux, explicit GLM-5.3 and GLM-5.3-Flash prompts both returned ok. The CLI usage DB recorded the requested model through account:zai-individual-coding-plan, with status completed. CLI provider configuration and Desktop credential/config files stayed unchanged. An unavailable provider/model failed without falling back.

Focused tests, all 20 Node tests, typecheck, runtime checks, and independent review passed.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

pkg-pr-new preview for commit e69299609cfc8f8724f92fe1c04cc5b2dc8944d1.

npx --yes https://pkg.pr.new/zcode-app-cli@e692996

Full repository URL

This preview uses the selected commit. PR updates publish automatically after CI succeeds; kingsword09 can also request a preview with /pkg-pr-new.

Workflow logs

@kevingatera
kevingatera marked this pull request as ready for review October 7, 2026 02:40
@kingsword09
kingsword09 merged commit ddfcc36 into kingsword09:main Oct 7, 2026
6 checks passed
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