fix(channels): resolve native /think menu levels via runtime catalog for live-discovered models#94067
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 20, 2026, 11:53 PM ET / 03:53 UTC. Summary PR surface: Source +63, Tests +165. Total +228 across 12 files. Reproducibility: yes. Current main's native menu resolver falls back to configured-only catalog data while Ollama live discovery stores Review metrics: 2 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one canonical runtime-catalog fix for native Do we have a high-confidence way to reproduce the issue? Yes. Current main's native menu resolver falls back to configured-only catalog data while Ollama live discovery stores Is this the best way to solve the issue? Yes, this is the best fix shape for the reported bug: feeding native AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6c1041339da6. Label changesLabel justifications:
Evidence reviewedPR surface: Source +63, Tests +165. Total +228 across 12 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
0345f3f to
5ac2bbc
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
7354634 to
a2aed9e
Compare
34aabe0 to
fa231f3
Compare
e74ace3 to
b9cd41a
Compare
… live-discovered models (openclaw#93835) Native /think menus on Telegram, Slack, and Discord resolved argument choices against the configured-only model catalog, so live-discovered reasoning models (e.g. Ollama glm-5.2:cloud) showed only default/off while /think <level> and the current-level title were correct. Load the runtime catalog for /think on all four native surfaces, including the default-model path when no /model override is set, so the menu matches the reply path. An empty/failed discovery keeps the configured-catalog fallback.
b9cd41a to
5f16f11
Compare
|
Merged via squash.
Thanks @openperf! |
…for live-discovered models (openclaw#94067) Merged via squash. Prepared head SHA: 079347b Co-authored-by: openperf <[email protected]> Co-authored-by: steipete <[email protected]> Reviewed-by: @steipete
…26.6.10) (#1256) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/openclaw/openclaw](https://openclaw.ai) ([source](https://github.com/openclaw/openclaw)) | patch | `2026.6.9` → `2026.6.10` | --- ### Release Notes <details> <summary>openclaw/openclaw (ghcr.io/openclaw/openclaw)</summary> ### [`v2026.6.10`](https://github.com/openclaw/openclaw/blob/HEAD/CHANGELOG.md#2026610) [Compare Source](openclaw/openclaw@v2026.6.9...v2026.6.10) ##### Highlights - **Automatic fast mode for talks:** OpenClaw can enable fast mode for short conversational turns, then return to normal mode for longer runs with bounded fallback and delivery behavior. ([#​85104](openclaw/openclaw#85104)) Thanks [@​alexph-dev](https://github.com/alexph-dev) and [@​vincentkoc](https://github.com/vincentkoc). - **More reliable model routing:** Zai model synthesis, GLM overload failover, and native reasoning-level selection now follow the active model catalog more consistently. ([#​94461](openclaw/openclaw#94461), [#​93241](openclaw/openclaw#93241), [#​94067](openclaw/openclaw#94067), [#​94136](openclaw/openclaw#94136)) Thanks [@​Pandah97](https://github.com/Pandah97), [@​chrysb](https://github.com/chrysb), [@​0xghost42](https://github.com/0xghost42), [@​zhengli0922](https://github.com/zhengli0922), [@​openperf](https://github.com/openperf), [@​civiltox](https://github.com/civiltox), and [@​BorClaw](https://github.com/BorClaw). - **Safer session and channel state:** channel switches reset stale origin fields, and cron delivery awareness stays attached to the target session. ([#​95328](openclaw/openclaw#95328), [#​93580](openclaw/openclaw#93580)) Thanks [@​ZengWen-DT](https://github.com/ZengWen-DT), [@​jalehman](https://github.com/jalehman), [@​gorkem2020](https://github.com/gorkem2020), and [@​scotthuang](https://github.com/scotthuang). - **Trusted policies survive hook composition:** composed hook registries keep the trusted tool policies required by approval-sensitive flows. ([#​94545](openclaw/openclaw#94545)) Thanks [@​jesse-merhi](https://github.com/jesse-merhi). ##### Changes - **Agent and channel runtime:** fast-mode state now survives retries, fallback transitions, progress events, and embedded/CLI/ACP normalization; session and channel routing retain the current target and delivery context. ([#​85104](openclaw/openclaw#85104), [#​93580](openclaw/openclaw#93580), [#​95328](openclaw/openclaw#95328)) Thanks [@​alexph-dev](https://github.com/alexph-dev), [@​vincentkoc](https://github.com/vincentkoc), [@​scotthuang](https://github.com/scotthuang), [@​ZengWen-DT](https://github.com/ZengWen-DT), [@​jalehman](https://github.com/jalehman), and [@​gorkem2020](https://github.com/gorkem2020). - **Provider behavior:** model catalogs now supply the correct Zai base URL, overload classification, and native reasoning controls for live-discovered models. ([#​94461](openclaw/openclaw#94461), [#​93241](openclaw/openclaw#93241), [#​94067](openclaw/openclaw#94067), [#​94136](openclaw/openclaw#94136)) Thanks [@​Pandah97](https://github.com/Pandah97), [@​chrysb](https://github.com/chrysb), [@​0xghost42](https://github.com/0xghost42), [@​zhengli0922](https://github.com/zhengli0922), [@​openperf](https://github.com/openperf), [@​civiltox](https://github.com/civiltox), and [@​BorClaw](https://github.com/BorClaw). ##### Fixes - **Fast-mode and policy correctness:** fallback cutoffs and reset notices are bounded, repeated progress events remain visible, Codex service-tier state is normalized, and trusted policies are not lost when hook registries are composed. ([#​85104](openclaw/openclaw#85104), [#​94545](openclaw/openclaw#94545)) Thanks [@​alexph-dev](https://github.com/alexph-dev), [@​vincentkoc](https://github.com/vincentkoc), and [@​jesse-merhi](https://github.com/jesse-merhi). - **Model and delivery edge cases:** Zai and GLM failover paths use the right runtime metadata, while stale channel-origin state no longer leaks across session changes. ([#​94461](openclaw/openclaw#94461), [#​93241](openclaw/openclaw#93241), [#​95328](openclaw/openclaw#95328)) Thanks [@​Pandah97](https://github.com/Pandah97), [@​chrysb](https://github.com/chrysb), [@​0xghost42](https://github.com/0xghost42), [@​zhengli0922](https://github.com/zhengli0922), [@​ZengWen-DT](https://github.com/ZengWen-DT), [@​jalehman](https://github.com/jalehman), and [@​gorkem2020](https://github.com/gorkem2020). - **Provider plugin onboarding:** setup refreshes provider plugin registry metadata after installing setup-selected provider plugins, so auth continuation uses the newly installed provider instead of stale registry state. ([#​95792](openclaw/openclaw#95792)) Thanks [@​snowzlmbot](https://github.com/snowzlmbot). ##### Complete contribution record This audited record covers the complete v2026.6.9..HEAD history: 12 merged PRs. The generation manifest also supplies direct commits as editorial input; the grouped notes above prioritize user impact. ##### Pull requests - **PR [#​86627](openclaw/openclaw#86627 Keep core doctor health in contribution order. Thanks [@​giodl73-repo](https://github.com/giodl73-repo). - **PR [#​93580](openclaw/openclaw#93580 fix: preserve cron delivery awareness for target sessions. Thanks [@​scotthuang](https://github.com/scotthuang) and [@​jalehman](https://github.com/jalehman). - **PR [#​95030](openclaw/openclaw#95030 refactor: add SDK transcript identity target API. Thanks [@​jalehman](https://github.com/jalehman). - **PR [#​94838](openclaw/openclaw#94838 refactor(copilot): complete harness lifecycle parity. Thanks [@​vincentkoc](https://github.com/vincentkoc). - **PR [#​95328](openclaw/openclaw#95328 fix(sessions): reset stale per-channel origin fields on channel switch. Related [#​95325](openclaw/openclaw#95325). Thanks [@​ZengWen-DT](https://github.com/ZengWen-DT) and [@​jalehman](https://github.com/jalehman) and [@​gorkem2020](https://github.com/gorkem2020). - **PR [#​94461](openclaw/openclaw#94461 fix(zai): fall back to manifest baseUrl for synthesized GLM-5 models. Related [#​94269](openclaw/openclaw#94269). Thanks [@​Pandah97](https://github.com/Pandah97) and [@​chrysb](https://github.com/chrysb). - **PR [#​93241](openclaw/openclaw#93241 fix(agents): classify Zhipu GLM overload as overloaded for failover. Related [#​93211](openclaw/openclaw#93211). Thanks [@​0xghost42](https://github.com/0xghost42) and [@​zhengli0922](https://github.com/zhengli0922). - **PR [#​94067](openclaw/openclaw#94067 fix(channels): resolve native /think menu levels via runtime catalog for live-discovered models. Related [#​93835](openclaw/openclaw#93835). Thanks [@​openperf](https://github.com/openperf) and [@​civiltox](https://github.com/civiltox). - **PR [#​94136](openclaw/openclaw#94136 fix(zai): expose GLM-5.2 reasoning levels \[AI-assisted]. Thanks [@​BorClaw](https://github.com/BorClaw). - **PR [#​85104](openclaw/openclaw#85104 feat: fast talks auto mode. Related [#​85087](openclaw/openclaw#85087). Thanks [@​alexph-dev](https://github.com/alexph-dev). - **PR [#​94545](openclaw/openclaw#94545 fix: keep trusted policies with hook registry. Thanks [@​jesse-merhi](https://github.com/jesse-merhi). - **PR [#​95792](openclaw/openclaw#95792 fix(onboard): refresh provider plugin registry after setup installs. Related [#​95765](openclaw/openclaw#95765). Thanks [@​snowzlmbot](https://github.com/snowzlmbot). </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19--> Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/1256
Summary
ollama/glm-5.2:cloud, whose/api/showreportscapabilities: ["thinking", ...]), a bare/thinklists onlydefault, off— yet/think mediumis accepted and the displayed "Current thinking level" is correct. The same gap affects the equivalent Slack and Discord native/thinksurfaces.reasoningfrom the catalog entry for the selected model. The Ollama provider already maps the discoveredthinkingcapability toreasoning: true, and the reply path + the current-level display already hydrate the runtime catalog. But the native command menus calledresolveCommandArgMenu/resolveCommandArgChoiceswith no catalog, so those helpers fell back tobuildConfiguredModelCatalog(config only). A wildcard-allowlisted, live-discovered model is absent from the config catalog, so itsreasoningflag never reached the resolver and the menu collapsed to the off-only profile. It is purely a menu/discoverability gap: the setter and current-level display were already runtime-catalog-aware, which is why they diverged from the options list./thinkmenu/autocomplete choices against the runtime catalog — the same source the current-level display already uses — so the discovered reasoning capability reaches the resolver.extensions/telegram/src/bot-native-commands.ts— pass the runtime catalog toresolveCommandArgMenufor thethinkinline-keyboard menu.extensions/slack/src/monitor/slash.ts— pass the runtime catalog toresolveCommandArgMenufor thethinkargument menu.extensions/discord/src/monitor/native-command.tsandnative-command.options.ts— pass the runtime catalog to thethinkbutton menu and the autocompleteresolveCommandArgChoices.command.key === "think"and a resolved provider, and uses acatalog?.lengthguard so an empty/failed discovery keeps the existing configured-catalog fallback.extensions/telegram/src/bot-native-commands.session-meta.test.ts— regression test asserting the/thinkmenu is resolved with the runtime catalog.docs/reference/config).loadModelCatalogfromopenclaw/plugin-sdk/agent-runtime; no manifest/registry/loader changes./thinkcommand (cachedloadModelCatalog), not the reply-time path.command.key === "think";/modeland all other menus keep their config-only resolution.Reproduction
models.providers.ollama.modelsunset;agents.defaults.models={"ollama/*":{}})./model ollama/glm-5.2:cloud(Ollama/api/showreportscapabilities: ["thinking", "completion", "tools"])./think.default, off, while/think mediumis still accepted and the title shows the real current level.default, off, low, medium, high, max, matching the model's discovered reasoning capability and what/think <level>accepts.Real behavior proof
Behavior addressed (#93835 — native
/thinkmenus listed onlydefault, offfor live-discovered reasoning models while/think <level>and the current-level title were correct): the menu/autocomplete choices now resolve against the runtime catalog so the discovered reasoning capability is reflected, consistently with the already-runtime-catalog-aware current-level display.Real environment tested (Linux — Vitest against the production resolver chain
listThinkingLevels→ coreresolveThinkingProfile→resolveBundledProviderPolicySurface("ollama")→ the real Ollama policy resolver, plus the Telegram/Slack/Discord native-command suites; a live Ollama Cloudglm-5.2:cloudgateway was not available): end-to-end resolver chain and the three channel command suites.Exact steps or command run after this patch:
pnpm test extensions/telegram/src/bot-native-commands.session-meta.test.ts;pnpm test extensions/discord/src/monitor/native-command.options.test.ts extensions/discord/src/monitor/native-command.command-arg.test.ts extensions/discord/src/monitor/native-command.model-picker.test.ts extensions/discord/src/monitor/native-command.think-autocomplete.test.ts;pnpm test extensions/slack/src/monitor/slash.test.ts;pnpm tsgo:extensions;pnpm exec oxfmt --checkandnode scripts/run-oxlint.mjson the changed files.Evidence after fix: driving the real resolver chain for
ollama/glm-5.2:cloud, a config-only catalog (the pre-fix state, model absent) resolveslistThinkingLevelsto exactly["off"](the reported symptom), while a runtime catalog carrying{ reasoning: true }resolves to levels includingmediumandhigh. The exact["off"]result (not the generic base set) confirms the real Ollama resolver is engaged, matching production where the plugin is active.Observed result after fix: the
/thinkmenu reflects the live-discovered reasoning levels. Telegram 26 passed, Discord native-command suites 35 passed, Slack 38 passed;tsgo:extensionsreports no new errors on the changed files; oxfmt/oxlint clean on the changed files.What was not tested: the live-network discovery hop (
buildOllamaProvider→/api/show→reasoning: true) was not exercised against a real Ollama Cloud endpoint; it is a deterministiccapabilities.includes("thinking")mapping already covered by Ollama provider tests and confirmed by the reporter's own/api/showoutput.Repro confirmation: the added Telegram regression test asserts the
/thinkmenu'sresolveCommandArgMenucall receives the runtime catalog (carryingreasoning: true) and thatloadModelCatalogis invoked; on the pre-fix tree the call gets no catalog, so the assertion fails — confirming the test covers the production change.Risk / Mitigation
/thinkmenu is built. Mitigation:loadModelCatalogis process-cached (single shared promise) and is already loaded by the current-level resolution on the same interaction; the load is gated to thethinkcommand on an interactive path, not the hot reply path.catalog?.length, so an empty runtime catalog (discovery exception or zero models) preserves the existingbuildConfiguredModelCatalogfallback.command.key === "think";/modeland all other native menus are unchanged.Change Type (select all)
Scope (select all touched areas)
extensions/)src/)docs/)Linked Issue/PR
Fixes #93835