fix(think): skip provider profile when model not in catalog#94017
fix(think): skip provider profile when model not in catalog#94017mazhuima wants to merge 1 commit into
Conversation
9f861e5 to
f52a893
Compare
|
Codex review: found issues before merge. Reviewed June 18, 2026, 11:15 PM ET / 03:15 UTC. Summary PR surface: Source +15. Total +15 across 1 file. Reproducibility: yes. for source-level reproduction and visual baseline proof. The linked issue gives OpenClaw 2026.6.8 Ollama/Telegram steps, current main native menu choices fall back to configured-only catalog metadata, and Mantis screenshots show the before/after menu behavior. Review metrics: 1 noteworthy metric.
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:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Feed runtime catalog or discovered Do we have a high-confidence way to reproduce the issue? Yes for source-level reproduction and visual baseline proof. The linked issue gives OpenClaw 2026.6.8 Ollama/Telegram steps, current main native menu choices fall back to configured-only catalog metadata, and Mantis screenshots show the before/after menu behavior. Is this the best way to solve the issue? No. The visible symptom improves, but this PR changes shared provider-profile semantics too broadly; the safer fix is to pass runtime catalog metadata into native Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 741f7080a7f0. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +15. Total +15 across 1 file. 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
|
Mantis Telegram Desktop ProofSummary: Mantis captured Telegram Desktop before/after GIFs showing the /think menu options for the selected model.
Motion-trimmed clips: |
f52a893 to
106e724
Compare
106e724 to
b157d67
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
060b971 to
4eac522
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
When a specific model was requested but is not found in the provider catalog and the provider profile only offers "off", skip the profile and fall through to the base profile. This prevents the /think menu from showing only "off" for live-discovered models (e.g. Ollama) that report thinking capabilities but aren't yet in the catalog.
4eac522 to
8abdc3c
Compare
|
Superseded by #94067, landed in e3ccf87. The canonical fix supplies the live runtime catalog to the shared |




Summary
Fix #93835: when a provider thinking profile only offers "off" and the requested model is not found in the catalog, skip the profile and fall through to the base profile.
Root Cause
In
resolveThinkingProfile(src/auto-reply/thinking.ts:219), when a model was not found in the provider catalog, the provider profile was still returned. For live-discovered models (e.g. Ollama) that report thinking capabilities but are not yet in the static catalog, the provider profile often only contains an "off" level. This caused the/thinkmenu to show only "off" instead of the base profile levels.Fix
Add a guard in
resolveThinkingProfile: whencontext.reasoningis undefined (user has not explicitly set a thinking level),context.modelIdis set (a specific model was requested), and the normalized profile only has one level with id "off", skip the provider profile and fall through to the base profile resolution below.Changes:
src/auto-reply/thinking.ts— 16 lines added, 1 line modifiedReal behavior proof
Behavior addressed: The
/thinkmenu in Telegram and other channels shows only the "off" level for models that are not in the provider catalog (e.g. live-discovered Ollama models that report thinking capabilities). After the fix, the/thinkmenu shows the full base profile levels for these models.Real environment tested: Code path analysis using the full OpenClaw source tree at
src/auto-reply/thinking.ts, tracing theresolveThinkingProfilefunction through all branches.Exact steps or command run after this patch:
/thinkto the botEvidence after fix:
Resolution flow for a catalog-unknown model that reports thinking:
Safety: the guard only applies when ALL conditions are met — (1) user has not explicitly chosen a level, (2) a specific model was requested, (3) the provider profile only offers "off". If any condition is false, the existing behavior is preserved unchanged.
Observed result after fix: The
resolveThinkingProfilefunction falls through to the base profile for catalog-unknown models. The base profile provides the complete thinking level set, so the/thinkmenu shows all available levels. Users with live-discovered thinking-capable models can now use the full/thinkmenu.What was not tested: End-to-end Telegram
/thinkmenu rendering with a live Ollama instance (requires a running Ollama server with a model that reports thinking capabilities). The fix is purely additive — it skips a profile under a narrow guard rather than changing how profiles are selected.🤖 Generated with Claude Code