Repository navigation
Model registration: never ask questions while serving - #2597
Merged
Merged
Conversation
The duplicate and name-conflict questions are asked only when can_prompt() is true: stdin is a terminal and the process is not serving. run_advertised serves inside prompts_disabled(), so a model added through the GUI or the API takes the non-interactive answer instead of aborting at the server's console. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n-server # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adding a folder of models from the GUI failed as soon as one file was already registered under another name: the server asked "already registered as ... [a]lias / [c]opy / ..." on its own console window, nobody answered, the prompt aborted and the whole add was reported as failed.
The registration questions now check
can_prompt(): stdin is a terminal and the process is not serving.run_advertised(bothlocalm serveandlocalm gui) serves insideprompts_disabled(), so a model added through the GUI or the API takes the existing non-interactive answer (a duplicate is skipped with a note, the rest of the folder is registered). The terminal CLI still asks.🤖 Generated with Claude Code