Repository navigation
Description
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:
/modelswitches 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
/advisorwith 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 withAdvisor set to <model>./advisor offdisables it.- Non-interactive surfaces follow the
/modelprecedent:mcode exec --advisor <provider/model>, and/advisorwith no argument prints the current advisor as text instead of opening a picker. /statusshows 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 configuredheadersall apply, and secrets never appear in the transcript, logs, or/status. - Since
fable|opus|sonnetdo not exist here, optionally support user-defined aliases in config so a team can pin/advisor smartto 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, andmaxRetries, with a failure shown as unavailable rather than failing the turn. - A tool-call advisor cannot be expressed through
anthropic-messagesoropenai-completionson 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: truefor BYOK users,falsefor anyone who wants the guard).
What the transcript shows
- An
Advising <model>line while the call is in flight. Reviewedwhen guidance came back, with the guidance readable by expanding the line (Ctrl+Oor the existing expand affordance).Advisor declined to advise on this requestwhen 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.
/usageshould 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: 200000Absent config means no advisor and no behavioral change for existing users.
Acceptance criteria
/advisorwith no argument lists configured models, marks the current one, and offers No advisor; the default is off./advisor custom_provider:my-relay/claude-opus-4-5sets a BYOK advisor that persists across sessions, and/statusshows it.- Main model on a managed model plus advisor on a BYOK provider works end to end, with the BYOK key never printed.
- Turning the advisor off produces zero advisor requests in the turn log.
- An advisor transport failure shows
Advisor unavailable (<code>)and the turn completes normally. - Toggling
/advisormid-session leaves the main model's prompt cache intact. /usageseparates advisor tokens from main-model tokens.mcode exec --advisor <provider/model>runs a headless session with consultations, and/advisorwithout an argument prints the current advisor.- 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
/modelto 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
modeland 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;/advisorbelongs next tomodelandstatus. - Model keys are source-qualified as
provider/model, with BYOK spelledcustom_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.tsis an existing example of one out-of-band model request using independently resolved routes and credentials, bounded bymaxTokens/timeoutSeconds/maxRetries— the advisor could reuse that shape rather than inventing a second one.- The
advisorconfig block would sit beside the existing top-levelgoalblock inpackages/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
yujiachen-y commentedon Nov 16, 2026
This is an upcoming feature. We'll launch it soon.