coli: honor THINK=1 in run mode#402
Merged
Merged
Conversation
coli run hardcoded the nothink template (<|assistant|><think></think>), so THINK=1 had no effect in one-shot runs while serve mode honors it (glm.c serve template picks <think> vs <think></think> from the same env var). Pick the template the same way here. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
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
coli runhardcodes the nothink template β<|assistant|><think></think>β soTHINK=1silently has no effect in one-shot runs: the reasoning block is pre-closed before the engine sees a token. Serve mode already picks the template from the env inglm.c(getenv("THINK") && atoi(...) ? "<think>" : "<think></think>"). This PR makescmd_runpick it the same way: two lines, default unchanged (nothink), and ENVIRONMENT.md's "THINK=1turns on visible reasoning" now holds forrunthe way it does for serve.Noticed on a DGX Spark GB10 while batch-running long planning prompts through
coli run: outputs consistently opened with an empty<think></think>despiteTHINK=1in the environment. With the patch the model emits its reasoning block; we've been running exactly this change locally for multi-hour THINK batches on the 744B model today.coli chatneeds no change β it hands the raw text to the engine, whose template already honorsTHINK.Validation
make -C c checkβ clean build, C unit tests, and the Python suite (73 tests) green on this branch (aarch64, gcc 13.3)Compatibility
os.environonly)π€ Generated with Claude Code