Skip to content

fix(claude): omit --model in completeOneShot when alias resolves empty#3

Open
Antisophy wants to merge 1 commit into
CyberShadow:masterfrom
Antisophy:fix/completeoneshot-empty-model-alias
Open

fix(claude): omit --model in completeOneShot when alias resolves empty#3
Antisophy wants to merge 1 commit into
CyberShadow:masterfrom
Antisophy:fix/completeoneshot-empty-model-alias

Conversation

@Antisophy

@Antisophy Antisophy commented Jun 17, 2026

Copy link
Copy Markdown

Problem

completeOneShot (title generation) passes --model resolveModelAlias(modelClass) unconditionally. An empty model_aliases entry makes resolveModelAlias return "", so it runs claude --model "" and fails with API Error 400 ("String should have at least 1 character"), surfacing as failed to generate title: claude exited with status 1. The session-spawn path already guards this (config.model.length > 0); completeOneShot is the one spot that doesn't.

Motivation

After Fable 5 was shut down I wanted cydo to stop pinning a model and instead defer to claude's own configured default, so it would fall back gracefully rather than stay pointed at an unavailable model. The way to express that is empty model_aliases entries, but that config wasn't actually runnable: completeOneShot passed --model "" and broke title generation on the next cydo task I started. This PR's change is what makes the empty-alias / defer-to-claude config work end to end.

Fix

Append --model only when the resolved model is non-empty (matching the session-spawn guard), and collapse the duplicated cmdPrefix / non-cmdPrefix arg lists into one.

the session spawn path guards with config.model.length > 0, letting an
empty model_aliases entry suppress the flag so claude falls back to its
own configured default; completeOneShot (used for title generation)
passed --model unconditionally, so an empty alias produced
`claude --model ""` which fails with API Error 400 ("String should
have at least 1 character") and surfaced as "failed to generate title:
claude exited with status 1"
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