openclaw - ✅(Solved) Fix [Bug]: Discord /think choices do not show xhigh for openai-codex/gpt-5.4 even though backend supports it [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#48820Fetched 2026-04-08 00:52:09
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1cross-referenced ×1locked ×1

In Discord, the native /think choice list does not show xhigh for a session using openai-codex/gpt-5.4, even though the backend supports xhigh for that model.

Root Cause

I am intentionally not claiming a confirmed root cause yet—only that the Discord-side choice list appears inconsistent with the installed model-selection logic.

Fix Action

Fixed

PR fix notes

PR #49176: Discord: resolve /think autocomplete from session model

Description (problem / solution / changelog)

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: Discord native /think autocomplete used config-default model context, not the effective Discord route's session model.
  • Why it matters: users on an xhigh-capable session model (for example openai-codex/gpt-5.4) could miss xhigh in slash choices.
  • What changed: native command option autocomplete now resolves the effective Discord route, reads provider/model from that route's session override, and passes it into resolveCommandArgChoices.
  • What did NOT change (scope boundary): no changes to /think command semantics, backend thinking capability logic, or non-Discord channels.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #48820
  • Related #

User-visible / Behavior Changes

  • Discord native /think autocomplete now reflects the active effective-route session model override rather than only config defaults.

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: local dev
  • Model/provider: anthropic default config + openai-codex/gpt-5.4 session override
  • Integration/channel (if any): Discord native slash commands
  • Relevant config (redacted): agents.defaults.model.primary=anthropic/claude-sonnet-4.5

Steps

  1. Configure a default model that does not support xhigh.
  2. Set the effective Discord route session override to openai-codex/gpt-5.4.
  3. Trigger Discord native /think autocomplete.

Expected

  • xhigh appears in autocomplete choices for the effective-route session.

Actual

  • Before fix: choices reflected default model context and could omit xhigh.
  • After fix: choices resolve from effective-route session context and include xhigh.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: targeted Discord native-command test suite passes; added regression test covering session-override-aware /think autocomplete.
  • Edge cases checked: fallback path when route/session resolution fails (returns null context and preserves prior behavior).
  • What you did not verify: live Discord runtime interaction against a real guild.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)
  • If yes, exact upgrade steps:

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: revert this PR commit.
  • Files/config to restore: extensions/discord/src/monitor/native-command.ts, extensions/discord/src/monitor/native-command-ui.ts
  • Known bad symptoms reviewers should watch for: Discord /think autocomplete errors or missing choices.

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk: route/session override resolution can fail in autocomplete context.
    • Mitigation: code catches failures and falls back to prior default-model behavior.

Changed files

  • extensions/discord/src/monitor/native-command-route.ts (added, +89/-0)
  • extensions/discord/src/monitor/native-command-ui.ts (modified, +75/-6)
  • extensions/discord/src/monitor/native-command.model-picker.test.ts (modified, +37/-2)
  • extensions/discord/src/monitor/native-command.options.test.ts (modified, +65/-2)
  • extensions/discord/src/monitor/native-command.think-autocomplete.test.ts (added, +210/-0)
  • extensions/discord/src/monitor/native-command.ts (modified, +225/-44)

Code Example

const XHIGH_MODEL_REFS = [
  "openai/gpt-5.4",
  "openai/gpt-5.4-pro",
  "openai/gpt-5.2",
  "openai-codex/gpt-5.4",
  ...
];

function listThinkingLevels(provider, model) {
  const levels = ["off", "minimal", "low", "medium", "high"];
  if (supportsXHighThinking(provider, model)) levels.push("xhigh");
  levels.push("adaptive");
  return levels;
}
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

In Discord, the native /think choice list does not show xhigh for a session using openai-codex/gpt-5.4, even though the backend supports xhigh for that model.

Steps to reproduce

  1. Use OpenClaw on Discord.
  2. Switch the session model to openai-codex/gpt-5.4.
  3. Open the Discord native /think command and inspect the available thinking choices.
  4. Observe that xhigh is not offered in the choice list.

Expected behavior

When the current session model is openai-codex/gpt-5.4, the Discord /think choice list should include xhigh.

Actual behavior

xhigh is missing from the Discord /think choices even though the model supports it.

In local verification, the backend/model-selection logic includes openai-codex/gpt-5.4 in XHIGH_MODEL_REFS, and listThinkingLevels(provider, model) should append xhigh for supported models.

This makes the issue look like a Discord native command / dynamic choices mismatch rather than a model capability problem.

OpenClaw version

2026.3.13 (61d171a)

Operating system

Debian GNU/Linux 12 (bookworm)

Install method

npm global

Model

openai-codex/gpt-5.4

Provider / routing chain

discord -> openclaw -> openai-codex

Config file / key location

Standard gateway/session setup; reproduced in a normal Discord-connected session. No secret values included.

Additional provider/model setup details

This was reproduced with an OpenAI Codex-capable session. The issue appears to be channel/UI-specific rather than a provider rejection from the model layer.

Logs, screenshots, and evidence

Local source evidence from the installed build:

const XHIGH_MODEL_REFS = [
  "openai/gpt-5.4",
  "openai/gpt-5.4-pro",
  "openai/gpt-5.2",
  "openai-codex/gpt-5.4",
  ...
];

function listThinkingLevels(provider, model) {
  const levels = ["off", "minimal", "low", "medium", "high"];
  if (supportsXHighThinking(provider, model)) levels.push("xhigh");
  levels.push("adaptive");
  return levels;
}

Observed behavior in practice:

  • Discord /think choices did not expose xhigh
  • backend/source indicates xhigh is valid for openai-codex/gpt-5.4

Impact and severity

  • Affected: Discord users using xhigh-capable models such as openai-codex/gpt-5.4
  • Severity: Medium (does not fully break the session, but makes a supported option undiscoverable / appear unsupported)
  • Frequency: Reproducible in the affected session state
  • Consequence: Users may conclude xhigh is unavailable on Discord even when the backend supports it

Additional information

My current hypothesis is that Discord native command choices are not being resolved from the effective current session model in this case, or are using stale/default model context.

I am intentionally not claiming a confirmed root cause yet—only that the Discord-side choice list appears inconsistent with the installed model-selection logic.

extent analysis

Fix Plan

To resolve the issue of xhigh not being displayed in the Discord native /think command choices for the openai-codex/gpt-5.4 model, follow these steps:

  • Update the listThinkingLevels function to correctly handle the openai-codex/gpt-5.4 model:
function listThinkingLevels(provider, model) {
  const levels = ["off", "minimal", "low", "medium", "high"];
  if (XHIGH_MODEL_REFS.includes(model)) levels.push("xhigh");
  levels.push("adaptive");
  return levels;
}
  • Ensure that the XHIGH_MODEL_REFS array includes the correct reference to the openai-codex/gpt-5.4 model:
const XHIGH_MODEL_REFS = [
  "openai/gpt-5.4",
  "openai/gpt-5.4-pro",
  "openai/gpt-5.2",
  "openai-codex/gpt-5.4",
  // ...
];
  • Verify that the Discord native command choices are being resolved from the effective current session model.

Verification

To verify that the fix worked, follow these steps:

  • Switch the session model to openai-codex/gpt-5.4.
  • Open the Discord native /think command and inspect the available thinking choices.
  • Verify that xhigh is now included in the choice list.

Extra Tips

  • Ensure that the XHIGH_MODEL_REFS array is up-to-date and includes all supported models.
  • Consider adding logging or debugging statements to verify that the listThinkingLevels function is being called correctly and that the XHIGH_MODEL_REFS array is being populated correctly.
  • If the issue persists, verify that the Discord native command choices are being resolved from the effective current session model and not using stale or default model context.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When the current session model is openai-codex/gpt-5.4, the Discord /think choice list should include xhigh.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING