Skip to content

[Feature]: Advisor mode — /advisor pairs the main model with a second-model advisor, including BYOK models #604

Closed

Description

@doggy8088

Product or interface

CLI - interactive TUI (with the same value in mcode exec headless runs, and later the Desktop app)

Use case and problem

Most of my sessions are routine work, but the outcomes are decided at a few moments: choosing an approach, getting unstuck from an error that keeps repeating, and deciding whether a task is actually finished. Running a strong model for every turn is expensive; running a fast model alone produces silent mistakes at exactly those moments.

Claude Code solved this with /advisor [fable|opus|sonnet|off]: the main model keeps executing and consults a second, stronger model at decision points. The advisor reads the full conversation, including tool calls and results, and returns guidance the executor applies before continuing (docs, command reference). MiniMax Code has no equivalent, and the closest options are all too coarse:

  • /model switches the whole session, so I pay the strong model's rate on every turn.
  • An Agent file can pin its own model, but that runs the stronger model for a delegated subtask, not as a mid-task second opinion for the main model.
  • The Goal evaluator already makes an out-of-band second-model call, but it is scoped to Goal verification, restricted to goal.evaluator.modelPolicy: same-route-small-fast, and cannot be pointed at an arbitrary model.

The upstream feature is also server-side and Anthropic-only. Anyone running MiniMax Code on BYOK providers (custom_provider.<id> in the active profile's config.yaml) has no way to pair, for example, a fast MiniMax main model with a stronger model from a different provider — even though this client already resolves credentials and routes for any configured model.

Desired behavior

Implement the advisor as a normal client-side model call rather than a provider server tool, so it works with every model the client can already talk to: managed models, a single BYOK provider, and mixed providers (main model on one provider, advisor on another).

Command surface

  • /advisor with no argument opens a picker listing the models available for advice (managed and BYOK), showing the current choice, plus a No advisor entry. Advisor is off by default.
  • /advisor <model> sets it for the session and saves it as the default, confirming with Advisor set to <model>.
  • /advisor off disables it.
  • Non-interactive surfaces follow the /model precedent: mcode exec --advisor <provider/model>, and /advisor with no argument prints the current advisor as text instead of opening a picker.
  • /status shows the active advisor next to the active model, and an interactive session shows a one-line notice when the advisor is on, since it may use more tokens.

Model selection and multiple BYOK models

Accept the same source-qualified model keys the rest of the client uses, so any configured model can advise any other:

/advisor custom_provider:my-relay/claude-opus-4-5     # BYOK model
/advisor minimax/MiniMax-M3                            # managed model
/advisor off
  • The advisor may come from a different provider than the main model; that pairing is the main reason I want this.
  • Reuse the existing provider/credential resolution path (the one the Goal evaluator and subagents already use) so BYOK apiKey, baseURL, and configured headers all apply, and secrets never appear in the transcript, logs, or /status.
  • Since fable|opus|sonnet do not exist here, optionally support user-defined aliases in config so a team can pin /advisor smart to one full model key and change the target later without retraining habits.

Consultation mechanics

  • The main model calls the advisor through a tool (for example consult_advisor), so timing stays model-driven: before committing to an approach, after repeated failures, before declaring completion.
  • The advisor is read-only. It receives the conversation and returns guidance; it never gets tools, never writes files, and never runs commands. It is a second opinion, not a second agent.
  • The advisor call must be bounded like the Goal evaluator already is: maxTokens, timeoutSeconds, and maxRetries, with a failure shown as unavailable rather than failing the turn.
  • A tool-call advisor cannot be expressed through anthropic-messages or openai-completions on the provider side, so this is implemented locally as one extra request per consultation, with the transcript serialized for the advisor model.

Capability policy for BYOK models

Claude Code can enforce "the advisor must rank at or above the main model" because it knows its own model families. MiniMax Code cannot rank arbitrary BYOK models, so hard pairing rules would break the main use case. Desired behavior:

  • Accept any configured advisor model, and warn clearly when the advisor is the same model or appears weaker than the main model.
  • Never silently detach a configured advisor: if the pair is rejected, say so in the session (as the upstream tool does) instead of leaving the user wondering why no consultations happen.
  • Make the strictness configurable (for example advisor.allowWeaker: true for BYOK users, false for anyone who wants the guard).

What the transcript shows

  • An Advising <model> line while the call is in flight.
  • Reviewed when guidance came back, with the guidance readable by expanding the line (Ctrl+O or the existing expand affordance).
  • Advisor declined to advise on this request when the advisor returned no usable guidance.
  • Advisor unavailable (<code>) on transport or provider errors.
  • The main model should surface a conflict rather than follow guidance blindly when its own evidence contradicts the advice.

Cost, usage, and privacy

  • Advisor tokens are billed to the advisor model, often on a different account than the main model. /usage should report them separately from main-model usage.
  • A session-level advisor budget (or a per-consultation cap) that stops consultations when exhausted, so an advisor cannot quietly double a BYOK bill.
  • Toggling the advisor must not invalidate the main model's prompt cache; only the guidance text enters the main transcript. The advisor's own read of the conversation is fresh on every call.
  • Because the full transcript can leave the machine to a second provider, the session should make the destination provider obvious, and advisor calls should remain off by default so nothing is sent anywhere until asked for.

Configuration

Consistent with the existing top-level goal block:

advisor:
  model: custom_provider:my-relay/claude-opus-4-5
  allowWeaker: true
  maxTokens: 8000
  timeoutSeconds: 60
  maxRetries: 1
  sessionBudgetTokens: 200000

Absent config means no advisor and no behavioral change for existing users.

Acceptance criteria

  1. /advisor with no argument lists configured models, marks the current one, and offers No advisor; the default is off.
  2. /advisor custom_provider:my-relay/claude-opus-4-5 sets a BYOK advisor that persists across sessions, and /status shows it.
  3. Main model on a managed model plus advisor on a BYOK provider works end to end, with the BYOK key never printed.
  4. Turning the advisor off produces zero advisor requests in the turn log.
  5. An advisor transport failure shows Advisor unavailable (<code>) and the turn completes normally.
  6. Toggling /advisor mid-session leaves the main model's prompt cache intact.
  7. /usage separates advisor tokens from main-model tokens.
  8. mcode exec --advisor <provider/model> runs a headless session with consultations, and /advisor without an argument prints the current advisor.
  9. An offline fixture with a local protocol server (as the existing BYOK test does) asserts that the advisor request carries the conversation including tool calls and results, and that returned guidance reaches the main transcript.

Platform

macOS (the feature is platform-independent; I use the CLI on macOS and would expect the same on Linux and Windows)

Alternatives and additional context

What I tried instead

  • /model to switch to a stronger model and back: works, but pays the strong model on every turn and loses continuity of intent when I forget to switch back.
  • A custom Agent pinned to a stronger model and delegating to it: useful, but it only helps for a delegated subtask, and the main model keeps making the planning and completion decisions alone.
  • Goal verification with the evaluator: genuinely close in spirit — an independent model reads the work and judges it — but it is Goal-scoped, cannot be configured to a different provider, and offers no interactive control.

Implementation pointers from this repository

  • Slash commands are declared in packages/tui/src/application/command-descriptors.ts; /advisor belongs next to model and status.
  • Model keys are source-qualified as provider/model, with BYOK spelled custom_provider:<provider-id>/<model-id> (packages/local-runtime-v2/src/service/model-system/resolution/model-key.ts), and the CLI already takes -m, --model <provider/model>.
  • packages/local-runtime-v2/src/application/agent/goal-evaluator-verifier.ts is an existing example of one out-of-band model request using independently resolved routes and credentials, bounded by maxTokens / timeoutSeconds / maxRetries — the advisor could reuse that shape rather than inventing a second one.
  • The advisor config block would sit beside the existing top-level goal block in packages/config/src/config.ts.

Explicitly not requested

Anthropic's advisor_20260301 server tool or any provider-side advisor protocol. The whole value here is that the advisor is just another configured model call, which is what makes multiple BYOK models usable as advisors.

Why this is worth it

Pairing a fast main model with a stronger advisor is usually cheaper than running the stronger model throughout, because the advisor is consulted at decision points rather than every turn. For BYOK users it is also the only way to keep a MiniMax executor while borrowing judgement from a model on another provider.

Activity

  1. yujiachen-y commented on Nov 16, 2026

    @yujiachen-y
    Collaborator

    This is an upcoming feature. We'll launch it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions