Skip to content

ACP mode: session/set_model rejects "auto" but rate-limit error suggests switching to it #2843

@catatafishen

Description

@catatafishen

Describe the bug

In ACP mode (copilot --acp --stdio), when a model-specific rate limit is hit, the CLI surfaces this message to the client:

You've reached your weekly rate limit. Please wait for your limit to reset in N hours or switch to auto model to continue.

However, sending session/set_model with modelId: "auto" immediately returns an error:

{
  "code": -32602,
  "message": "Invalid model 'auto'. Supported values: claude-sonnet-4.6, claude-haiku-4.5, claude-opus-4.6, gpt-5.4, gpt-5.3-codex, gpt-5-mini, gpt-4.1."
}

So the rate-limit message instructs the user (and ACP clients) to switch to the auto model, but the ACP protocol itself rejects the "auto" model ID. There is no ACP method that exposes auto-model selection at all.

Reproduction (raw ACP JSON-RPC)

import subprocess, json, os

copilot = "<path-to-copilot-binary>"
proc = subprocess.Popen([copilot, "--acp", "--stdio", "--disable-builtin-mcps", "--no-auto-update"],
    stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True, bufsize=1)

def send(method, params=None, id=None):
    msg = {"jsonrpc": "2.0", "method": method}
    if params: msg["params"] = params
    if id is not None: msg["id"] = id
    proc.stdin.write(json.dumps(msg) + "\n"); proc.stdin.flush()

def recv(): return json.loads(proc.stdout.readline())

send("initialize", {"protocolVersion": 1, "clientInfo": {"name":"Test","title":"Test","version":"1"}, "clientCapabilities": {}}, id=1)
recv()
send("initialized", {})
send("session/new", {"cwd": "/tmp", "mcpServers": []}, id=2)
r = recv()
session_id = r["result"]["sessionId"]

send("session/set_model", {"sessionId": session_id, "modelId": "auto"}, id=3)
print(recv())
# {"jsonrpc": "2.0", "id": 3, "error": {"code": -32602, "message": "Invalid model 'auto'..."}}

Expected behavior

Either:

  1. session/set_model accepts "auto" as a valid modelId in ACP mode (matching its availability in the web UI and GitHub Actions), or
  2. The rate-limit error message does not suggest switching to auto model when the client is in ACP mode where it cannot be done.

Affected version

GitHub Copilot CLI 1.0.32

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions