Skip to content

Discord: resolve /think autocomplete from session model#49176

Merged
Takhoffman merged 11 commits into
openclaw:mainfrom
MonkeyLeeT:codex/discord-think-session-model
Mar 25, 2026
Merged

Discord: resolve /think autocomplete from session model#49176
Takhoffman merged 11 commits into
openclaw:mainfrom
MonkeyLeeT:codex/discord-think-session-model

Conversation

@MonkeyLeeT

@MonkeyLeeT MonkeyLeeT commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

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

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.

@greptile-apps

greptile-apps Bot commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a bug where Discord native /think autocomplete choices were resolved from the config-default model context instead of the bound session's effective model override. The fix introduces resolveDiscordNativeChoiceContext, which resolves the session route and reads the stored model override before calling resolveCommandArgChoices, so providers/models only available on the override (e.g. xhigh on openai-codex/gpt-5.4) appear correctly in autocomplete.

Key changes:

  • resolveDiscordNativeChoiceContext — new async helper that resolves provider/model from the bound session override, with a try/catch that returns null on failure to preserve prior default-model behaviour.
  • buildDiscordCommandOptions — now accepts an optional resolveChoiceContext callback; invokes it only for function-based arg.choices, so static choice arrays are unaffected.
  • resolveDiscordModelPickerRoute — union type extended to include AutocompleteInteraction so it can be reused in the new context resolver.
  • New test file native-command.think-autocomplete.test.ts verifies the session-override-aware happy path.

Notable concern: the shouldAutocomplete flag is still determined at command-build time using a default-model-context evaluation of resolveCommandArgChoices. If the default model returns zero choices for a function-based arg (not the case for /think today, but possible in future commands), shouldAutocomplete will be false and the session-aware autocomplete handler will never be registered, silently undermining the intent of this fix.

Confidence Score: 4/5

  • Safe to merge — the change is well-scoped, has a safety fallback, and the primary happy-path is tested.
  • The fix is logically correct for the described scenario and the fallback (catch → null) prevents regressions. The one structural concern (shouldAutocomplete evaluated without session context) is a latent edge-case risk rather than a bug in the current PR's scope. Test coverage is adequate for the happy path but missing the error/fallback branch.
  • native-command.ts lines 171–175 (shouldAutocomplete guard using default-model context)

Comments Outside Diff (1)

  1. extensions/discord/src/monitor/native-command.ts, line 171-175 (link)

    P2 shouldAutocomplete evaluated with default-model context

    The resolvedChoices at line 171 are computed once at command-build time using the config-default model (no session override). The shouldAutocomplete flag therefore depends on the default model returning at least one choice for the arg.

    If a session override targets a model that supports a command option that the default model does not support at all (i.e. the default-context call returns an empty array), shouldAutocomplete will be false and the session-aware autocomplete handler introduced by this PR will never be registered — meaning the fix won't fire for that arg.

    For the described bug (default model omits xhigh but still returns other thinking levels), this works correctly today. But the same pattern in a scenario where the default model returns zero choices (e.g. a command option that is only meaningful for a specific provider) would silently skip the session-aware path.

    Consider guarding with arg.preferAutocomplete === true || typeof arg.choices === "function" as an additional condition so that function-based choice args always enable autocomplete regardless of what the default-model evaluation returns:

    const shouldAutocomplete =
      arg.preferAutocomplete === true ||
      typeof arg.choices === "function" ||
      (resolvedChoices.length > 0 && resolvedChoices.length > 25);
    
    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: extensions/discord/src/monitor/native-command.ts
    Line: 171-175
    
    Comment:
    **`shouldAutocomplete` evaluated with default-model context**
    
    The `resolvedChoices` at line 171 are computed once at command-build time using the config-default model (no session override). The `shouldAutocomplete` flag therefore depends on the default model returning at least one choice for the arg.
    
    If a session override targets a model that supports a command option that the default model does not support at all (i.e. the default-context call returns an empty array), `shouldAutocomplete` will be `false` and the session-aware autocomplete handler introduced by this PR will never be registered — meaning the fix won't fire for that arg.
    
    For the described bug (default model omits `xhigh` but still returns other thinking levels), this works correctly today. But the same pattern in a scenario where the default model returns *zero* choices (e.g. a command option that is only meaningful for a specific provider) would silently skip the session-aware path.
    
    Consider guarding with `arg.preferAutocomplete === true || typeof arg.choices === "function"` as an additional condition so that function-based choice args always enable autocomplete regardless of what the default-model evaluation returns:
    
    ```
    const shouldAutocomplete =
      arg.preferAutocomplete === true ||
      typeof arg.choices === "function" ||
      (resolvedChoices.length > 0 && resolvedChoices.length > 25);
    ```
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/discord/src/monitor/native-command.ts
Line: 171-175

Comment:
**`shouldAutocomplete` evaluated with default-model context**

The `resolvedChoices` at line 171 are computed once at command-build time using the config-default model (no session override). The `shouldAutocomplete` flag therefore depends on the default model returning at least one choice for the arg.

If a session override targets a model that supports a command option that the default model does not support at all (i.e. the default-context call returns an empty array), `shouldAutocomplete` will be `false` and the session-aware autocomplete handler introduced by this PR will never be registered — meaning the fix won't fire for that arg.

For the described bug (default model omits `xhigh` but still returns other thinking levels), this works correctly today. But the same pattern in a scenario where the default model returns *zero* choices (e.g. a command option that is only meaningful for a specific provider) would silently skip the session-aware path.

Consider guarding with `arg.preferAutocomplete === true || typeof arg.choices === "function"` as an additional condition so that function-based choice args always enable autocomplete regardless of what the default-model evaluation returns:

```
const shouldAutocomplete =
  arg.preferAutocomplete === true ||
  typeof arg.choices === "function" ||
  (resolvedChoices.length > 0 && resolvedChoices.length > 25);
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: extensions/discord/src/monitor/native-command.think-autocomplete.test.ts
Line: 28-42

Comment:
**No test coverage for the fallback path**

The PR description notes that "fallback path when route/session resolution fails (returns null context and preserves prior behavior)" was verified, but there is no automated test exercising that path.

Consider adding a second `it` block that sets `mocks.resolveBoundConversationRoute.mockRejectedValue(new Error("network"))` (or `mockResolvedValue(null)`) and asserts that `respond` is still called with non-empty choices (the default-model set). This prevents regressions on the safety catch introduced at line 528 of `native-command.ts`.

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: 6a10d30

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord size: S labels Mar 17, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a10d30e33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread extensions/discord/src/monitor/native-command.ts Outdated
@MonkeyLeeT
MonkeyLeeT force-pushed the codex/discord-think-session-model branch from 6a10d30 to 3bf90ac Compare March 17, 2026 18:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3bf90acd01

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const storePath = resolveStorePath(params.cfg.session?.store, {
agentId: route.agentId,
});
const sessionStore = loadSessionStore(storePath);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid cloning full session store on every autocomplete keystroke

This new autocomplete context path calls loadSessionStore for each /think autocomplete event, and even cache hits in loadSessionStore return structuredClone(cached.store) of the entire session map (src/config/sessions/store-cache.ts), so typing in Discord can repeatedly clone a large store on the event loop. In deployments with large sessions.json files or many concurrent users, this can add enough synchronous CPU latency to miss or delay autocomplete responses; this path should avoid whole-store reads (for example by memoizing per interaction window or adding a targeted session-entry lookup).

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review. Agreed on the performance concern category, with one important distinction:

  • This PR removes the new regression in /think autocomplete: we no longer force loadSessionStore(..., { skipCache: true }) on each event. The autocomplete path now uses loadSessionStore(storePath) (extensions/discord/src/monitor/native-command.ts:517), so it goes through the shared session-store cache path (src/config/sessions/store.ts:200-210).
  • You’re correct that cache hits still return structuredClone(cached.store) (src/config/sessions/store-cache.ts:60), so there is still synchronous per-call work proportional to store size.

So the acute “forced disk read/parse per keystroke” issue is fixed here; the broader “whole-store clone on cached reads” cost remains a valid follow-up optimization for session-store access generally (including autocomplete). We can track that separately with a targeted API improvement (for example a keyed session-entry read/memoized accessor) rather than block this regression fix.

@MonkeyLeeT
MonkeyLeeT force-pushed the codex/discord-think-session-model branch from 3bf90ac to 6df099c Compare March 18, 2026 04:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6df099c54a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread extensions/discord/src/monitor/native-command-ui.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e1079c1f8a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread extensions/discord/src/monitor/native-command.think-autocomplete.test.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b8651a8bd5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread extensions/discord/src/monitor/native-command-ui.ts Outdated
@MonkeyLeeT
MonkeyLeeT force-pushed the codex/discord-think-session-model branch from b8651a8 to 2ff1434 Compare March 20, 2026 20:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d31aace422

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread extensions/discord/src/monitor/native-command.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a17162e239

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread extensions/discord/src/monitor/native-command.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5306e0fb3f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread extensions/discord/src/monitor/native-command-ui.ts Outdated
Comment thread extensions/discord/src/monitor/native-command-ui.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d845cc12a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +166 to +168
typeof arg.choices === "function" && resolveChoiceContext
? await resolveChoiceContext(interaction)
: null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce auth before loading autocomplete session context

The autocomplete handler now calls resolveChoiceContext for function-based choices before any command authorization runs, so /think suggestions are computed from the effective session model even for users who would be denied later by commands.allowFrom, guild/channel restrictions, or DM policy checks in dispatchDiscordCommandInteraction. In restricted servers this leaks bound-session capability metadata (for example whether xhigh appears) to unauthorized users; the context lookup should be gated by the same auth checks or return no sensitive choices when unauthorized.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping this PR scoped to the original bug fix.

This PR changes /think autocomplete to use the effective-route session model so choices match the command target model. I’m not taking on the broader metadata-hardening change in this PR; that would require sharing the full command auth decision with autocomplete and expands the patch materially.

If we want to harden autocomplete visibility, I’d prefer to do that as a follow-up.

@MonkeyLeeT
MonkeyLeeT force-pushed the codex/discord-think-session-model branch from 4d845cc to 504e14f Compare March 24, 2026 03:09

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 504e14f952

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +165 to +167
const context =
typeof arg.choices === "function" && resolveChoiceContext
? await resolveChoiceContext(interaction)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Apply command auth before resolving autocomplete context

The autocomplete handler now calls resolveChoiceContext (which reads the effective route/session model) before any authorization checks run, so users who are later denied in dispatchDiscordCommandInteraction can still probe /think and infer bound-session capability metadata (for example whether xhigh appears). This is a behavior regression from static choices because the sensitive part is now session-derived; gate the context lookup behind the same DM/group/guild allowlist checks used for execution.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same call here: keeping this PR scoped to fixing the session-context mismatch for /think autocomplete.

The auth-gating concern is real but broader than this bug fix, and the minimal correct version still adds noticeable complexity. I’d rather defer that hardening to a follow-up than bundle it into this PR.

const storePath = resolveStorePath(params.cfg.session?.store, {
agentId: route.agentId,
});
const sessionStore = loadSessionStore(storePath);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid full session-store loads per autocomplete keystroke

resolveDiscordNativeChoiceContext loads the session store on every autocomplete request, and loadSessionStore returns a cloned full map even on cache hits (readSessionStoreCache does structuredClone). In large sessions.json deployments, repeated /think keystrokes can cause synchronous clone/parse work on the event loop and delay or miss Discord autocomplete responses; this path needs a targeted lookup or short-lived memoization instead of whole-store loads per event.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree this is a broader performance concern category, but I’m keeping this PR limited to correcting the model-context source for /think autocomplete.

This branch already removed the earlier uncached read path; what remains is the general session-store read/cloning behavior, which is not specific to this bug. I’d rather track any targeted lookup/memoization work separately.

@Takhoffman
Takhoffman force-pushed the codex/discord-think-session-model branch from 2b43cea to a0d6631 Compare March 25, 2026 00:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a0d66316a3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

threadBindings: ThreadBindingManager;
}) {
const resolved = await resolveDiscordModelPickerRouteState(params);
return resolved.route;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Return effective route for model-picker context

resolveDiscordModelPickerRoute now returns resolved.route, which is the unbound base route from resolveDiscordNativeInteractionRouteState. In bound-thread or configured-binding setups, this drops the session/agent override that the picker UI depends on, so /model picker views can load providers/current model from the wrong session while command execution still targets the effective bound session. This creates inconsistent picker state (including false mismatch warnings) and can surface the wrong model set for the interaction context.

Useful? React with 👍 / 👎.

@Takhoffman
Takhoffman merged commit 5799322 into openclaw:main Mar 25, 2026
9 checks passed
kvokka pushed a commit to kvokka/openclaw that referenced this pull request Mar 25, 2026
* Discord: use session model for /think autocomplete

* Discord: use cached session store in think autocomplete

* Discord: align think autocomplete with effective bound route

* Discord: fix think autocomplete route-resolution test mocks

* Discord: stabilize think autocomplete CI coverage

* Discord: gate think autocomplete context behind auth

* Discord: share slash auth for think autocomplete

* Discord: localize think autocomplete auth gate

* Discord: drop think autocomplete auth gating

* Discord: align native autocomplete auth and route readiness

* Discord: use effective route for model picker

---------

Co-authored-by: Tak Hoffman <[email protected]>
kvokka added a commit to kvokka/openclaw that referenced this pull request Mar 25, 2026
…nto add-json-schema-to-cli

* 'add-json-schema-to-cli' of github.com:kvokka/openclaw: (58 commits)
  test: make vitest config tests platform-aware
  fix: refresh available tools when the session model changes (openclaw#54184)
  fix: prefer freshest transcript session owners
  test: disable Vitest fs cache on Windows
  fix: prefer deterministic transcript session keys
  fix: prefer deterministic session usage targets
  fix: prefer deterministic session id resume targets
  feat: add /tools runtime availability view (openclaw#54088)
  fix: enforce sandbox visibility for session_status ids
  fix: drop spawned visibility list caps
  fix: verify exact spawned session visibility
  fix: enforce spawned session visibility in key resolve
  fix: resolve exact session ids without fuzzy limits
  Discord: resolve /think autocomplete from session model (openclaw#49176)
  chore(agents): normalize pi embedded runner imports
  feat(gateway): make openai compatibility agent-first
  test(parallel): force unit-fast batch planning
  test(browser): stabilize default browser detection mocks
  fix: prefer current parents in session rows
  fix: prefer current subagent owners in session rows
  ...
netandreus pushed a commit to netandreus/openclaw that referenced this pull request Mar 25, 2026
* Discord: use session model for /think autocomplete

* Discord: use cached session store in think autocomplete

* Discord: align think autocomplete with effective bound route

* Discord: fix think autocomplete route-resolution test mocks

* Discord: stabilize think autocomplete CI coverage

* Discord: gate think autocomplete context behind auth

* Discord: share slash auth for think autocomplete

* Discord: localize think autocomplete auth gate

* Discord: drop think autocomplete auth gating

* Discord: align native autocomplete auth and route readiness

* Discord: use effective route for model picker

---------

Co-authored-by: Tak Hoffman <[email protected]>
npmisantosh pushed a commit to npmisantosh/openclaw that referenced this pull request Mar 25, 2026
* Discord: use session model for /think autocomplete

* Discord: use cached session store in think autocomplete

* Discord: align think autocomplete with effective bound route

* Discord: fix think autocomplete route-resolution test mocks

* Discord: stabilize think autocomplete CI coverage

* Discord: gate think autocomplete context behind auth

* Discord: share slash auth for think autocomplete

* Discord: localize think autocomplete auth gate

* Discord: drop think autocomplete auth gating

* Discord: align native autocomplete auth and route readiness

* Discord: use effective route for model picker

---------

Co-authored-by: Tak Hoffman <[email protected]>
jacobtomlinson pushed a commit to jacobtomlinson/openclaw that referenced this pull request Mar 25, 2026
* Discord: use session model for /think autocomplete

* Discord: use cached session store in think autocomplete

* Discord: align think autocomplete with effective bound route

* Discord: fix think autocomplete route-resolution test mocks

* Discord: stabilize think autocomplete CI coverage

* Discord: gate think autocomplete context behind auth

* Discord: share slash auth for think autocomplete

* Discord: localize think autocomplete auth gate

* Discord: drop think autocomplete auth gating

* Discord: align native autocomplete auth and route readiness

* Discord: use effective route for model picker

---------

Co-authored-by: Tak Hoffman <[email protected]>
godlin-gh pushed a commit to YouMindInc/openclaw that referenced this pull request Mar 27, 2026
* Discord: use session model for /think autocomplete

* Discord: use cached session store in think autocomplete

* Discord: align think autocomplete with effective bound route

* Discord: fix think autocomplete route-resolution test mocks

* Discord: stabilize think autocomplete CI coverage

* Discord: gate think autocomplete context behind auth

* Discord: share slash auth for think autocomplete

* Discord: localize think autocomplete auth gate

* Discord: drop think autocomplete auth gating

* Discord: align native autocomplete auth and route readiness

* Discord: use effective route for model picker

---------

Co-authored-by: Tak Hoffman <[email protected]>
@MonkeyLeeT
MonkeyLeeT deleted the codex/discord-think-session-model branch March 31, 2026 20:26
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
* Discord: use session model for /think autocomplete

* Discord: use cached session store in think autocomplete

* Discord: align think autocomplete with effective bound route

* Discord: fix think autocomplete route-resolution test mocks

* Discord: stabilize think autocomplete CI coverage

* Discord: gate think autocomplete context behind auth

* Discord: share slash auth for think autocomplete

* Discord: localize think autocomplete auth gate

* Discord: drop think autocomplete auth gating

* Discord: align native autocomplete auth and route readiness

* Discord: use effective route for model picker

---------

Co-authored-by: Tak Hoffman <[email protected]>
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
* Discord: use session model for /think autocomplete

* Discord: use cached session store in think autocomplete

* Discord: align think autocomplete with effective bound route

* Discord: fix think autocomplete route-resolution test mocks

* Discord: stabilize think autocomplete CI coverage

* Discord: gate think autocomplete context behind auth

* Discord: share slash auth for think autocomplete

* Discord: localize think autocomplete auth gate

* Discord: drop think autocomplete auth gating

* Discord: align native autocomplete auth and route readiness

* Discord: use effective route for model picker

---------

Co-authored-by: Tak Hoffman <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
* Discord: use session model for /think autocomplete

* Discord: use cached session store in think autocomplete

* Discord: align think autocomplete with effective bound route

* Discord: fix think autocomplete route-resolution test mocks

* Discord: stabilize think autocomplete CI coverage

* Discord: gate think autocomplete context behind auth

* Discord: share slash auth for think autocomplete

* Discord: localize think autocomplete auth gate

* Discord: drop think autocomplete auth gating

* Discord: align native autocomplete auth and route readiness

* Discord: use effective route for model picker

---------

Co-authored-by: Tak Hoffman <[email protected]>
goweii pushed a commit to goweii/openclaw that referenced this pull request May 24, 2026
* Discord: use session model for /think autocomplete

* Discord: use cached session store in think autocomplete

* Discord: align think autocomplete with effective bound route

* Discord: fix think autocomplete route-resolution test mocks

* Discord: stabilize think autocomplete CI coverage

* Discord: gate think autocomplete context behind auth

* Discord: share slash auth for think autocomplete

* Discord: localize think autocomplete auth gate

* Discord: drop think autocomplete auth gating

* Discord: align native autocomplete auth and route readiness

* Discord: use effective route for model picker

---------

Co-authored-by: Tak Hoffman <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
* Discord: use session model for /think autocomplete

* Discord: use cached session store in think autocomplete

* Discord: align think autocomplete with effective bound route

* Discord: fix think autocomplete route-resolution test mocks

* Discord: stabilize think autocomplete CI coverage

* Discord: gate think autocomplete context behind auth

* Discord: share slash auth for think autocomplete

* Discord: localize think autocomplete auth gate

* Discord: drop think autocomplete auth gating

* Discord: align native autocomplete auth and route readiness

* Discord: use effective route for model picker

---------

Co-authored-by: Tak Hoffman <[email protected]>
Nachx639 pushed a commit to Nachx639/clawdbot that referenced this pull request Jun 17, 2026
* Discord: use session model for /think autocomplete

* Discord: use cached session store in think autocomplete

* Discord: align think autocomplete with effective bound route

* Discord: fix think autocomplete route-resolution test mocks

* Discord: stabilize think autocomplete CI coverage

* Discord: gate think autocomplete context behind auth

* Discord: share slash auth for think autocomplete

* Discord: localize think autocomplete auth gate

* Discord: drop think autocomplete auth gating

* Discord: align native autocomplete auth and route readiness

* Discord: use effective route for model picker

---------

Co-authored-by: Tak Hoffman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Discord /think choices do not show xhigh for openai-codex/gpt-5.4 even though backend supports it

2 participants