diff --git a/docs/content/docs/subagents.mdx b/docs/content/docs/subagents.mdx index 68719e7..cab08a8 100644 --- a/docs/content/docs/subagents.mdx +++ b/docs/content/docs/subagents.mdx @@ -137,7 +137,7 @@ section of the Subagents card) or under `subagent_summary` in `config.yml`: | `enabled` | `true` | Off falls back to a crude first-line truncation (no LLM call) | | `provider` | `deepseek` | Inference provider for the summary | | `model` | `deepseek-v4-flash` | Fast + cheap is ideal for this distillation | -| `thinking_level` | `""` | `""` (off) / `low` / `medium` / `high` for reasoning models | +| `thinking_level` | `""` | `""` (off) / `low` / `medium` / `high` / `max` for reasoning models | Synchronous spawns are unaffected — the agent gets the full result inline as the tool result and weaves it into its own reply. diff --git a/humux/api/templates/agent_editor.html b/humux/api/templates/agent_editor.html index 4e305aa..d24ff11 100644 --- a/humux/api/templates/agent_editor.html +++ b/humux/api/templates/agent_editor.html @@ -151,9 +151,10 @@
+ x-show="['low','medium','high','max'].includes(llmThinking) && !window.llmModelSupportsThinking(llmModel || llmDefaults.model)"> Heads up: “” isn't a recognized reasoning model — only set a level if you know it supports thinking.
diff --git a/humux/api/templates/base.html b/humux/api/templates/base.html index fa5933e..12cdb2d 100644 --- a/humux/api/templates/base.html +++ b/humux/api/templates/base.html @@ -435,7 +435,7 @@ levelOptions(prov) { const fetched = this.fetchedLevels[prov]; if (fetched && fetched.length) return fetched; - return ['low', 'medium', 'high']; + return ['low', 'medium', 'high', 'max']; }, fetchThinkingLevels(service, model) { const apiKey = this.keyFor(service); diff --git a/humux/core/agents.py b/humux/core/agents.py index fa6a486..eb967c8 100644 --- a/humux/core/agents.py +++ b/humux/core/agents.py @@ -373,7 +373,7 @@ def _as_group_chat(value: object) -> dict: } -_LLM_THINKING_LEVELS = ("", "low", "medium", "high") +_LLM_THINKING_LEVELS = ("", "low", "medium", "high", "max") def _as_llm_config(value: object) -> dict: diff --git a/humux/core/config.py b/humux/core/config.py index 6cb3590..1739a6a 100644 --- a/humux/core/config.py +++ b/humux/core/config.py @@ -93,7 +93,7 @@ class AgentConfig(BaseModel): openrouter_api_key: str = "" openrouter_base_url: str = "" model: str = "deepseek-v4-flash" - thinking_level: str = "" # "" (off) | "low" | "medium" | "high" — only for reasoning models + thinking_level: str = "" # "" (off) | "low" | "medium" | "high" | "max" # Hard ceiling on tokens the model may emit per response. The agentic loop # truncates mid-tool-call when this is too small for the output (e.g. a large # file written via the write tool), so keep it generous. 16384 is safe across providers; @@ -278,8 +278,8 @@ class MemoryConfig(BaseModel): extraction_model: str = "deepseek-v4-flash" consolidation_provider: str = "deepseek" consolidation_model: str = "deepseek-v4-flash" - extraction_thinking_level: str = "" # "" (off) | "low" | "medium" | "high" - consolidation_thinking_level: str = "" # "" (off) | "low" | "medium" | "high" + extraction_thinking_level: str = "" # "" (off) | "low" | "medium" | "high" | "max" + consolidation_thinking_level: str = "" # "" (off) | "low" | "medium" | "high" | "max" extraction_cooldown_seconds: int = 120 # minimum seconds between extractions embedding: EmbeddingConfig = EmbeddingConfig() @@ -299,14 +299,14 @@ class GoalDecompositionConfig(BaseModel): enabled: bool = True provider: str = "deepseek" model: str = "deepseek-v4-flash" - thinking_level: str = "" # "" (off) | "low" | "medium" | "high" + thinking_level: str = "" # "" (off) | "low" | "medium" | "high" | "max" class TaskReflectionConfig(BaseModel): enabled: bool = True provider: str = "deepseek" model: str = "deepseek-v4-flash" - thinking_level: str = "" # "" (off) | "low" | "medium" | "high" + thinking_level: str = "" # "" (off) | "low" | "medium" | "high" | "max" db_path: str = "data/reflections.db" max_reflections: int = 12 # injected per turn; kept small to cut prompt bloat (#5, was 50) @@ -323,7 +323,7 @@ class ReplyDecisionConfig(BaseModel): enabled: bool = False provider: str = "deepseek" model: str = "deepseek-v4-flash" # fast + cheap is ideal for the yes/no reply call - thinking_level: str = "" # "" (off) | "low" | "medium" | "high" + thinking_level: str = "" # "" (off) | "low" | "medium" | "high" | "max" group_only: bool = True # only gate group chats; DMs always get a reply # Hard backstop: never send more than this many auto-replies into one chat # per rolling window — guarantees a runaway loop terminates even if the LLM @@ -342,7 +342,7 @@ class CompactionConfig(BaseModel): enabled: bool = True provider: str = "deepseek" model: str = "deepseek-v4-flash" - thinking_level: str = "" # "" (off) | "low" | "medium" | "high" + thinking_level: str = "" # "" (off) | "low" | "medium" | "high" | "max" threshold_type: str = "percent" # "percent" (of context window) or "tokens" (absolute) threshold_percent: int = 80 # trigger at this % of the model's context window threshold_tokens: int = 150000 # absolute trigger when threshold_type == "tokens" @@ -519,8 +519,7 @@ class SubagentSummaryConfig(BaseModel): enabled: bool = True provider: str = "deepseek" # fast + cheap is ideal for this distillation model: str = "deepseek-v4-flash" - thinking_level: str = "" # "" (off) | "low" | "medium" | "high" - + thinking_level: str = "" # "" (off) | "low" | "medium" | "high" | "max" class Config(BaseModel): agent: AgentConfig = AgentConfig() diff --git a/humux/core/llm.py b/humux/core/llm.py index 1a8c597..e6925d9 100644 --- a/humux/core/llm.py +++ b/humux/core/llm.py @@ -297,7 +297,7 @@ def _reasoning_kwargs(self) -> dict[str, Any]: Empty when no level is set, so non-reasoning calls are untouched. """ level = self.thinking_level - if level not in ("low", "medium", "high"): + if level not in ("low", "medium", "high", "max"): return {} if self.provider == "anthropic": return {"thinking": {"type": "adaptive"}, "output_config": {"effort": level}}