@nanobpm/nano-coder 0.35.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -345,7 +345,7 @@ model where it may write.
|
|
|
345
345
|
Typing `/` at the prompt lists the commands under it, and each further character narrows the
|
|
346
346
|
list. Tab completes the command, or the part all matches share. Esc hides the list. The
|
|
347
347
|
list is built from the same table as `/help` (`src/commands.rs`). Commands with a known
|
|
348
|
-
argument set (`/model`, `/mode`, `/verbosity`) get the same treatment for their first
|
|
348
|
+
argument set (`/model`, `/mode`, `/verbosity`, `/thinking`) get the same treatment for their first
|
|
349
349
|
argument: a type-ahead list narrows as you type and Tab completes it.
|
|
350
350
|
|
|
351
351
|
- `/help` - Show available commands
|
|
@@ -379,6 +379,7 @@ argument: a type-ahead list narrows as you type and Tab completes it.
|
|
|
379
379
|
- **normal** - full tools; reaching a positive turn cap asks whether to keep going
|
|
380
380
|
- **plan** - read-only: mutating tools (`bash`, `write_file`, `edit_file`) are gated, only analysis and output
|
|
381
381
|
- **auto** - no turn cap; a `question` left unanswered for 15s is answered with "the user is away from the keyboard, make the best decision you can"
|
|
382
|
+
- `/thinking [level|default|off|reset]` - Show the thinking level in use and the levels the current model takes, or set one for this session (`reset` goes back to the configured level). See [Thinking](#thinking)
|
|
382
383
|
- `/providers` - List providers, endpoints and whether their API key is available
|
|
383
384
|
- `/session` - Show the session ID and log path
|
|
384
385
|
- `/trajectory` - Show this session's trajectory turn by turn: user input, thinking, answers, tool calls and results, tokens and timings. Each message row is labelled with its `#N` session-log ID, the same ID `history_read` and smart-compaction summaries use (compaction and crash-recovered input rows have no `#N`, as they aren't cited that way). When it doesn't fit on the screen it opens in your pager (`$PAGER`, default `less`) — but only at an idle prompt with the frame renderer: invoked mid-turn (while a turn runs) or under the legacy renderer it prints inline instead. `/trajectory --json` or `/trajectory --markdown` prints an export instead; `nano-coder --trajectory SESSION_ID [--json|--markdown]` does the same for any saved session
|
|
@@ -582,6 +583,63 @@ top-level `temperature` just doesn't apply to them. Anthropic accepts 0 to 1, so
|
|
|
582
583
|
value is sent as 1, with a warning. `/context` shows the temperature in use and where it
|
|
583
584
|
comes from, and `/settings` edits it for the current model, its provider, or all models.
|
|
584
585
|
|
|
586
|
+
### Thinking
|
|
587
|
+
|
|
588
|
+
`thinking` sets how much the model reasons before it answers: `"default"` sends nothing
|
|
589
|
+
(the model decides), `"off"` turns thinking off, and a level such as `"low"`, `"medium"`,
|
|
590
|
+
`"high"`, `"xhigh"` or `"max"` asks for that much. Like `temperature`, it can be set for all
|
|
591
|
+
models, one provider or one model, and `/thinking LEVEL` overrides them for the session:
|
|
592
|
+
|
|
593
|
+
```toml
|
|
594
|
+
thinking = "medium" # all models that support it
|
|
595
|
+
|
|
596
|
+
[providers.anthropic.models."claude-opus-4-7"]
|
|
597
|
+
thinking = "xhigh" # this model only
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
A model only gets levels it supports. They come from, in order: `thinking_levels` on the
|
|
601
|
+
model or provider; what the endpoint reports for the model; and a built-in table
|
|
602
|
+
of Claude (3.7 Sonnet and later) and OpenAI reasoning models (GPT-5 and later, o1/o3/o4).
|
|
603
|
+
Endpoints that report levels:
|
|
604
|
+
|
|
605
|
+
- **GitHub Copilot:** `/models` lists each model's levels, read with the same request as its
|
|
606
|
+
context window.
|
|
607
|
+
- **Ollama:** a model with the `thinking` capability (`/api/show`) gets `off`, `low`,
|
|
608
|
+
`medium` and `high`. Ollama refuses a level for a model without it, so none is sent then.
|
|
609
|
+
- **llama.cpp:** the loaded model's chat template (`/props`) decides. A template with an
|
|
610
|
+
`enable_thinking` switch (Qwen 3 and the like) gets `off` and `on`, and any named level
|
|
611
|
+
turns thinking on; a template that takes `reasoning_effort` (gpt-oss) gets `low`, `medium`
|
|
612
|
+
and `high`.
|
|
613
|
+
|
|
614
|
+
Ollama and llama.cpp are recognized however the provider is named, the same way as for the
|
|
615
|
+
context window. For other models, list the levels yourself:
|
|
616
|
+
|
|
617
|
+
```toml
|
|
618
|
+
[providers.together.models."deepseek-r1"]
|
|
619
|
+
thinking_levels = ["low", "medium", "high"] # add "off" if thinking can be turned off
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
A level the model lacks is moved to the nearest one it has (the highest below it, else the
|
|
623
|
+
lowest), and a model with no known levels is sent nothing. A setting for the provider, the
|
|
624
|
+
model or the session warns when it is adjusted or ignored; the top-level `thinking` doesn't
|
|
625
|
+
warn, since it applies to every model.
|
|
626
|
+
|
|
627
|
+
How the level is sent depends on the API: `reasoning_effort` (Chat Completions, Ollama
|
|
628
|
+
included; Ollama ignores its native `think` flag on `/v1`), `chat_template_kwargs` for
|
|
629
|
+
llama.cpp (`enable_thinking`, or `reasoning_effort` for templates that take a level; it
|
|
630
|
+
ignores the top-level `reasoning_effort`),
|
|
631
|
+
`reasoning.effort` (Responses), and for Anthropic Messages adaptive thinking with
|
|
632
|
+
`output_config.effort`, or on Claude 3.7 to 4.5 a fixed `budget_tokens` (1024 for minimal, then
|
|
633
|
+
2048, 8192, 16384, 32768, 65536 up to max). The budget has to stay below `max_tokens`, so raise
|
|
634
|
+
`max_tokens` to use a large one. Anthropic takes no custom temperature while thinking, so
|
|
635
|
+
none is sent then. A matching key in the provider's `extra_body` (`reasoning_effort`, `reasoning`,
|
|
636
|
+
`think`, `chat_template_kwargs`, `thinking`, `output_config`) is sent instead, with a warning; the
|
|
637
|
+
configured level is then reported as overridden (not as sent), since the override's value is what
|
|
638
|
+
reaches the wire. The status bar shows
|
|
639
|
+
`think LEVEL` while a level is sent, `/context` shows it with where it comes from,
|
|
640
|
+
`/settings` sets it for the current model, its provider or all models (picking from the
|
|
641
|
+
levels the model supports), and the session log records it for each reply.
|
|
642
|
+
|
|
585
643
|
Other per-provider fields: `replay_reasoning`, `max_tokens_param` (`max_tokens`, or `max_completion_tokens`
|
|
586
644
|
which is the `openai` default), `retry_initial_backoff_ms`, `retry_max_backoff_ms` and
|
|
587
645
|
`retryable_statuses`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanobpm/nano-coder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "A 6MB coding agent. Run a fleet on your laptop.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"node": ">=18"
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"@nanobpm/nano-coder-darwin-arm64": "0.
|
|
35
|
-
"@nanobpm/nano-coder-darwin-x64": "0.
|
|
36
|
-
"@nanobpm/nano-coder-linux-arm64": "0.
|
|
37
|
-
"@nanobpm/nano-coder-linux-x64": "0.
|
|
34
|
+
"@nanobpm/nano-coder-darwin-arm64": "0.36.0",
|
|
35
|
+
"@nanobpm/nano-coder-darwin-x64": "0.36.0",
|
|
36
|
+
"@nanobpm/nano-coder-linux-arm64": "0.36.0",
|
|
37
|
+
"@nanobpm/nano-coder-linux-x64": "0.36.0"
|
|
38
38
|
}
|
|
39
39
|
}
|